Add New Disk and Create /U01 Mount Point Contents
Total Page:16
File Type:pdf, Size:1020Kb
[email protected] Add new disk and Create /u01 Mount Point Contents 1) Delete existing disk from virtual box ......................................................................... 2 2) Add disk to Virtual Box ....................................................................................................... 7 3) Discover/find the Added Disk: .......................................................................................... 9 4) Format and Create the disk Slice/partition for /u01 mount point .............. 11 5) Create File system and Mount point. ........................................................................... 15 1 | P a g e [email protected] 1) Delete existing disk from virtual box I have to delete existing disk for /u01 to create disk with higher Size. First unmount the /u01 filesystem ================================== mgracsolsrv64bit1:[root]$ df -h |egrep 'Filesystem|u01|u02' Filesystem size used avail capacity Mounted on /dev/dsk/c0t2d0s0 9.9G 10M 9.7G 1% /u01 mgracsolsrv64bit1:[root]$ mount |egrep 'u01|u02' /u01 on /dev/dsk/c0t2d0s0 read/write/setuid/devices/rstchown/intr/largefiles/logging/xattr/onerror=panic/dev =840080 on Mon Oct 14 22:13:44 2013 umount /u01 Remove the entry for /u01 from /etc/vfstab ============================================= vi /etc/vfstab Delete the partition: ======================== # format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <ATA -VBOX HARDDISK -1.0 cyl 2085 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@0,0 1. c0t2d0 <ATA -VBOX HARDDISK -1.0 cyl 1955 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@2,0 Specify disk (enter its number): 1 selecting c0t2d0 [disk formatted] format> p PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition 4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit 2 | P a g e [email protected] partition> print Current partition table (unnamed): Total disk cylinders available: 1955 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 unassigned wm 1 - 1306 10.00GB (1306/0/0) 20980890 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 1954 14.98GB (1955/0/0) 31407075 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 unassigned wm 0 0 (0/0/0) 0 partition> partition > 0 Part Tag Flag Cylinders Size Blocks 0 unassigned wm 1 - 1306 10.00GB (1306/0/0) 20980890 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[1]: Enter partition size[20980890b, 1306c, 1306e, 10244.58mb, 10.00gb]: 0 partition> print Current partition table (unnamed): Total disk cylinders available: 1955 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 unassigned wm 0 0 (0/0/0) 0 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 1954 14.98GB (1955/0/0) 31407075 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 unassigned wm 0 0 (0/0/0) 0 partition> Save your changes. Label the disk. ===================================== partition> label Ready to label disk, continue? y partition>q 3 | P a g e [email protected] First Shut down VM Server , Go to File -> Virtual Media Manager. Highlight the Disk you need to delete from VM and click the Release button. Once release from VM’s , its ready for remove , When prompt if you want to Keep/Delete the file, select Delete. This will delete the vdi file from your system. 4 | P a g e [email protected] 5 | P a g e [email protected] 6 | P a g e [email protected] 2) Add disk to Virtual Box Check existing Disks: ====================== mgracsolsrv64bit1:[root]$ cfgadm Ap_Id Type Receptacle Occupant Condition sata0/0::dsk/c0t0d0 disk connected configured ok sata0/1::dsk/c0t1d0 cd/dvd connected configured ok sata0/2 sata-port empty unconfigured ok sata0/3 sata-port empty unconfigured ok sata0/4 sata-port empty unconfigured ok sata0/5 sata-port empty unconfigured ok sata0/6 sata-port empty unconfigured ok sata0/7 sata-port empty unconfigured ok sata0/8 sata-port empty unconfigured ok sata0/9 sata-port empty unconfigured ok sata0/10 sata-port empty unconfigured ok 7 | P a g e [email protected] 8 | P a g e [email protected] 3) Discover/find the Added Disk: Now start the VM server to format and mount as /u01 Login as root user. mgracsolsrv64bit1:[root]$ cfgadm Ap_Id Type Receptacle Occupant Condition sata0/0::dsk/c0t0d0 disk connected configured ok sata0/1::dsk/c0t1d0 cd/dvd connected configured ok sata0/2::dsk/c0t2d0 disk connected configured ok sata0/3 sata-port empty unconfigured ok sata0/4 sata-port empty unconfigured ok sata0/5 sata-port empty unconfigured ok sata0/6 sata-port empty unconfigured ok sata0/7 sata-port empty unconfigured ok sata0/8 sata-port empty unconfigured ok sata0/9 sata-port empty unconfigured ok sata0/10 sata-port empty unconfigured ok sata0/11 sata-port empty unconfigured ok sata0/12 sata-port empty unconfigured ok sata0/13 sata-port empty unconfigured ok sata0/14 sata-port empty unconfigured ok sata0/15 sata-port empty unconfigured ok sata0/16 sata-port empty unconfigured ok sata0/17 sata-port empty unconfigured ok sata0/18 sata-port empty unconfigured ok sata0/19 sata-port empty unconfigured ok sata0/20 sata-port empty unconfigured ok sata0/21 sata-port empty unconfigured ok sata0/22 sata-port empty unconfigured ok sata0/23 sata-port empty unconfigured ok sata0/24 sata-port empty unconfigured ok sata0/25 sata-port empty unconfigured ok sata0/26 sata-port empty unconfigured ok sata0/27 sata-port empty unconfigured ok sata0/28 sata-port empty unconfigured ok sata0/29 sata-port empty unconfigured ok usb0/1 usb-input connected configured ok usb0/2 unknown empty unconfigured ok usb0/3 unknown empty unconfigured ok usb0/4 unknown empty unconfigured ok usb0/5 unknown empty unconfigured ok usb0/6 unknown empty unconfigured ok usb0/7 unknown empty unconfigured ok usb0/8 unknown empty unconfigured ok mgracsolsrv64bit1:[root]$ echo|format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <ATA -VBOX HARDDISK -1.0 cyl 2085 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@0,0 1. c0t2d0 <ATA -VBOX HARDDISK -1.0 cyl 2086 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@2,0 Specify disk (enter its number): Specify disk (enter its number): mgracsolsrv64bit1:[root]$ 9 | P a g e [email protected] Below commands Useful when disk is not visible, then rescan the disk, see the example below ============================================================================= # cfgadm -al ( verification of FC conroller connections ) # devfsadm -c disk -v (rescanning disks ) # echo|format ( verifiy disks from OS) /u01 does not exist in below: mgracsolsrv64bit1:[root]$ df -h Filesystem size used avail capacity Mounted on /dev/dsk/c0t0d0s0 8.1G 5.1G 3.0G 64% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 3.1G 984K 3.1G 1% /etc/svc/volatile objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab /usr/lib/libc/libc_hwcap1.so.1 8.1G 5.1G 3.0G 64% /lib/libc.so.1 fd 0K 0K 0K 0% /dev/fd swap 3.1G 36K 3.1G 1% /tmp swap 3.1G 36K 3.1G 1% /var/run /dev/dsk/c0t0d0s7 7.1G 3.7G 3.4G 53% /export/home winshare 225G 137G 88G 62% /mnt/sf_winshare mgracsolsrv64bit1:[root]$ echo|format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <ATA -VBOX HARDDISK -1.0 cyl 2085 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@0,0 1. c0t2d0 <ATA -VBOX HARDDISK -1.0 cyl 2086 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@2,0 Specify disk (enter its number): mgracsolsrv64bit1:[root]$ # cat /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/dsk/c0t0d0s1 - - swap - no - /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no - /dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes - /devices - /devices devfs - no - sharefs - /etc/dfs/sharetab sharefs - no - ctfs - /system/contract ctfs - no - objfs - /system/object objfs - no - swap - /tmp tmpfs - yes - 10 | P a g e [email protected] Example discovering the disk manually when not visible: ========================================================= # echo|format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <ATA -VBOX HARDDISK -1.0 cyl 2085 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@0,0 Specify disk (enter its number): # Shows only One disk as above. # devfsadm This scan command will discover the new disk we recently added above. # echo|format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t0d0 <ATA -VBOX HARDDISK -1.0 cyl 2085 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@0,0 1. c0t2d0 <ATA -VBOX HARDDISK -1.0 cyl 2086 alt 2 hd 255 sec 63> /pci@0,0/pci8086,2829@d/disk@2,0 4) Format and Create the disk Slice/partition for /u01 mount point http://docs.oracle.com/html/B10766_08/presolaris.htm ======================================================== On x86 systems only, use the fdisk command to create a Solaris partition on the disk if one does not already exist.