From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RbXr8-0005X5-Mm for garchives@archives.gentoo.org; Fri, 16 Dec 2011 13:29:50 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9EAF921C169; Fri, 16 Dec 2011 13:29:36 +0000 (UTC) Received: from svr-us4.tirtonadi.com (svr-us4.tirtonadi.com [69.65.43.212]) by pigeon.gentoo.org (Postfix) with ESMTP id EAABE21C0FE for ; Fri, 16 Dec 2011 13:28:01 +0000 (UTC) Received: from mail-wi0-f181.google.com ([209.85.212.181]) by svr-us4.tirtonadi.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.69) (envelope-from ) id 1RbXpR-001lP2-Cf for gentoo-user@lists.gentoo.org; Fri, 16 Dec 2011 20:28:01 +0700 Received: by wibhq2 with SMTP id hq2so254903wib.40 for ; Fri, 16 Dec 2011 05:27:57 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.180.104.2 with SMTP id ga2mr14803506wib.33.1324042077198; Fri, 16 Dec 2011 05:27:57 -0800 (PST) Received: by 10.223.103.70 with HTTP; Fri, 16 Dec 2011 05:27:56 -0800 (PST) Received: by 10.223.103.70 with HTTP; Fri, 16 Dec 2011 05:27:56 -0800 (PST) In-Reply-To: <20111216100205.1b803913@digimed.co.uk> References: <201112160841.07959.joost@antarean.org> <20111216100205.1b803913@digimed.co.uk> Date: Fri, 16 Dec 2011 20:27:56 +0700 Message-ID: Subject: Re: [gentoo-user] LVM: extending volume groups and logical volumes From: Pandu Poluan To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=f46d04182730addaa604b43591c8 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - svr-us4.tirtonadi.com X-AntiAbuse: Original Domain - lists.gentoo.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - poluan.info X-Archives-Salt: 55b20b27-b23b-4686-8d92-2ee1b58c614b X-Archives-Hash: 68d2ece9d8fff0fee74a2b6728c6f649 --f46d04182730addaa604b43591c8 Content-Type: text/plain; charset=UTF-8 On Dec 16, 2011 5:05 PM, "Neil Bothwick" wrote: > > 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. > Alternatively, mount sda8 under /mnt, create "shadow" directories in sda8, and bindmount them when needed. E.g.: mkdir /mnt/sparespace mount /dev/sda8 /mnt/sparespace mount -o bind /mnt/sparespace /var/tmp/portage Of course, this assumes sda8 has enough space for heavy compiles (i.e., 10 GiB or more). Create a huge number of inodes or use a filesystem other than ext[2-4] for sda8, and you're covered. Rgds, --f46d04182730addaa604b43591c8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Dec 16, 2011 5:05 PM, "Neil Bothwick" <neil@digimed.co.uk> wrote:
>
> 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 se= t
> this variable to somewhere with enough space before emerging libreoffi= ce.
>
> > > phy disk: =C2=A0 /dev/sda =C2=A0my only drive
> > > phy part: =C2=A0 fdisk =C2=A0 create another partition of ty= pe LVM (/dev/sda8)
> > > phy vol: =C2=A0 =C2=A0pvcreate /dev/sda8
> > > vol grp: =C2=A0 =C2=A0vgextend vg /dev/sda8
> > > log vol: =C2=A0 =C2=A0lvextend --size +10G /dev/vg/var
> > > file sys: =C2=A0 resize2fs /dev/vg/var
>
> Did you say your existing PV is sda7? In that case, why mess with havi= ng
> two adjacent partitions are separate PVs in the same VG. Delete sda8,<= br> > 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.
>

Alternatively, mount sda8 under /mnt, create "shadow" director= ies in sda8, and bindmount them when needed.

E.g.:

mkdir /mnt/sparespace
mount /dev/sda8 /mnt/sparespace
mount -o bind /mnt/sparespace /var/tmp/portage

Of course, this assumes sda8 has enough space for heavy compiles (i.e., = 10 GiB or more). Create a huge number of inodes or use a filesystem other t= han ext[2-4] for sda8, and you're covered.

Rgds,

--f46d04182730addaa604b43591c8--