[ubuntu-za] Resize LVM root partition

Stefan Lesicnik stefan at lsd.co.za
Wed Aug 19 14:04:34 BST 2009


On Wed, Aug 19, 2009 at 2:56 PM, Charl Wentzel <charl.wentzel at vodamail.co.za
> wrote:

> Hi Guys
>
> I'm having trouble resizing my root partition on my server, which is
> using LVM.
>
> I keep on getting errors that there are no space left and "df" gives me:
>
>  Filesystem           1K-blocks      Used Available Use% Mounted on
>  /dev/mapper/phantom--vg1-root
>                         249903    249903         0 100% /
>  tmpfs                   645720         0    645720   0% /lib/init/rw
>  varrun                  645720       476    645244   1% /var/run
>  varlock                 645720         0    645720   0% /var/lock
>  udev                    645720      2752    642968   1% /dev
>  tmpfs                   645720         0    645720   0% /dev/shm
>  /dev/mapper/phantom--vg1-boot
>                          51559     30331     18566  63% /boot
>  .
> This is a bit confusing but it appears my root partition is full.  For
> starters is my interpretation correct?
>
> To resize it I issue the following command:
>
>  sudo lvextend -L500M /dev/phantom-vg1/root


I normally use a plus. ie. lvextend -L+500M /dev/phantom-vg1/root

I think this says add, as opposed to make the partition 500M. (although this
may have changed)


>
> but I get the following error:
>
>  Command failed with status code 5.
>
> I rebooted and tried again and now I get:
>
>  File descriptor 5 left open
>  /etc/lvm/archive: mkdir failed: No space left on device
>  /etc/lvm/cache/.cache.tmp: write error failed: No space left on device
>

Can you delete some files. That would at least let it write stuff.

Remember after lvextend, you still need to do a filesystem resize.
resize_reiserfs or resize2fs

Stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-za/attachments/20090819/c77f7461/attachment.htm 


More information about the ubuntu-za mailing list