I have 2 identical Dell R720 servers running identical Oracle Enterprise Linux(RHEL)6.4.

Both servers (supposedly) configured in exactly the same way. However, one of the servers is behaving differently.

Every other reboot its local HDD name(and related partitions) flip from /dev/sda to /dev/sdj. This is problematic because this server is configured with multipathd, and if this flip happens this config does not match other server and Oracle DB(or its clusterware) complains that nodes are not configured identically.

Why does one server has a consistent device names while the other server keeps flipping back and forth?

How can I make local hdd to consistently be /dev/sda?

edit: I created a rules file in /etc/udev/rules.d with the following rule, but it doesn't seem to be working

KERNEL=="sd*" , PROGRAM="scsi_id --page=0x83 -–whitelisted --device=/dev/%k",RESULT=="36b8ca3a0e58a3f00195c25c8117a6822", NAME="sda"
  • Try this: KERNEL=="sd*", PROGRAM="scsi_id --page=0x83 -–whitelisted --device=/dev/%k", RESULT=="36b8ca3a0e58a3f00195c25c8117a6822", NAME="foo%n" – Petter H Jul 8 '13 at 18:42
  • check your driver load order in your initrd and check modprobe.conf – c4f4t0r Jan 5 '14 at 0:06

Better than fighting with udev to force a device name for a given device, a permanent solution is to use UUIDs. This is valid for any device known to the device-mapper.

This way, you don't have to worry if you add extra disks to your host. The UUID identifier guaranties that the right device will be used.

| improve this answer | |
  • It is always best to use UUIDs for this very reason... To find the UUID of the drive in question use: blkid -p /dev/<drive> – Atari911 Jun 27 '13 at 20:19
  • use UUIDs where? multipath is using wwid. Given a choice, I'd rather fight udev than Oracle. – Mxx Jun 27 '13 at 20:37
  • "dmsetup reports a UUID for partitions on multipath devices in the form: part<partition_number>-mpath-<WWID>". Also, multipath devices are on top of the /dev/name devices. What I'm suggesting is to use UUIDs for the underlying devices, to avoid multipath failures, in other words, fix it at the bottom of the storage stack. – dawud Jun 27 '13 at 20:41
  • I still don't understand where exactly I should use UUID. multipath.conf uses wwids. I just specify wwid and it automatically creates all the relevant mappings. – Mxx Jun 27 '13 at 21:00
  • 2

Use aliases, or user_friedly_names or do it with udev. All of these are documented in RHEL Storage Administration Guide:

Maybe you could use /dev/disk/* tree instead of mapped /dev/sd*



| improve this answer | |
  • I am using aliases in multipath.conf. But if you'll see sample in your 2nd link, multipath config doesn't reference to any /dev/* devices. Yet multipath -ll for each path shows /dev/sd* device... – Mxx Jun 28 '13 at 0:53

if you're using multipathd, then you should not have to care weather the disks name is /dev/sdaor /dev/sdj. Use the device name created with multipathd shown with multipath -ll. That name is persistent. The /dev/sd* names only refer to a single path...

| improve this answer | |
  • I do not worry about the multipath part, that thing works fine. I care about local hdd changing its name... – Mxx Jul 5 '13 at 20:00
  • OK but then what about using UUID or writing an udev rule like other answers suggest? you can write a simpler one then the one you have, or follow dawuds answer. You can find the disks under /dev/disk/by-uuid/. Just use that path instead, it is persistent. – Petter H Jul 5 '13 at 20:04
  • Again, like in the other answers, WHERE can i use UUID? How much simpler can I write that rule? It checks for wwid and tries to set device name. Yes, I can I can use those other paths, but software specifically checks for for /dev/sda because that is how other servers are already configured. – Mxx Jul 6 '13 at 0:01
  • OK I dont get it why you'd need the same name on the local disk, just because the other services are configured like that but if that is somehow a requirement for you then fine; use UDEV; UUID won't work. As for the where of it, how do you expect someone other than yourself to know where to use it? wherever you use /dev/sda today would be my bet. Anyway if you have to have the same device name on all your servers, then make an udev rule. If you can't get it working, debug it. – Petter H Jul 8 '13 at 15:03
  • This is a requirement for Oracle's clusterware pre-install check software. It requires for all nodes to have identical configuration, including drive volumes. – Mxx Jul 8 '13 at 15:20

Never use raw disk partitioning. Use LVM. You will end up with the very same configuration on both hosts, regardless of the UUID/WWID disk naming schema.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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