Milan Krstić
2007-Oct-24 01:33 UTC
[Xen-users] Using LVM snapshots to backup NTFS partitions for windows guests
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? Milan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2007-Oct-24 01:48 UTC
Re: [Xen-users] Using LVM snapshots to backup NTFS partitions for windows guests
Milan Krstić wrote:> 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. > >Try kpartx. Regards, Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
James Harper
2007-Oct-24 03:56 UTC
RE: [Xen-users] Using LVM snapshots to backup NTFS partitions forwindows guests
> 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). James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Amos Shapira
2007-Oct-24 04:13 UTC
Re: [Xen-users] Using LVM snapshots to backup NTFS partitions forwindows guests
On 24/10/2007, James Harper <james.harper@bendigoit.com.au> 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@lists.xensource.com http://lists.xensource.com/xen-users
Possibly Parallel Threads
- Can you convert Windows LVM domU to sparse img file?
- How do I create an initrd for a vm that is using lvm ?
- How to Backup and Restore MBR within Logical Volumes?
- Samba clients can't see partitions mounted via loop device from image files
- how to create bootable FreeDOS HDD or USB flash drive?