Operating System - Linux
1827421 Members
4337 Online
109965 Solutions
New Discussion

device name changes -- adding luns

 
SOLVED
Go to solution
bg_4
Occasional Contributor

device name changes -- adding luns

Hi All

we are planning to deploy linux on SAN.
I read that "sometimes" while adding luns to server, device path may change? i.e /dev/sdc may become /dev/sde. I would like to know your experiences and if above statement is true or not.

Also how can I prevent it if it's true.
5 REPLIES 5
Colin Topliss
Esteemed Contributor

Re: device name changes -- adding luns

Yep, its true.

You can try to use device bonding - whether or not its available depends on the device and the drivers you have. I don't think its available on the Emulex LightPulse cards, but I think it is available on the QLogic cards (just in the middle of looking at these now - HP don't support Emulex to their SAN storage, and unfortunately these were the cards we originally had).

The device number will only change when you present LUNS with a lower LUN number than the ones you already have defined.

So, if you have LUNS 3 and 4, these would possibly appear as /dev/sdc and /dev/sdd. If you then present LUN 2 to that system, then the assignments would change - 3 and 4 would become /dev/sdd and /dev/sde, 2 would become /dev/sdc.

Col.
Colin Topliss
Esteemed Contributor

Re: device name changes -- adding luns

...heh, and I should also point out that when you delete LUNS, the device path above the deleted LUN will shift up....

So, if you have LUNS 2, 3 and 4, these would possibly appear as /dev/sdc, /dev/sdd, and /dev/sde. If you then remove LUN 3, the assignments would change - LUN 4 would become /dev/sdd instead of /dev/sde.


Col.
Jeroen Peereboom
Honored Contributor

Re: device name changes -- adding luns

L.S.

I'm using OCFS (Oracle Cluster FileSystem) and just modified my /etc/fstab to mount by LABEL i.s.o. devicename. You can use labels in ext2fs too.
When LUNs are added/deleted, existing device file numbers may change, the mount will succeed.

JP.
Denis Goffinet
Advisor
Solution

Re: device name changes -- adding luns

You may try to use "scsidev" that generates unique devices name for scsi devices:

exemple: if /dev/sda is on host adapter 0, channel 3, target 2 lun 4, it will create a unique name /dev/scsi/sd0-0c3d2l4

If used with MD raid modules, it won't work because md will use /dev/sda instead of the unique name ( still asking why .. bu didn't find yet)



Dave Truchan
Occasional Advisor

Re: device name changes -- adding luns

You can also use devlabel to address the device renaming issue.

Dell has a good whitepaper that explains this in gory detail:
http://www1.us.dell.com/content/topics/global.aspx/power/en/ps1q03_lerhaupt

You can download the package from linux.dell.com/devlabel