LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Best/Right way to extract disk serial number? (https://www.linuxquestions.org/questions/linux-hardware-18/best-right-way-to-extract-disk-serial-number-578477/)

itnaa 08-20-2007 02:03 PM

Best/Right way to extract disk serial number?
 
What is the best & right way (command-line) to extract the serial numbers of my hard disks? I have a hardware mirrored RAID setup (using 3ware's 9550SX-8LP).

I checked out various things and the following seemed to work, for eg,

% sginfo -a /dev/sdc | grep Serial

and I do that for all my mounts.

Is this the right way? Is there a better way?

Since I'm mirroring, is there a way to probe the serial numbers of the disk pairs that are being mirrored?

Any help would be much appreciated!! Thanks.

pixellany 08-20-2007 02:43 PM

lshw returns serial numbers (run it as root)

itnaa 08-21-2007 02:45 AM

Thanks pixellany. Installed it and tried it out... rather extensive.

Is it possible to discover the serial numbers of each mirrored set? I noticed that it gave serial numbers of one of each set.

Thanks.

pixellany 08-21-2007 04:47 AM

Quote:

Originally Posted by itnaa (Post 2865502)
Thanks pixellany. Installed it and tried it out... rather extensive.

Is it possible to discover the serial numbers of each mirrored set? I noticed that it gave serial numbers of one of each set.

Thanks.

Not sure I understand--I think lshw gives info only the the actual hardware. Are you saying that it does not see all the hardware?

itnaa 08-21-2007 11:13 AM

Thanks pixellany. I did not put it well...What I meant was that I have 8 similar disks arranged in mirror mode, so effectively 4 disks available. When I run lshw, it provides the serial numbers for 4 disks. I was wondering how to get the serial numbers of the remaining 4 disks. Perhaps it isn't possible when one uses hardware RAID? Maybe I need one of the 3ware cmd-line utilities?


All times are GMT -5. The time now is 07:59 PM.