determining correct size for LV copy operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I have some problems with copying LV volumes and determining correct size.
For instance, if I want to copy an LV from one machine to another. I dd 
the LV to a file on the other machine, then dd the file to the new LV.
That fails, because a few MB are missing.

source:
  LV Name                /dev/VolGroup01/LogVol01
  LV Size                4.62 GB

target:
  LV Name                /dev/xenvm/lvmtest1
  LV Size                4.62 GB

Both were created with lvcreate -L 4.62GB, but there's obviously a small 
rounding or whatever difference. The size of the physical extents seems to 
be different.

I can determine the size of the output file
-rw-r--r--  1 root root 4966055936 Apr 30 21:19 lvmtest1.img

That is 4849664K which is the smallest size unit that lvcreate accepts.
lvcreate -L 4849664K --name lvmtest1 xenvm - and then it fits.
But I hope there's a better way to determine the *exact* size?

Kai

-- 
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com



_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux