Open anarcat opened 2 years ago
I would actually opt to completly ditch the current import/export scripts and replace them with the versions from the noop
OS provider, which essentially uses dd
to make a bitwise copy of the disk.
This of course creates quite large exports and also exports potentially useless data (e.g. swap), but is guaranteed to work in all cases. The current logic is very prone to fail in various scenarios (differing disk layouts, xfs or other non-ext-filesystems etc.).
@saschalucas @apoikos @atta what do you think about this?
it's effectively what we did here.
@rbott yes i'm a 100% for you suggestion i can prepare a pull-request in order to get this common issue out of the way
it looks like ganeti is completely failing to export VMs that have a swap device. I created this instance with:
the swap is created through this hook, which basically does this:
when i try to export this instance, ganeti fails with:
it looks like it's failing on the dreaded
map_disk0
code fromcommon.sh
:https://github.com/ganeti/instance-debootstrap/blob/e0df6b1fd25dc3e111851ae42872df0a757ac4a9/common.sh.in#L110-L126
specifically, the output of this command is empty:
if i kill the second disk, the backup works.
so i guess the question is: are backups just broken with multiple devices? or is this specific to swap?
later code in the export function certainly has me worried about backing up anything but a raw ext2+ partition here:
https://github.com/ganeti/instance-debootstrap/blob/e0df6b1fd25dc3e111851ae42872df0a757ac4a9/export#L46-L49
... why don't we just dd the heck out of this anyways, as a fallback?