<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    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?<br>
    <br>
    Thanks,<br>
    Herbert.<br>
    <br>
    <div class="moz-cite-prefix">On 10/29/12 12:19 AM, neo3 matrix
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAGF-398QHXDD0E+tjmkBp75wk9Q932m25g0g-WsrU2Fj_8-N2A@mail.gmail.com"
      type="cite">Thank you John and Grzegorz  for your quick replies. 
      <div>Sorry for late reply (as I was not in town).</div>
      <div><br>
      </div>
      <div>Basically, I am working on a Disaster Recovery software whose
        disk logic is totally dependent on disk mapping .</div>
      <div><br>
      </div>
      <div>Even in my project, I should be able to map a disk from one
        OS on Xenserver to other OS on other Xenserver.</div>
      <div><br>
      </div>
      <div>So, as John suggested, </div>
      <div>>>> "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."</div>
      <div>Here, I can't use vbd-XXX names as they differ from one guest
        OS to other and one Xenserver to other.</div>
      <div>Also, changing the Xenserver setting in VM definition file is
        in customer's hand which I cannot control.</div>
      <div><br>
      </div>
      <div>
        <div>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.</div>
      </div>
      <div><br>
      </div>
      <div>So, to map disks from one xenserver to other, I need some
        mapping mechanism like host:channel:id:lun </div>
      <div>OR </div>
      <div>the way "lscsci" command gives output which is similar in
        other Xenserver as well and I can be able to map disks.</div>
      <div><br>
      </div>
      <div>Can you please help me out in the same?</div>
      <div><br>
      </div>
      <div>Thank you for your valuable suggestions.</div>
      <div><br>
      </div>
      <div>Regards,</div>
      <div>Neo</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
        <br>
        <div class="gmail_quote">On Fri, Oct 19, 2012 at 1:08 PM, John
          Haxby <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:john.haxby@gmail.com" target="_blank">john.haxby@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <br>
            <br>
            <div class="gmail_quote">
              <div class="im">On 19 October 2012 07:32, neo3 matrix <span
                  dir="ltr"><<a moz-do-not-send="true"
                    href="mailto:neo3matrix@gmail.com" target="_blank">neo3matrix@gmail.com</a>></span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div>Hi all,</div>
                  <div><br>
                  </div>
                  <div>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.</div>
                  <div><br>
                  </div>
                  <div>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.</div>
                  <div><br>
                  </div>
                  <div>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. </div>
                  <br>
                </blockquote>
              </div>
              <div><br>
                <br>
                Oooh.   Complicated question.<br>
                <br>
                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.<br>
                <br>
                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.<br>
                <br>
                Even more good news: you don't need to use the /dev/sdX,
                /dev/xvdX, etc names at all.<br>
                <br>
                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).<br>
                <br>
                Running "blkid" (as root) is quite useful as well.<br>
                <br>
                jch<br>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            rhelv6-list mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:rhelv6-list@redhat.com">rhelv6-list@redhat.com</a><br>
            <a moz-do-not-send="true"
              href="https://www.redhat.com/mailman/listinfo/rhelv6-list"
              target="_blank">https://www.redhat.com/mailman/listinfo/rhelv6-list</a><br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rhelv6-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rhelv6-list@redhat.com">rhelv6-list@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/rhelv6-list">https://www.redhat.com/mailman/listinfo/rhelv6-list</a></pre>
    </blockquote>
    <br>
  </body>
</html>