A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » General Hardware & Peripherals » Storage (alternative)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

3ware mapping to disk devices in Linux



 
 
Thread Tools Display Modes
  #1  
Old November 4th 08, 07:31 PM posted to comp.sys.ibm.pc.hardware.storage,alt.os.linux
linuxnewbie1234
external usenet poster
 
Posts: 6
Default 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
  #2  
Old November 4th 08, 08:15 PM posted to comp.sys.ibm.pc.hardware.storage,alt.os.linux
David W. Hodgins
external usenet poster
 
Posts: 147
Default 3ware mapping to disk devices in Linux

On Tue, 04 Nov 2008 14:31:23 -0500, linuxnewbie1234 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
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.)
  #3  
Old November 5th 08, 03:17 PM posted to comp.sys.ibm.pc.hardware.storage,alt.os.linux
linuxnewbie1234
external usenet poster
 
Posts: 6
Default 3ware mapping to disk devices in Linux

David W. Hodgins wrote:
On Tue, 04 Nov 2008 14:31:23 -0500, linuxnewbie1234 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 3wa
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 3wa
/sbin/udevadm info -q all -p /block/sdX | grep ID_SERIAL_SHORT

Works on integrated SATA only:
/lib/udev/ata_id /dev/sdX

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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
external disk for booting linux: which technology unix_fan General 9 December 12th 06 12:19 AM
Backup devices? SC101? LaCie Ethernet Disk? Pete Storage (alternative) 5 January 6th 06 06:07 PM
How to scan for new disk in Linux(Redhat) without rebooting?.......................TIA. Boll Weevil Storage & Hardrives 13 January 30th 05 04:56 PM
Linux Drivers mixes my monitor devices after starting X Tom Wulf Nvidia Videocards 1 May 14th 04 08:29 PM
Any experience of entry-level NAS devices (eg. Lacie Ethernet Disk) Dominique Pivard Storage (alternative) 0 April 26th 04 05:36 AM


All times are GMT +1. The time now is 04:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.