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
-
@Danp said in Cloning XenServer on USB or SD:
Can you use dd to save it to a file, which can then be pushed to a different USB stick later?
dd if=dev/sda1 of=/tmp/mybootusb.iso
-
Where was all this when I was talking about ways to do this remotely??
dd makes an exact clone?
-
@BRRABill said in Cloning XenServer on USB or SD:
Where was all this when I was talking about ways to do this remotely??
dd makes an exact clone?
Yep.
-
@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
Is sda1 the device being copied from or is sdb1 the device being copied?
-
Just guessing, but
if
= input file andof
= output file -
@Danp said in Cloning XenServer on USB or SD:
Just guessing, but
if
= input file andof
= output fileThat is a rational guess.
-
@DustinB3403 That's me... Mr. Rational.
-
@Danp said in Cloning XenServer on USB or SD:
Just guessing, but
if
= input file andof
= output fileYup, that's what they mean.
-
How does dd (and CloneZilla too, I presume) work if the drive you are cloning to is larger.
Say I have a 32GB and clone to a 64GB. Can you do that? Does it just leave empty space on the larger drive?
I was wondering if you could clone to a larger drive, that I could clone my 32GB boot USB to a 64GB USB, THEN run the upgrade so it will use the larger partition sizes.
-
@BRRABill said in Cloning XenServer on USB or SD:
How does dd (and CloneZilla too, I presume) work if the drive you are cloning to is larger.
Say I have a 32GB and clone to a 64GB. Can you do that? Does it just leave empty space on the larger drive?
It's a straight copy, block by block. It doesn't care what size the drive is. It just writes to it identically. It ignores that the device might be larger. It will clone to smaller too and just fails when it fills up too quickly.
-
@scottalanmiller said
It's a straight copy, block by block. It doesn't care what size the drive is. It just writes to it identically. It ignores that the device might be larger. It will clone to smaller too and just fails when it fills up too quickly.
So what I want to do should theoretically work?
-
@BRRABill said in Cloning XenServer on USB or SD:
@scottalanmiller said
It's a straight copy, block by block. It doesn't care what size the drive is. It just writes to it identically. It ignores that the device might be larger. It will clone to smaller too and just fails when it fills up too quickly.
So what I want to do should theoretically work?
You'd be able to write to a larger device, but trying to change the partitions by hand seems like a bad idea.
-
@DustinB3403 said
You'd be able to write to a larger device, but trying to change the partitions by hand seems like a bad idea.
I wouldn't do it by hand. I am ASSUMING (lol) that the XS upgrade would do that for me, as I think it says it does.
-
Clonezilla has and expert option that allows you to set additional settings to grow the partitions proportionally to fill the larger disk.
You can also restore to a smaller disk, as long as your data portion is smaller than the actual amount of space on the new drive, but it's much more difficult to get to work.
-
@Dashrender said
You can also restore to a smaller disk, as long as your data portion is smaller than the actual amount of space on the new drive, but it's much more difficult to get to work.
And requires a degree in wizardry! LOL.
-
@BRRABill said in Cloning XenServer on USB or SD:
@Dashrender said
You can also restore to a smaller disk, as long as your data portion is smaller than the actual amount of space on the new drive, but it's much more difficult to get to work.
And requires a degree in wizardry! LOL.
Where's my Wizard Hat?
-
@scottalanmiller said
It's a straight copy, block by block. It doesn't care what size the drive is. It just writes to it identically. It ignores that the device might be larger. It will clone to smaller too and just fails when it fills up too quickly.
So I did this today, but ran into a problem.
The 64GB USB stick is reporting as a 32GB stick, just like the original 32GB.
Like there isn't even 30GB of unused partitions, it thinks the 64GB stick is only 32GB.
I also tried the program @DustinB3403 mentioned in his writeup, but that program even warns this is going to be a problem.
"Warning: Due to the forensic nature of image duplication by ImageUSB, please ensure that you select UFDs with a storage size similar to the image you wish to duplicate. For example, if a 2GB image is copied to an 8GB USB Flash Drive, the drive will only be able to use two out of the eight gigabytes of storage space. In this scenario, users will need to reformat the UFD in order to access the rest of the storage space."So is there really any way to do what I am trying to do?
-
This will allow you to extend partitions.
-
You would still be able to make changes to the FS on the USB once its completed, but as I said, changing a live partition isn't a trivial task.
With XenServer the installation creates two partitions, of which you should be able to easily adjust the size of the non-active partition. But the boot partition, that is a whole other issue.
It's possible, but likely not worth the effort.