| View previous topic :: View next topic |
| Author |
Message |
linuxnewbie1234 Guest
|
Posted: Wed Nov 05, 2008 1:31 am Post subject: 3ware mapping to disk devices in Linux |
|
|
Hi there
I am trying to map device files to drive serial numbers in Linux.
The reason I am trying to do this is mainly because Linux can swap all
drive letters at every boot. Yes I know that I can use filesystem
labels, mdadm array disk numbers etc, but if a disk fails I want to know
exactly and reliably WHICH disk I have to replace (we are speaking about
a big disk server here), and I can do that if I can get to the serial
number. From the OS just the device name is given to me, not the
physical slot (and disk member number in the mdadm array but I would
prefer to go the serial number way if possible).
Also at RAID array creation (mdadm), in order to do the things well, I
need to know a reliable mapping of disk device file to physical slot.
With this server I cannot count on drive activity leds being present or
functional.
Most controllers are good, and with them I can use
smartctl -i /dev/sdX...
However I have various controllers, and one of them is a 3ware (possibly
more than one 3ware in the future)
3ware doesn't work with the command line above, nor with hdparm.
With 3ware the only way to make it work is:
smartctl -i -d 3ware,PORTNUMBER /dev/twaCONTROLLERNUMBER
The problem is that I don't know a way to map the /dev/sdX device to its
PORTNUMBER and CONTROLLERNUMBER in the 3ware, so I am stuck again.
Please help
Thank you |
|
| |
|
Back to top |
David W. Hodgins Guest
|
Posted: Wed Nov 05, 2008 2:15 am Post subject: Re: 3ware mapping to disk devices in Linux |
|
|
On Tue, 04 Nov 2008 14:31:23 -0500, linuxnewbie1234 <linuxnewbie1234@nowhere.com> wrote:
| Quote: | I am trying to map device files to drive serial numbers in Linux.
|
/sbin/udevadm info -q env -p /block/sda|grep SERIAL_SHORT
or
/lib/udev/ata_id /dev/sda
Regards, Dave Hodgins
--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.) |
|
| |
|
Back to top |
linuxnewbie1234 Guest
|
Posted: Wed Nov 05, 2008 9:17 pm Post subject: Re: 3ware mapping to disk devices in Linux |
|
|
David W. Hodgins wrote:
| Quote: | On Tue, 04 Nov 2008 14:31:23 -0500, linuxnewbie1234 <linuxnewbie1234@nowhere.com> wrote:
I am trying to map device files to drive serial numbers in Linux.
/sbin/udevadm info -q env -p /block/sda|grep SERIAL_SHORT
|
Oh My Goodness
Thank you! This works on 3ware.
The serial number is slightly tweaked by 3ware but the numeric part does
contain the correct HD serial number.
The command does not get a proper serial number on the mobo-integrated
SAS controller (LSI 1068E)
On 3ware without |grep I seem to be able to also get the PCI slot and
the scsi-id hence probably I could determine the 3ware controller ID.
Now I have 5 commands, each one works on something but no-one works on
everything:
Works on integrated SAS and integrated SATA, not on 3ware:
hdparm -I /dev/sdX | grep -i serial
Works on integrated SATA only:
hdparm -i /dev/sdX | grep -i serial
Works on integrated SATA only:
smartctl -a /dev/sdX | grep -i serial
Works on integrated SATA and on 3ware:
/sbin/udevadm info -q all -p /block/sdX | grep ID_SERIAL_SHORT
Works on integrated SATA only:
/lib/udev/ata_id /dev/sdX
| Quote: | or
/lib/udev/ata_id /dev/sda
|
This one works on integrated SATA only, doesn't work on 3ware nor on
integrated SAS.
Thank you |
|
| |
|
Back to top |
|