On Thu, 2010-06-24 at 14:44 -0500, Chris Adams wrote: > Once upon a time, Patrick O'Callaghan <pocallaghan@xxxxxxxxx> said: > > My main disk has two partitions: > > > > Device Boot Start End Blocks Id System > > /dev/sda1 * 1 25 200781 83 Linux > > /dev/sda2 26 20023 160633935 8e Linux LVM > > > > /dev/sda1 is /boot. /dev/sda2 contains an LVM Volume Group with 3 > > logical volumes (/, /home and swap). > > > > I want to increase the size of /boot from 190MB to 500MB. If I use > > gparted, I'm afraid of screwing up the LVM partition since gparted > > doesn't understand LVM. > > > > Do I need to mess with Physical Volumes to achieve this? I find the LVM > > documentation unclear, and Palimpsest doesn't seem to address this sort > > of thing. > > You have to do several things (and I don't know if any of the above > tools can handle these things): > > - if all space in the volume group is allocated, you have to: > - resize one or more filesystems or swap to free up space > - shrink the appropriate logical volume to the new size of the FS/swap > - rearrange the physical extents so the now-unused PEs are at the end > of the VG (easiest thing to do is shrink whichever LV is last) > - shrink the VG > > - shrink the VG partition (sda2) to the same size as the VG > > - use some type of "smart" partition tool to move the sda2 partition > further out on the disk (I know the old Partition Magic could do this, > but I don't know if any free tools can) > > - increase the size of sda1 (repartition and then resize the FS) Yes, I pretty much feared that would be it. My caution is due to the fact that the LVM docs don't seem to state explicitly that reducing the size of an lv is equivalent to cutting space from the end. Lv's are allocated in units of some-number-of-mbs and the fact that you can reassign space between them (with appropriate resizing of filesystems) makes me wonder about this. I recently changed the split between / and /home and it happened instantly (not counting the resizing), i.e. nothing in the spec leads me to believe that any physical sector copying went on. That being the case, it's very likely that / is in fact physically split between two different areas of the disk even though it looks contiguous. So how can I be sure of the effect of lopping a bit off the end of the VG and moving the whole thing up a bit? > The reason you have to do all of this is that /boot is not under LVM (it > can't be today because the boot loader can't load from LVM), so you have > to make space in the partition table. > > Hmm, there may be one alternative; if you can free up 500M at the end of > the volume group (going through the steps above except changing sda1), > you could create an sda3 at the end of your disk. You'd have to make > the filesystem, copy your existing /boot, change /etc/fstab, and then > re-install GRUB so it looks at sda3. Yes, I suppose that could work. I can't help wondering, not for the first time, whether LVM is really worth the hassle on a desktop machine. I could have solved all this with gparted in no time because it's very clear what is going on. These extra levels of abstraction don't represent a win in my case. poc -- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines