Thursday, August 10, 2006

Disk Management on Solaris

(1) see how may disk

AVAILABLE DISK SELECTIONS:
0. c3t0d0
/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/sd@0,0
1. c3t1d0
/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/sd@1,0
Specify disk (enter its number):


There are 2 disks

(2) see how disk is used

# df -kh
Filesystem size used avail capacity Mounted on
/dev/dsk/c3t0d0s0 11G 7.8G 2.7G 75% /
/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 5.6G 1008K 5.6G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object/platform/sun4v/lib/libc_psr/libc_psr_hwcap1.so.1
11G 7.8G 2.7G 75% /platform/sun4v/lib/libc_psr.so.1/platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
11G 7.8G 2.7G 75% /platform/sun4v/lib/sparcv9/libc_psr.so.1
fd 0K 0K 0K 0% /dev/fd
/dev/dsk/c3t0d0s5 5.8G 3.0G 2.7G 53% /var
swap 6.7G 1.1G 5.6G 16% /tmp
swap 5.6G 48K 5.6G 1% /var/run
/dev/lofi/1 330M 330M 0K 100% /tmp/s10install

you can see only disk0 c3t0d0 is in use


(3) See used disk partition


*# format*
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c3t0d0
/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/sd@0,0
1. c3t1d0
/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/sd@1,0
*Specify disk (enter its number): 0*
selecting c3t0d0
[disk formatted]
Warning: Current Disk has mounted partitions.
/dev/dsk/c3t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c3t0d0s1 is currently used by swap. Please see swap(1M).
/dev/dsk/c3t0d0s5 is currently mounted on /var. Please see umount(1M).


FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
inquiry - show vendor, product and revision
volname - set 8-character volume name
! - execute , then return
quit
*format> partition

*
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
! - execute , then return
quit
*partition> print*
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 403 - 2616 10.74GB (2214/0/0) 22529664
1 swap wu 0 - 402 1.96GB (403/0/0) 4100928
2 backup wm 0 - 14086 68.35GB (14087/0/0) 143349312
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 var wm 2617 - 3824 5.86GB (1208/0/0) 12292608
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0


(4) see how is the free disk paritioned

*# format*
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c3t0d0
/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/sd@0,0
1. c3t1d0
/pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/sd@1,0
*Specify disk (enter its number): 1*
selecting c3t1d0
[disk formatted]
*format> partition*


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
! - execute , then return
quit
*partition> print*
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 25 129.19MB (26/0/0) 264576
1 swap wu 26 - 51 129.19MB (26/0/0) 264576
2 backup wu 0 - 14086 68.35GB (14087/0/0) 143349312
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 usr wm 52 - 14086 68.10GB (14035/0/0) 142820160*
7 unassigned wm 0 0 (0/0/0) 0


(5) create mount point for disk1

create a directory $(dir Name)

mount /dev/dsk/c3t1d0s6 $(dirName)


so disk can be accessable now.

No comments: