multiple Hard disk...

I have multiple hard disks in my Solaris 2.6 m/c. All the hard disks have the same file system. OS recognizes all the hard disks. Now the question is "Programmatically how do i find the number of hard disks. How is each hard disk identified so that i can select the hard disk at random and perform operations on it."
    QUICK Responses are expected....
Who is Participating?
brauner071697Connect With a Mentor Commented:
I don't known what you mean exactly but each disk in solaris has the following name:
Under the /dev/dsk or /dev/rdsk you have for each disk and slice on it a device.
c0t0d0s0 for example is c0 -> controler 0 (the first controler)
                                    t0 -> target 0     (SCSI ID 0)
                                    d0 -> disk0       ( for multiple LUN support)
                                    s0 -> slice 0     (if you have more than one slice)
With the command df -k you find the mounted filesystems in your system with their capacity.
In the /dev directories you can find each disk in your system.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.