We have a number of Xen virtual machines that use disk image files.

```
disk = ["file:/xen/vbd/something.vbd,sda1,w"]

```

We'd like to use DRBD to replicate these files for backup (as opposed to the mess of MySQL replication and nightly rsyncs we have at the moment). But I don't seem to understand how to make it work.

We can bind a file to a loopback device with `losetup`:

```
# losetup /dev/loop0 /xen/vbd/something.vbd

```

And point DRBD to that device:

```
device  /dev/drbd1;
disk    /dev/loop0;

```

But the loopback isn't stable - it isn't there on reboot, and could easily have been attached to loop1, loop2 etc. It isn't exactly a valid option for a server if it needs human interaction to recover with a power interruption.

What am I missing?