|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Using LVM snapshots to backup NTFS partitions forwindows
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 /dev/loop1
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,
--Amos
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|