Hi all, I have my domU''s on an lvm partition 68GB in size. This is created from 1 pv - /dev/sdb1. My domU''s are 6GB in size. Using lvextend or lvresize on the domU partitions works nicely as lvdisplay shows the new size. However using df -h inside the domU still shows the original 6GB size as does opening a share on the domU in a windows or linux client. How do I get the new size to be available in the domU? Regards, John _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Depends on what OS you are using. For RHEL4, you can use either resize2fs (requires you to first run e2fsck), or (better choice) you can also run ext2online, which doesn''t require running e2fsck, but rather resizes it online. Ben -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of John S Little Sent: Friday, March 10, 2006 11:43 AM To: xen-users@lists.xensource.com Subject: [Xen-users] domU lvm and resizing Hi all, I have my domU''s on an lvm partition 68GB in size. This is created from 1 pv - /dev/sdb1. My domU''s are 6GB in size. Using lvextend or lvresize on the domU partitions works nicely as lvdisplay shows the new size. However using df -h inside the domU still shows the original 6GB size as does opening a share on the domU in a windows or linux client. How do I get the new size to be available in the domU? Regards, John _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users rs _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
John S Little wrote:> I have my domU''s on an lvm partition 68GB in size. This is created from 1 > pv - /dev/sdb1. My domU''s are 6GB in size. Using lvextend or lvresize on > the domU partitions works nicely as lvdisplay shows the new size. However > using df -h inside the domU still shows the original 6GB size as does > opening a share on the domU in a windows or linux client. How do I get > the new size to be available in the domU?Same way as resizing any LV ... after extending the LV must resize the filesystem on top of it. Use resize2fs, resize_reiserfs, xfs_growfs, etc. I have always shut down the domain and run the appropriate filesystem resize command within dom0, if you use an online resizeable filesystem then it may be possible to extend the filesystem within the domU without shutdown ... I wouldn''t count on it though. Definitely do not resize the filesystem from dom0 while the domU is running, I expect that may give the appearance of working but it will likely corrupt your filesystem. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fraser Campbell wrote:> Definitely do not resize the filesystem from dom0 while the domU is > running, I expect that may give the appearance of working but it will > likely corrupt your filesystem.Every time I''ve resized an LV inside of the dom0, the domU doesn''t pick up the new size until a reboot. Then resize2fs works just fine. I''ve never had any corruption with resizing an LV with a domU running. -- Christopher G. Stach II _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Saturday 11 March 2006 3:26 pm, Christopher G. Stach II wrote:> Fraser Campbell wrote: > > Definitely do not resize the filesystem from dom0 while the domU is > > running, I expect that may give the appearance of working but it will > > likely corrupt your filesystem. > > Every time I''ve resized an LV inside of the dom0, the domU doesn''t pick > up the new size until a reboot. Then resize2fs works just fine. I''ve > never had any corruption with resizing an LV with a domU running.Fraser advice it correct, do not resize the *filesistem* from dom0 while domU is running. resizing the *volume* is ok. it''s important to differentiate the two resizing steps. i think John''s original problem was that he did lvresize to resize the volume, but didn''t resize the filesystem. later he used resize2fs, but SuSE systems use mostly reiser, so he should''ve used resize_reiserfs. the first step (volume resizing, with lvresize) is usually done from dom0 (since domU usually sees a single volume, not the LVM); no harm doing it while domU is running, but it might have to be restarted to pick up the new volume size. (there should be a xend command to make it reread the new size and propagate it to the domU) the second step (filesystem resizing, with resize2fs, resize_reiserfs, etc) can either be done from the running domU (if the filesystem supports online resizing), or from dom0, with domU stopped (even with the most online-capable filesystem!!) -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ben> > The way I''ve done it in the past is: > > 1. Make sure that xen domain is shut down that you are re-sizingShutting it down before resizing did the trick. I had tried rebooting after resizing but it never would show up.> 2. Run lvextend (you''ve already done this) > 3. Run e2fsck -f [logical volume name] (i.e. /dev/domain0/lvname) > 4. Run resize2fs [volume name] [new size in G of LV] (i.e. resize2fs > /dev/domain0/lvname 8G > 5. Start up vm. New size should be reflected now. > > HTH > > JohnThanks! John _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier and all, First I want to thank all of you for your input. It helped me and will help others I''m sure. Because of the lack of detail (my bad!) it has caused some confusion.> > On Saturday 11 March 2006 3:26 pm, Christopher G. Stach II wrote: > > Fraser Campbell wrote: > > > Definitely do not resize the filesystem from dom0 while the domU is > > > running, I expect that may give the appearance of working but itwill> > > likely corrupt your filesystem.This was my first mistake. I tried to do it with domU live.> > > > Every time I''ve resized an LV inside of the dom0, the domU doesn''tpick> > up the new size until a reboot. Then resize2fs works just fine. I''ve > > never had any corruption with resizing an LV with a domU running. > > Fraser advice it correct, do not resize the *filesistem* from dom0 whiledomU> is running. resizing the *volume* is ok. it''s important todifferentiate> the two resizing steps. > > i think John''s original problem was that he did lvresize to resize > the volume, > but didn''t resize the filesystem.Actually I did but doing it live created the problem.> later he used resize2fs, but SuSE systems > use mostly reiser, so he should''ve used resize_reiserfs.After reading some horror stories about reiserfs/dom0 on top of reiserfs/domU I opted for reiserfs in dom0 but ext3 in domU. Whether there is in fact a problem I don''t know but I don''t want to find out on a production machine.> > the first step (volume resizing, with lvresize) is usually done fromdom0 did this> (since domU usually sees a single volume, not the LVM); no harm doing it> while domU is running, but it might have to be restarted to pick up thenew> volume size.did this too but it would not pick up the new size. After thinking about it if you have to reboot it you might as well shut it down for resize and avoid any possibility of corruption.> (there should be a xend command to make it reread the new size > and propagate it to the domU) > > the second step (filesystem resizing, with resize2fs, resize_reiserfs,etc)> can either be done from the running domU (if the filesystem supportsonline> resizing), or from dom0, with domU stopped (even with the mostonline-capable> filesystem!!)I did this from dom0. The first time with domU running which did not work. I then tried it with dom0 halted which work well. John _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Quoting John S Little <JSLittl@Hendricks.org>:> After reading some horror stories about reiserfs/dom0 on top of > reiserfs/domU I opted for reiserfs in dom0 but ext3 in domU. Whether > there is in fact a problem I don''t know but I don''t want to find out on a > production machine.I''ve heard those stories too. I think it happens when you run reiserfsck on a reiser volumes that contains other reiser volumes as disk images. shouldn''t happen with LVM, because then each volume stands on its own, not one inside the other. I''d like to reproduce the destruction; definitely should be reported to namesys as a bug in reiserfsck. apparently it''s because sometimes it''ll try to search for superblocks or other disk structures and find the ''inner'' volume''s structs and tries to apply them to the ''outer'' volume. Bad mojo, obviously... ------ Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users