On Thu, Nov 12, 2009 at 6:18 PM, Geert Janssens <info@xxxxxxxxxxxx> wrote:
On Thursday 12 November 2009, you wrote:I did some tests just to be sure. As far as I can tell, dd interacts with lvm
> > dd if=/dev/virtualmachines/windows7-x64 of=mbr.w7-x64 bs=512 count=1
>
> I think if you do this, you are only backing up the first 512 bytes of the
> logical volume, not the MBR.
>
> Someone correct me if I am wrong.
in exactly the same way as with a physical disk or a loop device.
In the test I copied the first sector directly from the lvm partition or via
the loop device. It results in exactly the same sector being copied.
Also, if you try fdisk -l on the lvm disk or the loop device, it results in
the same output.
Below is the output from my tests:
[root@aragorn:~]# losetup /dev/loop1 /dev/base/kobaltwit_f11_disk
[root@aragorn:~]# fdisk -l /dev/base/kobaltwit_f11_disk
Disk /dev/base/kobaltwit_f11_disk: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id/dev/base/kobaltwit_f11_disk1 * 1 1305 10482381 83
System
Linux
[root@aragorn:~]# fdisk -l /dev/base/kobaltwit_f11_disk
Disk /dev/base/kobaltwit_f11_disk: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id/dev/base/kobaltwit_f11_disk1 * 1 1305 10482381 83
System
Linux
[root@aragorn:~]# dd if=/dev/base/kobaltwit_f11_disk of=mbr.lvm bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 7.6e-05 seconds, 6.7 MB/s
[root@aragorn:~]# dd if=/dev/loop1 of=mbr.loop bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000151 seconds, 3.4 MB/s
[root@aragorn:~]# diff mbr.l*
[root@aragorn:~]#
These test seem to indicate to me that the lvm layer in completely transparent
to userland tools such as fdisk or dd.
So I still think the losetup step is superfluous and possibly causing
unnecessary overhead.
Geert
--
Kobalt W.I.T.
Web & Information Technology
Brusselsesteenweg 152
1850 Grimbergen
Tel : +32 479 339 655
Email: info@xxxxxxxxxxxx
Thank you!
I will omit the losetup step.
--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe@xxxxxxxxx
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore
-- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines