Volume by UUID and adding the disk to a xen Virtual Machine
by ac3bf1 on May.08, 2010, under Tutorials
Get the drive UUID by using the command vold_id
vol_id /dev/sda1
The string after “ID_FS_UUID=” is the UUID of the drive. Now open your /etc/fstab file and add the following line to the end. Replace the UUID string with your string, your mount point, and customize the other parameters if needed.
UUID=THE-UUID-HERE /mnt/USBDrive ext3 user,auto,rw 0 0
To then pass a disk to a xen virtual machine, look at the following lines of the domain config file:
disk = [ #...root partition and other partitions here... 'phy:/dev/disk/by-uuid/89b976bc-2f66-4b93-abfb-358d6227f8be,sda,w', 'phy:/dev/disk/by-uuid/1871b9a1-8055-4392-8a94-f5407ff37483,sdb,w', ]
basically instead of passing the disk as a /dev/sda1 device, pass it by UUID using the path:
/dev/disk/by-uuid/<the uuid>
Enjoy!

