printf "\0x1A" | format | grep DEFAULT
or
perl -e "print \"\\x1A\";" | format
0x1A is CTRL \D in ASCII
or
format < /dev/null
Size of a disk and partition/layout info
# prtvtoc /dev/dsk/c1t0d0s2
* /dev/dsk/c1t0d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 32 sectors/track
* 128 tracks/cylinder
* 4096 sectors/cylinder
* 4094 cylinders
* 4092 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 1052672 9863168 10915839 /
1 3 01 4096 1048576 1052671
2 5 00 0 16760832 16760831
7 8 00 10915840 5844992 16760831 /export/home
8 1 01 0 4096 4095
# bc
4096*128*32*512 (cyclinders*tracks*sectors*512) -->for total number of bytes of disk space.
8589934592 BYTES
scale=4
8589934592/1024
8388608.0000 KB
8388608.0000/1024
8192.0000 MB
8192.0000/1024
8.0000 GB
scan for new luns /disks (devfsadm -c disk)
# printf "\0x1A" | format | grep DEFAULT
0. c1t0d0
# devfsadm -c disk
# printf "\0x1A" | format | grep DEFAULT
0. c1t0d0
1. c1t1d0
for SAN
devfsadm -C
cfgadm -al (to get a list of controllers)
cfgadm -c configure c2::500610003412EAB23141
cfgadm -c configure c4::500610003412EAB23142
vxdctl enable (to tell veritas to look for new disks)
THEN
vea (to work with them)
Remove a disk drive (cfgadm)
# printf "\0x1A" | format | grep DEFAULT
0. c1t0d0
1. c1t1d0
# cfgadm -c unconfigure c1::dsk/c1t1d0
# printf "\0x1A" | format | grep DEFAULT
0. c1t0d0
http://www.utahsysadmin.com/2009/05/15/new-lun-solaris9-vxfs-powerpath/
No comments:
Post a Comment