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

    Cloning XenServer on USB or SD

    IT Discussion
    7
    37
    4.2k
    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.
    • D
      DustinB3403
      last edited by

      You could do an inline upgrade, but the upgrade doesn't even change the partition sizes. Because it's far easier to break the system trying to resize partitions than it is to just reinstall.

      So yes, a clean install is recommended.

      B 1 Reply Last reply Reply Quote 0
      • B
        BRRABill @DustinB3403
        last edited by

        @DustinB3403 said

        So yes, a clean install is recommended.

        Hear ya loud and clear.

        Hopefully XS will allow me to transfer both directions for migrations, then none of this will be an issue.

        Or, I'll maybe just buy a refurb server from xByte for this purpose.

        1 Reply Last reply Reply Quote 0
        • R
          RamblingBiped
          last edited by

          This is the command I usually use to clone one drive to another identical drive.

           dd if=/dev/sdX of=/dev/sdY bs=512 conv=noerror,sync
          

          It uses the default block size to make a direct copy and keeps any errors from interrupting the process.

          I've had problems come from changing to a larger blocksize before, so I usually just stick with the default of 512. If you are going to be moving between disks/partitions of different sizes you'll just need to start with a smaller image and make sure you resize your partitions and fix the filesystems after cloning. If you have a standard image you are working from you can test this out and find the largest block size that is stable and works for your specific task.

          I wrote a small program in BASH that did a quick disk test/verification and automated the process of writing a standard image onto sd-cards of varying sizes (2GB up to 32GB) using dd and fdisk. It ended up replacing some old piece of software that ran on Windows and could not properly detect the newer larger capacity sd cards that our client wanted to start using.

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

            Strangely enough ImageUSB did it properly.

            But I'm not sure it's worth the risk of trying what I want to do.

            I'll get everything upgraded to XS7 and then start clean installing.

            1 Reply Last reply Reply Quote 2
            • B
              BRRABill @scottalanmiller
              last edited by

              @scottalanmiller said

              Assuming the devices refer to the two USB devices:

              dd if=dev/sda1 of=/dev/sdb1
              

              If you are doing the entire disk (such as with XS which creates multiple partitions) why wouldn't it be...

              dd if=/dev/sda of=/dev/sdb
              S 1 Reply Last reply Reply Quote 0
              • S
                scottalanmiller @BRRABill
                last edited by

                @BRRABill said in Cloning XenServer on USB or SD:

                @scottalanmiller said

                Assuming the devices refer to the two USB devices:

                dd if=dev/sda1 of=/dev/sdb1
                

                If you are doing the entire disk (such as with XS which creates multiple partitions) why wouldn't it be...

                dd if=/dev/sda of=/dev/sdb
                

                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.

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

                  @scottalanmiller said

                  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.

                  But if I want to make an exact clone of the USB for DR purposes, I'd want the partitioning layer, no?

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

                    @BRRABill said in Cloning XenServer on USB or SD:

                    @scottalanmiller said

                    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.

                    But if I want to make an exact clone of the USB for DR purposes, I'd want the partitioning layer, no?

                    Never tried that. Normally we partition manually. Maybe someone has tried this to know about reliability.

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

                      @scottalanmiller said in Cloning XenServer on USB or SD:

                      @DustinB3403 said in Cloning XenServer on USB or SD:

                      @scottalanmiller said in Cloning XenServer on USB or SD:

                      The standard tool for cloning is the dd command. No third party tools needed.

                      Can you provide a sample step by step, as I've not used DD on linux before and the documentation I've seen has been "sloppy" IMO.

                      Assuming the devices refer to the two USB devices:

                      dd if=dev/sda1 of=/dev/sdb1
                      

                      So the poster asked for an example to clone the USB boot device, and this is what was given.

                      Are you saying you'd dd each of the partitions individually?

                      I am now confused.

                      1 Reply Last reply Reply Quote 0
                      • S
                        scottalanmiller
                        last edited by

                        I assume that there is only one partition. You can check yours but there should not be multiple partitions.

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

                          @scottalanmiller said in Cloning XenServer on USB or SD:

                          I assume that there is only one partition. You can check yours but there should not be multiple partitions.

                          This is how XS7 sets it up, at least...

                          sdb                                                                 8:16   0  74.5G  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]
                          1 Reply Last reply Reply Quote 1
                          • 1
                          • 2
                          • 2 / 2
                          • First post
                            Last post