[rhelv6-list] How can I uniquely identify my disk in RHEL6 installed on Citrix Xenserver?

Herbert van den Bergh herbert.van.den.bergh at oracle.com
Mon Oct 29 15:12:17 UTC 2012


The hardware mapping is not going to be deterministic between servers.  
So you need to rely on some unique identifier stored in the contents of 
the virtual disks.  Which one you can use depends on how you backup and 
restore your virtual disks.  Where does your DR restore run?  In domU or 
in dom0?  And how exactly do you backup and restore the virtual disks?

Thanks,
Herbert.

On 10/29/12 12:19 AM, neo3 matrix wrote:
> Thank you John and Grzegorz  for your quick replies.
> Sorry for late reply (as I was not in town).
>
> Basically, I am working on a Disaster Recovery software whose disk 
> logic is totally dependent on disk mapping .
>
> Even in my project, I should be able to map a disk from one OS on 
> Xenserver to other OS on other Xenserver.
>
> So, as John suggested,
> >>> "The good news with Xen disks is that they really do have 
> deterministic slots.   The virtual disk in slot xvdb will >>> always 
> be xvdb (the "vbd-NNN" numbers simply refer to event channels."
> Here, I can't use vbd-XXX names as they differ from one guest OS to 
> other and one Xenserver to other.
> Also, changing the Xenserver setting in VM definition file is in 
> customer's hand which I cannot control.
>
> I can't try UUID as well for disk mapping  because the problem is 
> during disaster recovery process we used to repartition disks and due 
> to that UUID of disk and partitions gets changed.
>
> So, to map disks from one xenserver to other, I need some mapping 
> mechanism like host:channel:id:lun
> OR
> the way "lscsci" command gives output which is similar in other 
> Xenserver as well and I can be able to map disks.
>
> Can you please help me out in the same?
>
> Thank you for your valuable suggestions.
>
> Regards,
> Neo
>
>
>
>
> On Fri, Oct 19, 2012 at 1:08 PM, John Haxby <john.haxby at gmail.com 
> <mailto:john.haxby at gmail.com>> wrote:
>
>
>
>     On 19 October 2012 07:32, neo3 matrix <neo3matrix at gmail.com
>     <mailto:neo3matrix at gmail.com>> wrote:
>
>         Hi all,
>
>         I have installed RHEL6 as guest OS on Citrix Xen Server. After
>         installation of OS, I can see disk names as /dev/xvda,
>         /dev/xvdb instead of traditional convention like /dev/sda,
>         /dev/sdb on guest OS.
>
>         Generally, on physical machines, in /proc/scsi/scsi file, we
>         get a unique entry for every disk connected to the system. For
>         e.g. string "scsi02:00:00:01" indicates that this disk is
>         connected to the machine via Host=2, Channel=00, Id=00 Lun=01.
>         This helps me in my project to uniquely identify each and
>         every disk in scenarios where many times after reboot OR in
>         SAN boot cases OR in some Disaster Recovery procedures, disk
>         names might change from say /dev/sda to /dev/sdb after reboot.
>         But, this Host:Channel:ID:Lun combination remains same for
>         every disk and I can uniquely identify the disks though their
>         /dev/sd* names have changed.
>
>         For my project, on Citrix Xenserver, I need to know the unique
>         disk location for such Xen guest OS devices by which I can
>         easily identify disks across the reboots for the above
>         mentioned cases.
>
>
>
>     Oooh.   Complicated question.
>
>     To start with, those SCSI-type disk identifiers are not as
>     deterministic as you might hope.  "Host=2" merely refers to the
>     SCSI controller that was discovered at position number 2.   These
>     days, discovery order counts for nothing: devices are discovered
>     and initialised concurrently, more or less, so while you might get
>     devices discovered in the "right" order almost all the time, you
>     might find that powering on a machine on a particularly cold
>     morning changes the order in which things are discovered.   Even
>     worse, if what used to be /dev/sdb goes AWOL then you're not left
>     with a hole in the sequence, everything from what used to be
>     /dev/sdc onwards gets renamed.
>
>     The good news with Xen disks is that they really do have
>     deterministic slots.   The virtual disk in slot xvdb will always
>     be xvdb (the "vbd-NNN" numbers simply refer to event channels,
>     they aren't random but they might as well be).  You would need to
>     edit the VM definition in the host to change the virtual disks.
>
>     Even more good news: you don't need to use the /dev/sdX,
>     /dev/xvdX, etc names at all.
>
>     If you look in /dev/disk you'll find several directories.  The one
>     you're probably most interested in is /dev/disk/by-uuid: entries
>     in /etc/fstab should be using the UUID= format to identify things
>     that aren't logical volumes (logical volumes are named within
>     their volume group and the physical volumes that make up a volume
>     group aren't tied to specific devices although they do have
>     specific UUIDs).
>
>     Running "blkid" (as root) is quite useful as well.
>
>     jch
>
>     _______________________________________________
>     rhelv6-list mailing list
>     rhelv6-list at redhat.com <mailto:rhelv6-list at redhat.com>
>     https://www.redhat.com/mailman/listinfo/rhelv6-list
>
>
>
>
> _______________________________________________
> rhelv6-list mailing list
> rhelv6-list at redhat.com
> https://www.redhat.com/mailman/listinfo/rhelv6-list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20121029/c04c807d/attachment.htm>


More information about the rhelv6-list mailing list