[rhelv6-list] How can I uniquely identify my disk in RHEL6 installed on Citrix Xenserver?

Lamar Owen lowen at pari.edu
Thu Nov 1 13:55:10 UTC 2012


On Thursday, November 01, 2012 05:07:17 AM John Haxby wrote:
> On 1 November 2012 06:30, neo3 matrix <neo3matrix at gmail.com> wrote:
> > So, Can you tell me a way out to map disks on different systems?
> 
> Basically, you can't.   Hardware discovery is not deterministic.   There's
> no reason why sda and sdb (say) should be assigned to the same physical
> disk on successive reboots of a single machine.   If you're moving disks to
> a different machine, even if it's an identical machine with the controllers
> in the same slots there's even less chance.  You cannot ever rely on
> /dev/sda being a particular disk.  Period.

Let me echo this.  I have a smallish RHEL 6.3 test server with several disk 
controllers: the boot device is a 3Ware 9500S-LP SATA RAID; then there's a 
couple of internal 750GB SATA disks (set as software RAID1) on a four port 
(two internal ports and two external ports, which get frequent use) 
controller; there's also an internal Adaptec U160 SCSI port on the 
motherboard; also there are two PATA ports and an IDE drive sled; and there's 
a two port fibre channel HBA connected to a fully HA (full dual fabric, dual 
attach each fabric) three EMC Clariion CX3 and CX4 arrays.   This is, after 
all a test server, and it gets a lot of use in that capacity, especially when 
it comes to data recovery from IDE, SATA, and USB drives, along with FC LUNs 
if something goes wrong filesystem-wise; it's a snap with EMC to take a LUN 
from one server's storage group and throw it onto the test server's storage 
group, rescan the scsi bus, and do diagnostics with the test server.

I've seen the (booting) 3Ware logical drive show at /dev/sda; and I've seen it 
show up as /dev/sdu, and I've seen it as /dev/sdab, and it's today residing 
at:

[root at www ~]# mount |grep boot
/dev/mapper/mpathkp1 on /boot type ext4 (rw)
[root at www ~]# multipath -l /dev/mapper/mpathk
mpathk (1AMCC    4ND1Q84S1FA203004634) dm-18 AMCC,9500S-4LP  DISK
size=698G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=0 status=active
  `- 10:0:0:0 sdac 65:192 active undef running
[root at www ~]# uname -srv
Linux 2.6.32-279.9.1.el6.i686 #1 SMP Fri Aug 31 09:03:11 EDT 2012
[root at www ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[root at www ~]# 

(yeah, I know, multipath on it is a tad useless, but this is the default 
setting for multipathd, as I haven't blacklisted any devices in my multipath 
config; this is, after all, a test server.....).

>From one bootup to the next /boot's device will and does change.  It is not 
predictable, and that's OK, thanks to the way /etc/fstab is set up in EL6.

If you rely on /dev/sdX being constant or even predictable on EL6 you're in 
for a rude awakening. 




More information about the rhelv6-list mailing list