XenServer 7.0: clone USB (without removing)
-
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." -
@BRRABill said in XenServer 7.0: clone USB (without removing):
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.
-
@scottalanmiller said in XenServer 7.0: clone USB (without removing):
@BRRABill said in XenServer 7.0: clone USB (without removing):
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?
-
@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):
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
-
@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):
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
-
@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):
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
-
@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):
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.
-
OK, now that we have that established ... should that work on a running boot device?
-
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.
-
@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?
-
@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.
-
@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.. -
@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.
-
@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?
-
@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.
-
@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?
-
@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.
-
@BRRABill
You backup the metadata to the same USB stick or do you need a 2nd stick?How do you restore the metadata?
-
@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.
-
@BRRABill
In XC menu, there is Server, Back Up... and Server, Restore from Back Up...?