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/
Home Products Support Community News


Re: [Xen-users] Using LVM snapshots to backup NTFS partitions forwindows

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Using LVM snapshots to backup NTFS partitions forwindows guests
From: "Amos Shapira" <amos.shapira@xxxxxxxxx>
Date: Wed, 24 Oct 2007 14:13:11 +1000
Delivery-date: Tue, 23 Oct 2007 21:14:00 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=UMmjGVoJY+kE1mmv66I0xf2E8PYDJPOaKwgC6Eer1Ec=; b=j7ZgKZG7XVtu3ZxcKBN00Nm5CVEpobtEvoftlqrmZlNuNfsU7n5SLB6n4/EsjRdx11VxOJkYo5uZc13Jfo/FNvfkgDheBlsf6SeOhCIiQL1mp+O3m+b06u+sgY0mbmBT+aPse30plkrRARdpeIbyFsg6KdqKHV26lDnPbUpP9zg=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=TpQyb4aXl0XwQXC3Jf1mH7aQhocqybgxje0jDIFaI444W5WgaMLuPRYLzB/thngYzM/mKcdM5R4QBvNQlPkiTjcezfWlutEjQR+4W2fUvjLldpwyo6P/MdN6BTTS1H0uCx0pSmCvxfHAuxl+5D32lNzGdFBtawtJN6vXqbtWhj4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D01249C56@trantor>
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: <57e9e3e40710231833k488f668vbd4feb8e3606a089@xxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D01249C56@trantor>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
On 24/10/2007, James Harper <james.harper@xxxxxxxxxxxxxxxx> wrote:
> Hi everyone!
> I've been reading this list for a while and I'm thinking that the best
> way to do backups is using LVM snapshots as discussed here several
> times.
> The problem is that when i use a LVM logical volume as windows disk,
> windows writes the partition table onto the LV so the LV itself is not
> a partition - it's a whole disk.
> lvm/device-mapper does not create the partition devices in /dev so i
> cannot mount/access the ntfs partitions with anything but fdisk, and i
> would like to use ntfsclone or similar.
> Is there any way around this?

In the past I have done this by using loopback with an offset, but you need to do a few sums to get that right (eg figure out where in the disk image each partition starts etc).

Not very complicated. I've been doing that a few times in the last few days while trying to get CentOS 5 installer running under Debian Etch with Xen 3.0.3.

"fdisk -l -u /dev/xen/lvm-name" will give you the offsets. The "Units = " line will give you the multiplier (always was 512 for me).
Then you can do:

Find an available loop device:

# losetup -f

Setup the loop device with the right offset, the `expr...` backtick will multiply the number you got from fdisk by 512:

# losetup -o `expr offset-from-fdisk \* 512` /dev/loop1 image-file-or-lvm

After that yuou can do
# mount /dev/loop1 /mnt/mount-point

This is on Debian Etch (mount package version 2.12).

Hope this helps,


Xen-users mailing list
<Prev in Thread] Current Thread [Next in Thread>