Friends,
i have used the following code to get the number of disks in solaris
echo | pfexec format | egrep -v "Searching|AVAILABLE|Specify|^$|@" | wc -l
is there a better way to get the same result
Friends,
i have used the following code to get the number of disks in solaris
echo | pfexec format | egrep -v "Searching|AVAILABLE|Specify|^$|@" | wc -l
is there a better way to get the same result
/etc/mnttab has all of the mounted volumes and devices as well as /proc and /dev/fd
cd /proc
bash-3.00# ls
0 118 12926 13537 17128 18485 2 217 23168 304 355 426 665 897 97
1 1198 13499 13538 18202 18508 206 220 23178 306 368 432 678 898
1023 120 13505 13539 18205 18735 210 226 234 327 395 433 679 9
112 12357 13529 13668 18209 18738 215 227 237 331 396 489 7 960
1167 12923 13533 17113 18472 18742 216 228 3 3458 397 4990 710 963
bash-3.00# cat /etc/mnttab
/dev/dsk/c0t0d0s0 / ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=800000 1254981644
/devices /devices devfs dev=51c0000 1254981638
ctfs /system/contract ctfs dev=5200001 1254981638
proc /proc proc dev=5240000 1254981638
mnttab /etc/mnttab mntfs dev=5280001 1254981638
swap /etc/svc/volatile tmpfs xattr,dev=52c0001 1254981638
objfs /system/object objfs dev=5300001 1254981638
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1 /platform/sun4u-us3/lib/libc_psr.so.1 lofs dev=800000 1254981643
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1 lofs dev=800000 1254981643
/dev/dsk/c0t0d0s5 /var ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=800005 1254981645
swap /tmp tmpfs xattr,dev=52c0002 1254981645
swap /var/run tmpfs xattr,dev=52c0003 1254981645
/dev/dsk/c0t0d0s3 /export/home ufs rw,intr,largefiles,logging,xattr,onerror=panic,dev=800003 1254981648
-hosts /net autofs nosuid,indirect,ignore,nobrowse,dev=5500001 1254981651
auto_home /home autofs indirect,ignore,nobrowse,dev=5500002 1254981651
amsun1:vold(pid327) /vol nfs ignore,noquota,dev=54c0001 1254981653
ovnis.ind.hp.com:/home /ovnis nfs rw,xattr,dev=54c0002 1255081083
from what I see, you have one physical disk, three slices of which is being used in /, /var, /export/home mountpoints
also - try to use format command
iostat -En
is commonly use to get disk information on Solaris.
this works well:
format < /dev/null | grep c[1-9]
and you get the list of disks already numbered for you.