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

Re: [Xen-users] Convert LVM to Images



On 2013-04-04 23:56:49 agya naila wrote:
> Hi Jacek,
> 
> LVM used for my DomU installation, that why I am looking for best practices
> to ensure the file didn't damage, is it safe using lvresize or lvreduce?

No.
You have to shrink the filesystem that's contained in the LV first.
How to do that depends on the filesystem your domU is using on the LV. For 
recent linux filesystems (ext3/4, btrfs, reiserfs, xfs, ...) there are tools to 
do that. For Windows (NTFS) I think you have to do it in the domU itself.

Another option would be to just make sure the free space is "filled by zeros" 
(eg. temporarily fill it with "large empty files") and then create a sparse 
image:

   dd if=... of=... bs=1M conv=sparse
   (use "ls -ls" to see the actually used size of the resulting file!)


- peter.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.