hi, i have create my guest image with lvm so i ''d like to resize this image disk on my Dom0, i resized it and it works fine: # lvextend -L +1G /dev/srv/toto-disk i can see with the command "lvs" but when i connected to my guest DomU, i checked the size # df -h i found the same size like before the resize... did i forget something to have the new size of my guest image disk...? thanks in advance for any suggestions. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
hi, ko0nz schrieb:> did i forget something to have the new size of my guest image disk...?you''ve forgotten to resize the filesystem too. for example: ext2online /dev/hda5 or xfs_growfs / cu denny -- Stoppt den Überwachungswahn - Stoppt den Schäuble Katalog: http://www.nopsis.de _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sun, 2007-08-12 at 16:53 +0200, ko0nz wrote:> hi, > > i have create my guest image with lvm > so i ''d like to resize this image disk > on my Dom0, i resized it and it works fine: > # lvextend -L +1G /dev/srv/toto-disk > > i can see with the command "lvs" > > but when i connected to my guest DomU, i checked the size > # df -h > i found the same size like before the resize... > > did i forget something to have the new size of my guest image disk...? > > thanks in advance for any suggestions.Make sure you use the tools for whatever filesystem is on the lvm volume to resize the filesystem to take up all of the new space. As an example, resize2fs is what you''d use for ext2 filesystems. Bobby Coop> > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> Make sure you use the tools for whatever filesystem is on the lvm volume > to resize the filesystem to take up all of the new space. As an example, > resize2fs is what you''d use for ext2 filesystems.i did but nothing happened... how i did on my Dom0 : # lvresize -L 10g /dev/srv/apollon-disk # resize2fs /dev/srv/toto-disk # e2fsck -f /dev/srv/toto-disk when i did # lvs it does show my news size. when i run my DomU toto # xm create toto.cfg # xm console toto # df -h it does show the old size of guest DomU toto. what do think about this? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Sunday 12 August 2007 21:41:00 ko0nz wrote:> how i did on my Dom0 : > # lvresize -L 10g /dev/srv/apollon-disk^^^^^> # resize2fs /dev/srv/toto-disk^^> # e2fsck -f /dev/srv/toto-disk > > when i did > # lvs > > it does show my news size. >You should use resize2fs on the logical volume you just resized... Regards Stephan Wienczny _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I''m just replying to the list because I forgot to "reply to all", and it might help someone else with the same question. On 8/13/07, Marconi Rivello <marconirivello@gmail.com> wrote:> > Hey, > > There are a few problems with your commands: > 1: you did lvresize on one lv and resized the filesystem of another; > 2: you FIRST fsck -f the filesystem you want to resize, THEN you resize2fs > it. > > Beware: that works to INCREASE a filesystem. If you want to reduce it like > that, you will lose data. You need to first decrease the filesystem, then > the LV. > > But back to increasing it: > > # lvresize -L 10g /dev/srv/toto-disk > # e2fsck -f /dev/srv/toto-disk > # resize2fs /dev/srv/toto-disk > > That should do it. The first increases the "physical" space (since it''s > lvm), the second checks the filesystem for errors so resize2fs can extend it > without the risk of changing a damaged filesystem, which would result > (probably) in more damage. > > Hope that helps. > > On 8/12/07, ko0nz <yesiko0nz@gmail.com> wrote: > > > > > Make sure you use the tools for whatever filesystem is on the lvm > > volume > > > to resize the filesystem to take up all of the new space. As an > > example, > > > resize2fs is what you''d use for ext2 filesystems. > > > > i did but nothing happened... > > > > how i did on my Dom0 : > > # lvresize -L 10g /dev/srv/apollon-disk > > # resize2fs /dev/srv/toto-disk > > # e2fsck -f /dev/srv/toto-disk > > > > when i did > > # lvs > > > > it does show my news size. > > > > when i run my DomU toto > > # xm create toto.cfg > > # xm console toto > > # df -h > > > > it does show the old size of guest DomU toto. > > > > what do think about this? > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Aug 13, 2007 at 01:32:18PM -0300, Marconi Rivello wrote:> There are a few problems with your commands:I thought the main problem was that you cannot actually get a domU to see that a block device has been resized no matter what method you use. Have you ever actually done this? As far as I was aware, the size of the device is fixed when it is attached and can''t be changed between dom0/domU without detach and re-attach. Cheers, Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
"Marconi Rivello" <marconirivello@gmail.com> writes:> I''m just replying to the list because I forgot to "reply to all", and it might > help someone else with the same question. > > > On 8/13/07, Marconi Rivello <[[marconirivello@gmail.com]]> wrote: > > Hey, > > There are a few problems with your commands: > 1: you did lvresize on one lv and resized the filesystem of > another; > 2: you FIRST fsck -f the filesystem you want to resize, THEN > you resize2fs it.Note that for a few kernel versions ext2/3 has had online resizing (growing only). So you just lvresize and then resize2fs without having to umount or fsck. Much more fun.> Beware: that works to INCREASE a filesystem. If you want to > reduce it like that, you will lose data. You need to first decrease > the filesystem, then the LV. > > But back to increasing it: > > # lvresize -L 10g /dev/srv/toto-diskI prefer to specify the amount of growth here. Less danger of mistyping and getting a size smaller than you had. e.g. lvresize -L +1G /dev/srv/toto-disk But that might be just me. MfG Goswin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
ko0nz schrieb:> hi, > > i have create my guest image with lvm > so i ''d like to resize this image disk > on my Dom0, i resized it and it works fine: > # lvextend -L +1G /dev/srv/toto-disk > > i can see with the command "lvs" > > but when i connected to my guest DomU, i checked the size > # df -h > i found the same size like before the resize... > > did i forget something to have the new size of my guest image disk...?I think you forgot to resize the partition. fdisk is your friend :) Matthias _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> I thought the main problem was that you cannot actually get a domU > to see that a block device has been resized no matter what method > you use. > > Have you ever actually done this? As far as I was aware, the size > of the device is fixed when it is attached and can''t be changed > between dom0/domU without detach and re-attach.Attach / detach or a simple reboot of the guest will work, by causing a reprobe of the disk sizes. However, this strictly shouldn''t be necessary - older versions of Xen could actually get the guest to reprobe disk sizes. This still required an unmount / remount in the guest, but in principle it looked like even that shouldn''t be necessary if you were merely growing the device. Maybe this is something that should be flagged to be re-added? Cheers, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> did i forget something to have the new size of my guest image disk...?Just because your guest has a larger hard drive does not mean that the guest''s operating system knows what to do with it. Two things are required: 1. growing your partition 2. making your logical volume take in the extra partitioned space The below should work: % parted (parted) print Verify that the physical size of your disk matches the desired new size of the disk (parted) mkpart primary <begin> <end> "Begin" should be the end of the last partition in the list. "End" should be the end of the disk size extent. (parted) print Verify the existence of the new primary partition . It should have a size equivalent to the INCREASE of the disk size (parted) quit % system-config-lvm -- Or log onto VM go to console, under Applications at the top of the window, go to System Settings, then Logical Volume Manager Left Panel->Select "Unitialized Entities"->Select ("the partition with the right amount of size") Tools Menu->Initialize Block Device Panel Select Button->Add to existing Volume Group Left Panel->Select Volume Groups->Select VolGroup00->Select VolGroup00 Logical View->Select LogVol00 Click "Edit Properties" Drag the Size Slider all the way to the right. File->Quit % df -k _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Joe, On Tue, Aug 14, 2007 at 09:31:11AM -0700, Kraska, Joe A (US SSA) wrote:> > > did i forget something to have the new size of my guest image disk...? > > Just because your guest has a larger hard drive does not mean that the > guest''s operating system knows what to do with it. Two things are > required:Have you ever actually resized an LV in dom0 that is used as root device for a running domU, and been able to make that domU see the increase in size of that block device without rebooting the domU or detaching/re-attaching the block device? Because I do not believe this is currently possible with xen 3.x, and so all of these emails saying you need to do this and that still fundamentally will not work. Cheers, Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
...without rebooting the domU or detaching/re-attaching the block device? No; must resize the hard drive and reboot, the do the LVM stuff. Joe. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I think I actually made this work once, but it was really convoluted. Basically, I had to have two separate LVs, one partitioned with /boot and one not partitioned, whole thing was LVM. I could resize the underlying LV on dom0 and then in domU I could do a pvscan?.. or something like that, to get LVM on domU to recognize the change. Unfortunately, getting the kernel''s copy of the partition info to change was not easy. I did so many iterations of "OK, try this..." with LVM, kpartx etc.. that I couldn''t tell you how I finally got it to work. Actually, I might have done all the resizing from insize dom0... Anyway, unless I''m just wrong and I didn''t actually do this (a possibility), it is possible. Another option is to hot-add additional LVs to domU and then add them to the LVM as additional PVs. -Dylan> > ...without rebooting the domU or detaching/re-attaching the block > device? > > No; must resize the hard drive and reboot, the do the LVM stuff. > > Joe. > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
BTW, it''s important to note that if one is using LVM''s, "resizing" a disk image is completely unnecessary. All one really has to do is add an additional virtual disk and then make this part of the LVM using system-config-lvm. Doing this "live," I don''t know how to do. That''s a hypervisor issue, essentially "hotplug" support for virtual disks. Joe. -----Original Message----- From: Dylan Martin [mailto:dmartin@sccd.ctc.edu] Sent: Wednesday, August 15, 2007 11:30 AM To: Kraska, Joe A (US SSA) Cc: Andy Smith; xen-users@lists.xensource.com Subject: Re: [xen-users] Resize lvm disk I think I actually made this work once, but it was really convoluted. Basically, I had to have two separate LVs, one partitioned with /boot and one not partitioned, whole thing was LVM. I could resize the underlying LV on dom0 and then in domU I could do a pvscan?.. or something like that, to get LVM on domU to recognize the change. Unfortunately, getting the kernel''s copy of the partition info to change was not easy. I did so many iterations of "OK, try this..." with LVM, kpartx etc.. that I couldn''t tell you how I finally got it to work. Actually, I might have done all the resizing from insize dom0... Anyway, unless I''m just wrong and I didn''t actually do this (a possibility), it is possible. Another option is to hot-add additional LVs to domU and then add them to the LVM as additional PVs. -Dylan> > ...without rebooting the domU or detaching/re-attaching the block > device? > > No; must resize the hard drive and reboot, the do the LVM stuff. > > Joe. > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, Would partprobe tell your kernel what it needs to know? Thomas King -----Original Message----- Message: 1 Date: Wed, 15 Aug 2007 12:05:50 -0700 From: "Kraska, Joe A \(US SSA\)" <joe.kraska@baesystems.com> Subject: RE: [xen-users] Resize lvm disk To: "Dylan Martin" <dmartin@sccd.ctc.edu> Cc: Andy Smith <andy@strugglers.net>, xen-users@lists.xensource.com Message-ID: <09D59AEF0405D740BDCA2FAC0E0EA976033EC5F9@blums0008.bluelnk.net> Content-Type: text/plain; charset="us-ascii" BTW, it''s important to note that if one is using LVM''s, "resizing" a disk image is completely unnecessary. All one really has to do is add an additional virtual disk and then make this part of the LVM using system-config-lvm. Doing this "live," I don''t know how to do. That''s a hypervisor issue, essentially "hotplug" support for virtual disks. Joe. -----Original Message----- From: Dylan Martin [mailto:dmartin@sccd.ctc.edu] Sent: Wednesday, August 15, 2007 11:30 AM To: Kraska, Joe A (US SSA) Cc: Andy Smith; xen-users@lists.xensource.com Subject: Re: [xen-users] Resize lvm disk I think I actually made this work once, but it was really convoluted. Basically, I had to have two separate LVs, one partitioned with /boot and one not partitioned, whole thing was LVM. I could resize the underlying LV on dom0 and then in domU I could do a pvscan?.. or something like that, to get LVM on domU to recognize the change. Unfortunately, getting the kernel''s copy of the partition info to change was not easy. I did so many iterations of "OK, try this..." with LVM, kpartx etc.. that I couldn''t tell you how I finally got it to work. Actually, I might have done all the resizing from insize dom0... Anyway, unless I''m just wrong and I didn''t actually do this (a possibility), it is possible. Another option is to hot-add additional LVs to domU and then add them to the LVM as additional PVs. -Dylan> > ...without rebooting the domU or detaching/re-attaching the block > device? > > No; must resize the hard drive and reboot, the do the LVM stuff. > > Joe. >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users