ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    XenServer 7.0: clone USB (without removing)

    IT Discussion
    xenserver 7.0 usb cloning virtualization xenserver
    9
    64
    9.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BRRABillB
      BRRABill @DustinB3403
      last edited by

      @DustinB3403 said in XenServer 7.0: clone USB (without removing):

      @BRRABill said in XenServer 7.0: clone USB (without removing):

      @scottalanmiller said in XenServer 7.0: clone USB (without removing):

      @BRRABill said in XenServer 7.0: clone USB (without removing):

      @scottalanmiller said in XenServer 7.0: clone USB (without removing):

      @BRRABill said in XenServer 7.0: clone USB (without removing):

      I'm just saying it did not work.

      And I was just saying that it must not have been attempted given the error. Someone tried to dd something else instead of the USB stick.

      So, what command would you use to use dd to clone my running XS USB boot device?

      
      NAME                                                                                            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
      sda                                                                                               8:0    0 447.1G  0 disk
      └─XSLocalEXT--40f7cced--9587--c38f--e152--057e4ec2b2d0-40f7cced--9587--c38f--e152--057e4ec2b2d0 253:0    0 447.1G  0 lvm  /run/sr-mount/40f7cced-9587-c38f-e152-057e4ec2b2d0
      sdb                                                                                               8:16   0 149.1G  0 disk
      ├─sdb1                                                                                            8:17   0    18G  0 part /
      ├─sdb2                                                                                            8:18   0    18G  0 part
      ├─sdb3                                                                                            8:19   0   512M  0 part
      ├─sdb5                                                                                            8:21   0     4G  0 part /var/log
      └─sdb6                                                                                            8:22   0     1G  0 part [SWAP]
      sr0                                                                                              11:0    1  1024M  0 rom
      tda                                                                                             254:0    0   100G  0 disk
      loop0                                                                                             7:0    0  54.8M  1 loop /var/xen/xc-install
      [
      

      Which of those is the USB stick?

      I figured you'd know!

      /sdb

      /sdb1 is the 18GB XenServer host control domain (dom0) partition
      /sdb2 is the backup parittion
      /sdb3 is the UEFI boot partition
      /sdb5 is the logs partition
      /sdb6 is the swap partition

      You have to clone the entire drive though, you can't just pick and chose. Otherwise it's not cloning a working, bootable drive, just a partition on the drive.

      That's what I thought, but @scottalanmiller said that also copies the partitioning scheme. Which I thought you would want, but it sounded negative.

      1 Reply Last reply Reply Quote 0
      • BRRABillB
        BRRABill
        last edited by

        @scottalanmiller

        Can we pick this discussion back up?

        Maybe explain what you meant by:
        "You have to copy what there is to where you want it. If the filesystem is on /dev/sda1 you don't want /dev/sda or you are copying the partitioning layer with it."

        scottalanmillerS 1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @BRRABill
          last edited by

          @BRRABill said in XenServer 7.0: clone USB (without removing):

          @scottalanmiller

          Can we pick this discussion back up?

          Maybe explain what you meant by:
          "You have to copy what there is to where you want it. If the filesystem is on /dev/sda1 you don't want /dev/sda or you are copying the partitioning layer with it."

          Correct. /dev/sda1 is a single partition. /dev/sda is a full device. If you dd /dev/sda, you are getting the entire device, including the partition table. If you dd /dev/sda1 you are only getting the contents of the one partition.

          BRRABillB 1 Reply Last reply Reply Quote 0
          • BRRABillB
            BRRABill @scottalanmiller
            last edited by

            @scottalanmiller said in XenServer 7.0: clone USB (without removing):

            @BRRABill said in XenServer 7.0: clone USB (without removing):

            @scottalanmiller

            Can we pick this discussion back up?

            Maybe explain what you meant by:
            "You have to copy what there is to where you want it. If the filesystem is on /dev/sda1 you don't want /dev/sda or you are copying the partitioning layer with it."

            Correct. /dev/sda1 is a single partition. /dev/sda is a full device. If you dd /dev/sda, you are getting the entire device, including the partition table. If you dd /dev/sda1 you are only getting the contents of the one partition.

            So...

            dd /dev/sda /dev/sdb

            would be what we are looking for to clone the entire USB device to anotehr blank one to allow it to be used for DR purposes?

            scottalanmillerS travisdh1T 2 Replies Last reply Reply Quote 1
            • scottalanmillerS
              scottalanmiller @BRRABill
              last edited by

              @BRRABill said in XenServer 7.0: clone USB (without removing):

              @scottalanmiller said in XenServer 7.0: clone USB (without removing):

              @BRRABill said in XenServer 7.0: clone USB (without removing):

              @scottalanmiller

              Can we pick this discussion back up?

              Maybe explain what you meant by:
              "You have to copy what there is to where you want it. If the filesystem is on /dev/sda1 you don't want /dev/sda or you are copying the partitioning layer with it."

              Correct. /dev/sda1 is a single partition. /dev/sda is a full device. If you dd /dev/sda, you are getting the entire device, including the partition table. If you dd /dev/sda1 you are only getting the contents of the one partition.

              So...

              dd /dev/sda /dev/sdb

              would be what we are looking for to clone the entire USB device to anotehr blank one to allow it to be used for DR purposes?

              Correct

              BRRABillB 1 Reply Last reply Reply Quote 0
              • travisdh1T
                travisdh1 @BRRABill
                last edited by

                @BRRABill said in XenServer 7.0: clone USB (without removing):

                @scottalanmiller said in XenServer 7.0: clone USB (without removing):

                @BRRABill said in XenServer 7.0: clone USB (without removing):

                @scottalanmiller

                Can we pick this discussion back up?

                Maybe explain what you meant by:
                "You have to copy what there is to where you want it. If the filesystem is on /dev/sda1 you don't want /dev/sda or you are copying the partitioning layer with it."

                Correct. /dev/sda1 is a single partition. /dev/sda is a full device. If you dd /dev/sda, you are getting the entire device, including the partition table. If you dd /dev/sda1 you are only getting the contents of the one partition.

                So...

                dd /dev/sda /dev/sdb

                would be what we are looking for to clone the entire USB device to anotehr blank one to allow it to be used for DR purposes?

                Almost. Might want to specify block size to copy to speed things up, but that's all that's required. To copy sdb to sda...

                dd if=/dev/sdb of=/dev/sda bs=512k
                
                stacksofplatesS 1 Reply Last reply Reply Quote 1
                • stacksofplatesS
                  stacksofplates @travisdh1
                  last edited by

                  @travisdh1 said in XenServer 7.0: clone USB (without removing):

                  @BRRABill said in XenServer 7.0: clone USB (without removing):

                  @scottalanmiller said in XenServer 7.0: clone USB (without removing):

                  @BRRABill said in XenServer 7.0: clone USB (without removing):

                  @scottalanmiller

                  Can we pick this discussion back up?

                  Maybe explain what you meant by:
                  "You have to copy what there is to where you want it. If the filesystem is on /dev/sda1 you don't want /dev/sda or you are copying the partitioning layer with it."

                  Correct. /dev/sda1 is a single partition. /dev/sda is a full device. If you dd /dev/sda, you are getting the entire device, including the partition table. If you dd /dev/sda1 you are only getting the contents of the one partition.

                  So...

                  dd /dev/sda /dev/sdb

                  would be what we are looking for to clone the entire USB device to anotehr blank one to allow it to be used for DR purposes?

                  Almost. Might want to specify block size to copy to speed things up, but that's all that's required. To copy sdb to sda...

                  dd if=/dev/sdb of=/dev/sda bs=512k
                  

                  You're conservative lol. I usually do 4M

                  travisdh1T 1 Reply Last reply Reply Quote 1
                  • travisdh1T
                    travisdh1 @stacksofplates
                    last edited by

                    @stacksofplates said in XenServer 7.0: clone USB (without removing):

                    @travisdh1 said in XenServer 7.0: clone USB (without removing):

                    @BRRABill said in XenServer 7.0: clone USB (without removing):

                    @scottalanmiller said in XenServer 7.0: clone USB (without removing):

                    @BRRABill said in XenServer 7.0: clone USB (without removing):

                    @scottalanmiller

                    Can we pick this discussion back up?

                    Maybe explain what you meant by:
                    "You have to copy what there is to where you want it. If the filesystem is on /dev/sda1 you don't want /dev/sda or you are copying the partitioning layer with it."

                    Correct. /dev/sda1 is a single partition. /dev/sda is a full device. If you dd /dev/sda, you are getting the entire device, including the partition table. If you dd /dev/sda1 you are only getting the contents of the one partition.

                    So...

                    dd /dev/sda /dev/sdb

                    would be what we are looking for to clone the entire USB device to anotehr blank one to allow it to be used for DR purposes?

                    Almost. Might want to specify block size to copy to speed things up, but that's all that's required. To copy sdb to sda...

                    dd if=/dev/sdb of=/dev/sda bs=512k
                    

                    You're conservative lol. I usually do 4M

                    I like using the same block size as the drives use internally, so either 512k or 4M.

                    1 Reply Last reply Reply Quote 1
                    • BRRABillB
                      BRRABill
                      last edited by

                      OK, now that we have that established ... should that work on a running boot device?

                      1 Reply Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch
                        last edited by

                        What I want to know is WTF are you all trying to do this for in the first place.

                        No one cares about cloning VMWare or Hyper-V boot partitions. You just reinstall and attach manually in the even of a complete failure.

                        FATeknollogeeF BRRABillB 2 Replies Last reply Reply Quote 0
                        • FATeknollogeeF
                          FATeknollogee @JaredBusch
                          last edited by

                          @JaredBusch said in XenServer 7.0: clone USB (without removing):

                          What I want to know is WTF are you all trying to do this for in the first place.

                          No one cares about cloning VMWare or Hyper-V boot partitions. You just reinstall and attach manually in the even of a complete failure.

                          Isn't all the VM metadata (aka config) on the USB stick?

                          JaredBuschJ 1 Reply Last reply Reply Quote 0
                          • JaredBuschJ
                            JaredBusch @FATeknollogee
                            last edited by

                            @FATeknollogee said in XenServer 7.0: clone USB (without removing):

                            @JaredBusch said in XenServer 7.0: clone USB (without removing):

                            What I want to know is WTF are you all trying to do this for in the first place.

                            No one cares about cloning VMWare or Hyper-V boot partitions. You just reinstall and attach manually in the even of a complete failure.

                            Isn't all the VM metadata (aka config) on the USB stick?

                            Then there should be a backup process for that so you can just reattach.

                            FATeknollogeeF 1 Reply Last reply Reply Quote 0
                            • FATeknollogeeF
                              FATeknollogee @JaredBusch
                              last edited by FATeknollogee

                              @JaredBusch said in XenServer 7.0: clone USB (without removing):

                              @FATeknollogee said in XenServer 7.0: clone USB (without removing):

                              @JaredBusch said in XenServer 7.0: clone USB (without removing):

                              What I want to know is WTF are you all trying to do this for in the first place.

                              No one cares about cloning VMWare or Hyper-V boot partitions. You just reinstall and attach manually in the even of a complete failure.

                              Isn't all the VM metadata (aka config) on the USB stick?

                              Then there should be a backup process for that so you can just reattach.

                              I thinks that's what this whole process is attempting to accomplish.
                              I do agree with you, this should all have been "baked in" from the get go..

                              1 Reply Last reply Reply Quote 0
                              • BRRABillB
                                BRRABill @JaredBusch
                                last edited by

                                @JaredBusch said in XenServer 7.0: clone USB (without removing):

                                What I want to know is WTF are you all trying to do this for in the first place.

                                No one cares about cloning VMWare or Hyper-V boot partitions. You just reinstall and attach manually in the even of a complete failure.

                                I don't know. Just following out the original thread/thought to its conclusion.

                                Is this on 30 post thread cluttering up the resources on ML? If so, I apologize.

                                In all seriousness, it's more for speed. You have a failure, you're back up and running in the time it takes the server to reboot.

                                Otherwise you need to reinstall, then reattach the SRs, then hope you have your metadata backed up.

                                FATeknollogeeF 1 Reply Last reply Reply Quote 0
                                • FATeknollogeeF
                                  FATeknollogee @BRRABill
                                  last edited by

                                  @BRRABill said in XenServer 7.0: clone USB (without removing):

                                  @JaredBusch said in XenServer 7.0: clone USB (without removing):

                                  What I want to know is WTF are you all trying to do this for in the first place.

                                  No one cares about cloning VMWare or Hyper-V boot partitions. You just reinstall and attach manually in the even of a complete failure.

                                  I don't know. Just following out the original thread/thought to its conclusion.

                                  Is this on 30 post thread cluttering up the resources on ML? If so, I apologize.

                                  In all seriousness, it's more for speed. You have a failure, you're back up and running in the time it takes the server to reboot.

                                  Otherwise you need to reinstall, then reattach the SRs, then hope you have your metadata backed up.

                                  Is there a separate process for backing up metadata?

                                  BRRABillB 1 Reply Last reply Reply Quote 0
                                  • BRRABillB
                                    BRRABill @FATeknollogee
                                    last edited by

                                    @FATeknollogee said

                                    Is there a separate process for backing up metadata?

                                    Yes. You can do that through the XS console.

                                    It's not mandatory, but if you have a boot failure, when you reinstall XS and reattach the SR, you'll just have a bunch of virtual disks.

                                    FATeknollogeeF 1 Reply Last reply Reply Quote 0
                                    • FATeknollogeeF
                                      FATeknollogee @BRRABill
                                      last edited by

                                      @BRRABill said in XenServer 7.0: clone USB (without removing):

                                      @FATeknollogee said

                                      Is there a separate process for backing up metadata?

                                      Yes. You can do that through the XS console.

                                      It's not mandatory, but if you have a boot failure, when you reinstall XS and reattach the SR, you'll just have a bunch of virtual disks.

                                      Console only, it's not available via XC GUI?

                                      BRRABillB 1 Reply Last reply Reply Quote 0
                                      • BRRABillB
                                        BRRABill @FATeknollogee
                                        last edited by

                                        @FATeknollogee said

                                        Console only, it's not available via XC GUI?

                                        No.

                                        I believe it is also available through the CLI as well, though I have not used it that way.

                                        FATeknollogeeF 1 Reply Last reply Reply Quote 0
                                        • FATeknollogeeF
                                          FATeknollogee @BRRABill
                                          last edited by

                                          @BRRABill
                                          You backup the metadata to the same USB stick or do you need a 2nd stick?

                                          How do you restore the metadata?

                                          BRRABillB 1 Reply Last reply Reply Quote 0
                                          • BRRABillB
                                            BRRABill @FATeknollogee
                                            last edited by

                                            @FATeknollogee said in XenServer 7.0: clone USB (without removing):

                                            @BRRABill
                                            You backup the metadata to the same USB stick or do you need a 2nd stick?

                                            How do you restore the metadata?

                                            Not to the stick. It backs up to the SR. You also restore from the XS console.

                                            FATeknollogeeF 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post