[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-users] LVM partition resize pain...
Hi All- Was hoping someone would know what's going on here....I created a Xen VM on top of a LVM volume. The volume was like 530GB big. Within the volume sits the VM, with 5 partitions, one of them 500GB big (the other 4 file systems comprise the other 30GB). Each virtual disk partition exists as /dev/xvda1 - /dev/xvda5. /dev/xvda5 is the one with the 500GB file system on it. I wanted to reduce the size of the filesystem on /dev/xvda5 from 500GB to 5GB. So I unmount /dev/xvda5 then run: # resize2fs /dev/xvda5 5GWorks great. Next, I shut down the VM and reduce the size of my logical volume: # lvreduce -v -L 40G /dev/vg0/xen1So the volume is still larger than all the filesystems in it, such that I don't lose any data. The command worked successfully. Then I booted the VM and got errors on boot say something about "/dev/xvda: wanted 500000000 but was limited to 5000000" or something like that. But the VM booted even after the errors and appeared to work OK. So I: # fdisk -l Disk /dev/xvda: 32.2 GB, 32212254720 bytes 255 heads, 63 sectors/track, 3916 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/xvda1 * 1 13 104391 83 Linux /dev/xvda2 14 1288 10241437+ 83 Linux/dev/xvda3 1289 2308 8193150 82 Linux swap / Solaris /dev/xvda4 2309 67620 524618640 5 Extended /dev/xvda5 2309 67620 524618608+ 83 LinuxNotice it says that /dev/xvda is 32.2GB (which is correct), but /dev/xvda4-5 still think they are 500GB big! A 'df' shows that the filesystem is really only 5GB though, as expected. I tried some parted magic but parted can't do anything (even print the partition table!), I get errors like: [root@template ~]# parted /dev/xvda GNU Parted 1.8.1 Using /dev/xvda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Error: Can't have a partition outside the disk! (parted)and it won't let me make changes, etc. Is there something I missed? Wasn't the OS supposed to recognize the size change in /dev/xvda on boot? Or do I have to manually change the disk label or something? Is it just impossible to resize a VM's file system then change the volume the VM sits on to reflect the change? Thanks so much for any ideas! -erich _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |