
ntfsclone / ntfscp; ntfs partition inside disk image file
Hi,
I am using xen to virtualize a Win2k8R2 Server. I am experimenting a little with a clone of that image.
But cloning 80GB on a RAID6 is really slow.
Instead of cloning I thought I could copy only the files i need to "restore" the clone to it's initial state
(i.e. copying the Windows folder (13GB )from the source disk image file to the cloned disk image file)
My idea was to:
- create a ram disk (15gb)
- create a temporary disk image inside that ram disk
- format the disk image with NTFS
- copy the Windows folder from my original Windows
- move the Windows folder to my clone
Sadly ntfscp seems not to be made to copy complete folders.
I read about some ntfscp.c / ntfscp.sh / ntfscp2.sh tools. Sadly neither of them is online.
Next attempt:
Using ntfsclone to save into a sparse file (should result in a 40 gig file, which i still could hold in a RAM disk)
This is the layout of the disk image file:
Code:
root@srv1:/mnt# fdisk -l /dev/vg0/win
Disk /dev/vg0/win: 80 GiB, 85899345920 bytes, 167772160 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xff4b223d
Device Boot Start End Sectors Size Id Type
/dev/vg0/win1 * 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/vg0/win2 206848 167770111 167563264 79,9G 7 HPFS/NTFS/exFAT
So I was able to mount the ntfs partition with it corresponding offset:
Code:
mount -o loop,offset=105906176 -t ntfs-3g /dev/vg0/win /mnt/win
But I am not able to use ntfsclone, because using it on the disk file image fails, because ntfsclone wants a partition.
Providing the mounted partition also fails, because it is a folder.
You guys have any idea how to solve that?
Thanks in advance!
Regards,
l_e