WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] About tape drive.

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] About tape drive.
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Tue, 11 Mar 2008 19:51:30 +0000
Cc: Ivan Gonzalez <smaug_valley@xxxxxxxxx>, Nico Kadel-Garcia <nkadel@xxxxxxxxx>
Delivery-date: Tue, 11 Mar 2008 12:52:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47D281DD.8020006@xxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <801946.57080.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <47D281DD.8020006@xxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)
> Save yourself some grief. If the tape drive is being used to write image
> files, or even directory backups, to a tape drive, you can play some
> games after the DomU is running to make its internal partitions
> mountable in Dom0 in read-only mode and do the backup from there.

Hmmmm.  I generally don't recommend mounting filesystems of running domUs in 
dom0, even in read-only form: it can confuse the filesystem driver in dom0, 
potentially leading (in the worst case) to system instability, corrupted data 
being read for the backup, etc.  I imagine there are also potential security 
implications (e.g. privileged data ending up in unprivileged files) for the 
guest's filesystem.

Backing up the disk image of a running guest is not ideal either, because it 
will certainly be in an inconsistent state and need fsck to attempt to repair 
the damage if you want to mount / boot it in future.  The same corruption / 
security problems apply here too, but it shouldn't make dom0 or domU unstable 
at the time of the backup.

It's best to backup disk images of cleanly shutdown guests.  Or you could 
backup the disk of a guest which has been xm save-ed *and* back up the 
guest's memory image at the same time.  The two together contain all the 
information needed to consistently read the disk when the guest is resumed, 
although the disk image can't be mounted on it's own (and, if you do, you 
won't be able to safely resume the guest afterwards!).

> > Well i want to write some information (not a complete
> > backup) from my Virtual Machine to the tape drive, but
> > the VM can't read it.
> >
> > I guess i need to attach this device to the VM so it
> > can read and write the tape driver but i don't know
> > how to do that, i found something similar but with a
> > cd:

You can't attach a character device to a guest in the same way you'd attach a 
block device.  Your options would probably be:
a) use PCI passthrough
b) patch your kernels with the experimental SCSI passthrough drivers from 
xen-devel, then passthrough the tape device (if it's SCSI)
c) attempt to use USB passthrough, if appropriate, if your guest is HVM (i'm 
not sure this is very performant / reliable, though).

For tape backups of files within the guest, I generally recommend using a 
network based backup program, as if you had another physical host.  It's not 
optimal but it's simple and avoids some nasty tripups / complexities involved 
in trying to do anything cleverer.

Cheers,
Mark

-- 
Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/)

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>