[ubuntu-za] Resize LVM root partition

Charl Wentzel charl.wentzel at vodamail.co.za
Thu Aug 20 08:57:24 BST 2009


On Wed, 2009-08-19 at 16:02 +0200, Stefan Lesicnik wrote:
>         The culprit is /lib.  It seems I've installed one too many
>         programs.
>         Unfortunately this affects apt as well, so I'm struggling to
>         uninstall!!!
> 
> Its probably /lib/modules
> It will have the all the kernel modules for upgraded kernels.
> 
> If you can something like apt-get purge linux-image-2.6.31-5-generic
> (look what version you have in there).
> 
> If apt doesnt work, just delete one of the module directories (not the
> current one!  uname -a )

Thanks Stefan!! Just 2.6.31.7-server took up 115M!! So I'm now at 55%
usage.

You saved me a whole 15 minute of server reinstall... you got to love
Linux!  

Apt and lvresize is working again.  BTW guys, I used "aptitude install
<package>" and it truely is a lot better than "apt-get install
<package>"!  Thanks for the tip!

So now I successfully resized the logical volume, but this brings me to
my next problem.  I now need to resize file system on top of the logic
volume, which normally would be something like:

umount /dev/phantom-vg1/root
resize2fs /dev/phantom-vg1/root
mount /dev/phantom-vg1 /

I don't think you can unmount your root directory without bringing the 
system to a halt.  I'll try and do it with a separate boot disk.

Just my luck that my first issue with LVM will be on root partition...
Murphy really doesn't like me

Charl





More information about the ubuntu-za mailing list