OS: Linux 2.6.18 (RedHat-based distro)

I am transitioning from one iSCSI NAS to another iSCSI NAS. I have them both connected so that I can transfer data. However, each time I reboot the NAS that maps to /dev/sdd may change; sometimes it's the old one, sometimes it's the new one. Is there a way that I can set this to be consistent between reboots? Thanks!

link|improve this question

57% accept rate
feedback

1 Answer

The names of entries in /dev are determined by udev. Find some distinguishing characteristic such as the serial number, then add rules like the following:

KERNEL=="sd*", ATTR{vendor}=="Yoyodine", ENV{ID_SERIAL}=="123-abc", NAME=="sdd"
KERNEL=="sd*", ATTR{vendor}=="Yoyodine", ENV{ID_SERIAL}=="123-def", NAME=="sde"

While you're at it, you might as well give more expressive names such as old-nas and new-nas.

The location of udev rules depends on your distribution; somewhere under /etc/udev is likely. Reload the udev configuration after you've changed it (it would be /etc/init.d/udev reload on a Debian-based distribution, I forget what the Red Hat equivalent is).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.