Device name assignment for shared disks

Latest response

Hi,

I'm testing an option to deploy Oracle RAC on RHEL 6.4 guests in 3.2 and enabled few shared disk between 2 guests - 2 Gb , 10 Gb and 50 Gb.

After reboot all disk are recognized in OS but on each guest they appear as different devices . It means that on VM1 2Gb disk was recognized as /dev/vdb in VM2 it visible as /dev/vdc , 10Gb as /dev/vdc and /dev/vdb respectively .I expect they all shared disk will have the same names .

Is there way to manage this issue ?

Regards ,

Vladimir Berezovski.

Responses

If you use LVM you can give each volume group a name, and then it doesn't matter so much how the disks get assigned because you're not using that anyway.  E.g. I have seen some people name it after the server .

With a server name of alpha, the VG would be /dev/alpha, and the rootfs LV would be /dev/alpha/rootfs .  I think this was a way to prevent conflicts where many VGs are named VolGroup00 thus the O/S gets confused (I think).

But for your situation, you probably want to name the disks some other way.

You can use udev rules inside the guest to map the disks using it serial number to specific device names.

Couple of possible solutions I can see:

  1. If the disks have a serial number assigned to them (not sure if that's possible in RHEV-M, but it's certainly possible in libvirt/qemu) then you should be able to refer to the disks by a path such as /dev/disk/by-id/...
  2. Assign known UUIDs or LABELs to the filesystems in the disks.  That'll let you mount them using a UUID, the device name won't matter.

 

At present neither fs was defined on shared disks .

I tend  to configure the udev rules for the /dev/vdX  devices but I cannot reveal their UUID   to edit /etc/udev/rules.d/ file and assign a names for my  devices   . But  the following command  didn't give any output 

#scsi_id --device=/dev/vdb  

The same result  with :# /sbin/scsi_id -g -u -d /dev/vdb

I wanted to enable UUID  by editing the  /etc/scsi_id.config   but doesn't exist although  should be :

# rpm -qc udev-147-2.46.el6.x86_64
/etc/scsi_id.config
/etc/sysconfig/udev
/etc/udev/udev.conf

# ll /etc/scsi_id.config
ls: cannot access /etc/scsi_id.config: No such file or directory.

Create a new one ? Is there its  example for  RH6 ?

I ran  "udevadm test /block/vdc"  - it  has a lot of output   but I found this line:

node_symlink: preserve already existing symlink '/dev/disk/by-id/virtio-63a5887e-5b49-4f87-b' to '../../vdb'

Is the virtio-6cc66b28-c7c0-4def-8  may be used in the udev rules  as UUID  ( UUID is 63a5887e-5b49-4f87-b ) ?

/Vlad.

 

 

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.