0

Testing a potential disaster recovery model.

Use VMWare to get an OVF of a server at its base configuration. This will give us the base VM configuration (cpus, mem, disks, OS, etc). Stamp out VMs as needed.

Get a dd image of the disks and/or partitions nightly. This will give us a disk image for each server. Here is an example of how I have tried to capture the image file. In this case I am coping the entire sda. The image file is copied to a network resource.

dd if=/dev/sda | gzip -c >

So, in theory, in the event the server goes down in such a way we need to start the entire vm over, we deploy from template, then apply the disk image. Is this theory sound?

I am running into problems. The server presents disk and/or partition errors after applying the disk image. Some errors include:

blk_update_request: I/O error, dev fd0, sector 0

booting to dracut

I've followed up on these errors and they all point to disk / partition corruption. So, What am I doing wrong or not considering? Is there a better way? Considering Rsync...

Thanks in advance...

1 Answer 1

1

The problem with using dd is that you are copying blocks from the hard disk while it is changing (and in an inconsistent state, ex some blocks already written, some still in cache). This is very likely to result in a corrupted hdd. Using rsync improves on the situation on the file system level and is a huge step forward, but you might still be copying an inconsistent state (some files have already changed, some have not). Best case would be to pull a VM snapshot and copy that.

2
  • I am following up on rsync. Your point on changing / inconsistent state rang loud and clear. I am hoping to get around that by excluding certain directories with something like this: rsync -vaAX / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt/<LOCATIONX> The A and X attributes will likely be an issue as I'm coping to windows, but I'm still testing... Thanks again! Commented Mar 19, 2019 at 14:14
  • Are you able yo snapshot the underlying disk or pause the image while copying. Both would work because the data is consistent (but on boot the system would perceive it as a sudden crash and fsck)
    – davidgo
    Commented Mar 20, 2019 at 0:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .