Hi all, i''ve a Problem :) I tried to resize a disk of my data guest from 100 to 400 GB. I did an lvresize /dev/xendata/data-disk -L 400G an it works. I started the Guest and did an df -h to check the size but there are still 100 G :( Can somebody tell me whats wrong? i dont want to lose my data at the Disk! The Machine is Debian Lenny and the guest OS also. King Regards Florian Rahmann alias Dexter _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Sep 8, 2009 at 10:03 AM, Florian Rahmann < admin@dexters-laboratory.de> wrote:> Hi all, > > i''ve a Problem :) > I tried to resize a disk of my data guest from 100 to 400 GB. > I did an lvresize /dev/xendata/data-disk -L 400G an it works. > I started the Guest and did an df -h to check the size but there are still > 100 G :( Can somebody tell me whats wrong? i dont want to lose my data at > the Disk! > > The Machine is Debian Lenny and the guest OS also. > > King Regards > Florian Rahmann > alias Dexter > >The container is bigger but the filesystem isn''t. Resizing an LV doesn''t make the FS any bigger. Log into the DomU and do a resize2fs <device>. You can do this while it''s mounted as long as the filesystem is getting bigger. Grant McWilliams Some people, when confronted with a problem, think "I know, I''ll use Windows." Now they have two problems. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Oh, and if you''ve partitioned the LV inside the guest, you''ll also need to resize the partition (BEFORE you do a resize2fs, etc.). There are two ways to do this - the safest is to use parted, which works if you''re using ext2/ext3 (and a couple other of the most popular filesystems - reiser, I think). The other method is to delete the partition and recreate it with the extended end points. This isn''t quite as safe and requires that 1) you''re start point for the partition is exactly the same as it was before, and 2) the partition is the last (or only) one on the LV. -Nick>>> On 2009/09/08 at 11:10, Grant McWilliams <grantmasterflash@gmail.com> wrote:On Tue, Sep 8, 2009 at 10:03 AM, Florian Rahmann <admin@dexters-laboratory.de> wrote: Hi all, i''ve a Problem :) I tried to resize a disk of my data guest from 100 to 400 GB. I did an lvresize /dev/xendata/data-disk -L 400G an it works. I started the Guest and did an df -h to check the size but there are still 100 G :( Can somebody tell me whats wrong? i dont want to lose my data at the Disk! The Machine is Debian Lenny and the guest OS also. King Regards Florian Rahmann alias Dexter The container is bigger but the filesystem isn''t. Resizing an LV doesn''t make the FS any bigger. Log into the DomU and do a resize2fs <device>. You can do this while it''s mounted as long as the filesystem is getting bigger. Grant McWilliams Some people, when confronted with a problem, think "I know, I''ll use Windows." Now they have two problems. -------- This e-mail may contain confidential and privileged material for the sole use of the intended recipient. If this email is not intended for you, or you are not responsible for the delivery of this message to the intended recipient, please note that this message may contain SEAKR Engineering (SEAKR) Privileged/Proprietary Information. In such a case, you are strictly prohibited from downloading, photocopying, distributing or otherwise using this message, its contents or attachments in any way. If you have received this message in error, please notify us immediately by replying to this e-mail and delete the message from your mailbox. Information contained in this message that does not relate to the business of SEAKR is neither endorsed by nor attributable to SEAKR. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Sep 8, 2009 at 11:26 AM, Nick Couchman <Nick.Couchman@seakr.com>wrote:> Oh, and if you''ve partitioned the LV inside the guest, you''ll also need > to resize the partition (BEFORE you do a resize2fs, etc.). There are two > ways to do this - the safest is to use parted, which works if you''re using > ext2/ext3 (and a couple other of the most popular filesystems - reiser, I > think). The other method is to delete the partition and recreate it with > the extended end points. This isn''t quite as safe and requires that 1) > you''re start point for the partition is exactly the same as it was before, > and 2) the partition is the last (or only) one on the LV. > > -Nick > >Yep, this is true. Boot the guest and cat /proc/partitions, it should reflect the increased disk size. If you have one partition on it start fdisk, delete the one partition (don''t sweat it, just DO NOT reboot in the middle) and create a new one with the same number and starting cylinder (probably the default cylinder for both start and end). Now save and exit. You''ll probably have to reboot the domU. Once rebooted do a resize2fs on the filesystem eg. *resize2fs /* and you''re done. If you used LVM in the domU then you can resize the LV the same way you did on the dom0 and then resize2fs the filesystem. If however that one LV is used in the domU as a harddrive (/dev/xvda) and you have multiple partitions things get messier. Hopefully the partition you want to resize is the last one and you can just follow the instructions above. If it''s in the middle you have a lot more work ahead. If you used LVM in the domU then you can resize the LV the same way you did on the dm0 and then resize2fs the filesystem. -- Grant McWilliams Some people, when confronted with a problem, think "I know, I''ll use Windows." Now they have two problems. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users