On Fri, 16 Dec 2011 08:41:07 +0100, J. Roeleveld wrote:

> On Friday 16 December 2011 03:18:16 Allan Gottlieb wrote:
> > I need to add space to /var (thank you, libreoffice), which is on lvm.
> > Since my one volume group vg is getting low, I thought this would be a
> > good time to extend it as well.
> 
> Actually, you need space in /var/tmp/portage

In fact, he needs space in wherever $PORTAGE_TMPDIR points to. Just set
this variable to somewhere with enough space before emerging libreoffice.

> > phy disk:   /dev/sda  my only drive
> > phy part:   fdisk   create another partition of type LVM (/dev/sda8)
> > phy vol:    pvcreate /dev/sda8
> > vol grp:    vgextend vg /dev/sda8
> > log vol:    lvextend --size +10G /dev/vg/var
> > file sys:   resize2fs /dev/vg/var

Did you say your existing PV is sda7? In that case, why mess with having
two adjacent partitions are separate PVs in the same VG. Delete sda8,
resize sda7 to fill the space and run pvresize /dev/sda7 to resize the PV
to fit. Then you can use lvresize and resize2fs to increase /var, or
create a separate space for PORT_TMPDIR.

I prefer to keep potentially huge temporary directories away from
critical filesystems like /var.


-- 
Neil Bothwick

If God can't help you, how about Mr. Coffee?

Attachment: signature.asc
Description: PGP signature

Reply via email to