WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] File2LVM?


If you create the LV greater than the size of the file, once you have
dd it across, can you extend the root size ? all will it autodetect
the new size ?

create a larger LV, run the dd, then use resize2fs (assuming you're
using ext2/3) to extend the filesystem to the full LV size.

You can do this at any time. shutdown guest, extend LV, resize2fs, boot
guest back up (though lvresize has the --resizefs option too which just
runs resize2fs for you i think).
This works great if your filesystem is directly on the (raw) LV. However, if you've put a partition table on the LV, it's not as easy. I guess you have to edit the partition table to tell it the new size of the 'disk' (LV), and then find some way to extend your partitions (maybe parted?).

I tried to do this sometime back and experienced some weirdness with the cylinders/heads/sectors not being detected correctly (fancy that!), and never got the disk geometry entered correctly. Parted didn't like the resized LV, either, as I remember.

Might be that the easiest way to deal with this is from within a domU. Pass the LV to the domU as a second disk (xvdb), and partition the LV from within the domU. Then it's easy to use dd from within the domU (though you may be dding a running fs), or shut down the domU and use kpartx from the dom0 and dd between the mapped devices. You can use resize2fs on the newly dded device. Don't forget to kpartx -d!

   John


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>