Xen mount guest in dom0

Discussion in 'Server Operation' started by luchs3, Aug 25, 2008.

  1. luchs3

    luchs3 New Member


    I have a xen 3.2 install with 3 guests.
    I'd like to backup them on my tape drive with the dom0.

    Could there be any problem when I mount a domU with ro in my dom0?

    It generally works, but I don't want to crash the system.

    Thanks Niko
  2. falko

    falko Super Moderator ISPConfig Developer

    You mean you want to mount the domU disk on dom0 read-only? I don't think there's a problem in doing so. :)
  3. kcharoen

    kcharoen New Member

    If you backup while system is live, you may face the consistency issues. You should pause the VMs, mount then backup.

    Another solution, I can think of to minimize the downtime during backup is to use LVM snapshot.
    1. pause
    2. Snapshot
    3. unpause
    then you can backup the snapshot while the VM is running.
    Last edited: Sep 20, 2008
  4. luchs3

    luchs3 New Member

    The problem is that I can't have any downtime.
    Is this possibility of consistence issues described somewhere?
    I think because of the different open file strategy on linux there shouldn't be a problem to mount it in Read only mode and read the files.
  5. kcharoen

    kcharoen New Member

    If you mount the images with ro while the system is live, what will happen if the server need to write something to the disk, what about log files?

    Why don't you access the guest directly (w/o mounting on dom0)? then use tools like Amanda/Bacula to backup??
  6. luchs3

    luchs3 New Member

    the guest is in an unsecure network and the mounting would be just to get the files on tape.
    So there wouldn't be any need to write something on the guest fs.
    I'm looking for an easy (I think mount -> tar->umount is quite easy) and secure way to backup all my guests without downtime or network traffic.

    I think if this is stable, it would be usefull for may people.
  7. kcharoen

    kcharoen New Member

    don't forget that DomU's OS doesn't aware that you mount the f/s from dom0. It could write anything to the disk at anytime. It will produce unexpected results if the OS needs to write something but the disk is not writable.

    Or if you don't mount as r/o, your backup would be useless, if the data changes while backing up

    If the bandwidth and security are your concern, I would setup Amanda server on Dom0, then Amanda clients on domU's.
  8. luchs3

    luchs3 New Member

    I think you mean something different than I do.
    I mean that the guest mounts the partision at the start rw as usual.
    Once a day the dom0 also mounts the partition in ro to run the backup.

Share This Page