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 1S7P5s-0006tB-S5 for garchives@archives.gentoo.org; Tue, 13 Mar 2012 10:36:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 80173E0A6E; Tue, 13 Mar 2012 10:36:29 +0000 (UTC) Received: from mail-gy0-f181.google.com (mail-gy0-f181.google.com [209.85.160.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 41F5BE0A45 for ; Tue, 13 Mar 2012 10:35:13 +0000 (UTC) Received: by ghbz13 with SMTP id z13so454930ghb.40 for ; Tue, 13 Mar 2012 03:35:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:x-gm-message-state; bh=GHpTBkkj9arB6TLsHYR8enJHqpy/GiZUNAVQJc6iE0o=; b=VsRMLILlYxMbjbLbzeHsUhUiVuVozGHrrR9XqGKWcsLCwid5ET8/npIUVygaMe5ni9 UVTlppU0mDw7sD4Q3SdX2T/EX3KvkDIDDlUOUSPznP4YHPLdIvBzsxpdxe5yzK8/uUIs h7KqkblW/J+pPOZhDbCBlKpECbjOreiKvRfOeukwYAkl8rbCm5A2N5vi8bWy+dTs18bE yI4UNDUgdqWVtI66DEGxhWP7sePAmWZ2Tb4cpAXEo+gkCjwaIEVEOeS0r6IyGPplz+UB PkxO6havworcIsGvXG67SWRMm0G6S7LvUSyUcv7nGH78247sN3aAbimY7WAA4u7HHpvT 0Rfg== Received: by 10.229.134.193 with SMTP id k1mr3620524qct.92.1331634913433; Tue, 13 Mar 2012 03:35:13 -0700 (PDT) Received: from mail-vx0-f181.google.com (mail-vx0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id cw5sm2263188qab.20.2012.03.13.03.35.10 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 13 Mar 2012 03:35:12 -0700 (PDT) Sender: Nilesh Govindarajan Received: by vcge1 with SMTP id e1so521065vcg.40 for ; Tue, 13 Mar 2012 03:35:10 -0700 (PDT) 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.52.91.47 with SMTP id cb15mr16758004vdb.76.1331634910493; Tue, 13 Mar 2012 03:35:10 -0700 (PDT) Received: by 10.220.230.8 with HTTP; Tue, 13 Mar 2012 03:35:10 -0700 (PDT) Received: by 10.220.230.8 with HTTP; Tue, 13 Mar 2012 03:35:10 -0700 (PDT) In-Reply-To: References: <20120313085938.5b359cfd@khamul.example.com> Date: Tue, 13 Mar 2012 16:05:10 +0530 Message-ID: Subject: Re: [gentoo-user] bindmount or symlink? From: Nilesh Govindrajan To: gentoo-user@lists.gentoo.org Cc: Alan McKinnon Content-Type: multipart/alternative; boundary=20cf307f31d2cf7ae804bb1d697e X-Gm-Message-State: ALoCoQk6R5FCP20A3djQeE0STTve5K5BPwb7X0qOyMQTiykLGFQ9PkRxECO0dW5fBhTR6SWjUudi X-Archives-Salt: 00c40c1f-783a-4c45-8aa4-2b137ac22979 X-Archives-Hash: f6665e0e29b8953bae371e65d2899e9f --20cf307f31d2cf7ae804bb1d697e Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mar 13, 2012 2:42 PM, "Canek Pel=C3=A1ez Vald=C3=A9s" = wrote: > > On Tue, Mar 13, 2012 at 3:00 AM, Pandu Poluan wrote: > > On Tue, Mar 13, 2012 at 15:15, Canek Pel=C3=A1ez Vald=C3=A9s wrote: > >> > >> You are; but in an incredible complicated and convulted way. > >> > >> If I'm understanding you, you want: > >> > >> fstab: > >> /dev/XX /mnt/p1 ... > >> /dev/YY /mnt/p2 ... > >> > >> and then > >> > >> /usr/portage -> /mnt/p1 > >> /usr/src -> /mnt/p2 > >> > >> (or using bindmounting, whatever). > >> > >> This makes no sense at all (at least not to me), when you can simply: > >> > >> fstab: > >> /dev/XX /usr/portage ... > >> /dev/YY /usr/src ... > >> > >> and get the same split filesystem, but without all the complication > >> you are proposing. > >> > >> Unless there is something I don't understand, in which case I'm not > >> following your reasoning. > >> > > > > The point is: It's not just 2 (two) directories, but several of them, > > and I just can't see myself creating a partition (or an LV) for each > > and everyone of them. > > > > So, here's my thoughts: > > > > There are 2 filesystems that are suitable for different purposes: > > * reiserfs =3D for space efficiency (w/o notail option) and/or no inode= # > > limitation > > * ext4 =3D for general purpose > > > > The directories I'm going to split: > > > > /usr/share =3D=3D> ext4 > > /usr/portage =3D=3D> reiserfs > > /usr/portage/packages =3D=3D> ext4 > > /usr/portage/distfiles =3D=3D> ext4 > > /usr/src =3D=3D> reiserfs > > /var/cache/rtorrent (don't ask) =3D=3D> reiserfs > > /var/spool/postfix =3D=3D> ext4 > > /var/lib/postgresql =3D=3D> ext4 > > > > Now, I create 2 partitions: > > > > /dev/sdc1 (reiserfs) --> /mnt/Persistent1 > > /dev/sdd1 (ext4) --> /mnt/Persistent2 > > > > Then I create subdirectories: > > > > /mnt/Persistent1/portage > > /mnt/Persistent1/src > > /mnt/Persistent1/rtorrent > > > > /mnt/Persistent2/share > > /mnt/Persistent2/packages > > /mnt/Persistent2/distfiles > > /mnt/Persistent2/postfix > > /mnt/Persistent2/postgresql > > > > Finally, I need to redirect the directories-I-want-to-split to the > > above subdirs under /mnt/Persistent[12] > > > > SO. > > > > mount -o bind ... or ln -s ? > > OK, now I understand. I still think is kinda crazy, but to each its own. > > I would definitely use symlinks. > > Regards. > -- > Canek Pel=C3=A1ez Vald=C3=A9s > Posgrado en Ciencia e Ingenier=C3=ADa de la Computaci=C3=B3n > Universidad Nacional Aut=C3=B3noma de M=C3=A9xico > For critically performance wise, I think bindmounts would do better because it is done at kernel level whereas symlinks will have to be resolved on access, no dobut a kernel maintains cache but I can't really say much about it because I don't know the code behind either. -- Nilesh Govindrajan http://nileshgr.com --20cf307f31d2cf7ae804bb1d697e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Mar 13, 2012 2:42 PM, "Canek Pel=C3=A1ez Vald=C3=A9s" <caneko@gmail.com> wrote:
>
> On Tue, Mar 13, 2012 at 3:00 AM, Pandu Poluan <pandu@poluan.info> wrote:
> > On Tue, Mar 13, 2012 at 15:15, Canek Pel=C3=A1ez Vald=C3=A9s <= caneko@gmail.com> wrote:
> >>
> >> You are; but in an incredible complicated and convulted way.<= br> > >>
> >> If I'm understanding you, you want:
> >>
> >> fstab:
> >> /dev/XX =C2=A0 /mnt/p1 =C2=A0 ...
> >> /dev/YY =C2=A0 /mnt/p2 =C2=A0 ...
> >>
> >> and then
> >>
> >> /usr/portage -> /mnt/p1
> >> /usr/src -> /mnt/p2
> >>
> >> (or using bindmounting, whatever).
> >>
> >> This makes no sense at all (at least not to me), when you can= simply:
> >>
> >> fstab:
> >> /dev/XX =C2=A0 /usr/portage =C2=A0 ...
> >> /dev/YY =C2=A0 /usr/src =C2=A0 ...
> >>
> >> and get the same split filesystem, but without all the compli= cation
> >> you are proposing.
> >>
> >> Unless there is something I don't understand, in which ca= se I'm not
> >> following your reasoning.
> >>
> >
> > The point is: It's not just 2 (two) directories, but several = of them,
> > and I just can't see myself creating a partition (or an LV) f= or each
> > and everyone of them.
> >
> > So, here's my thoughts:
> >
> > There are 2 filesystems that are suitable for different purposes:=
> > * reiserfs =3D for space efficiency (w/o notail option) and/or no= inode#
> > limitation
> > * ext4 =3D for general purpose
> >
> > The directories I'm going to split:
> >
> > /usr/share =3D=3D> ext4
> > /usr/portage =3D=3D> reiserfs
> > /usr/portage/packages =3D=3D> ext4
> > /usr/portage/distfiles =3D=3D> ext4
> > /usr/src =3D=3D> reiserfs
> > /var/cache/rtorrent (don't ask) =3D=3D> reiserfs
> > /var/spool/postfix =3D=3D> ext4
> > /var/lib/postgresql =3D=3D> ext4
> >
> > Now, I create 2 partitions:
> >
> > /dev/sdc1 (reiserfs) --> /mnt/Persistent1
> > /dev/sdd1 (ext4) --> /mnt/Persistent2
> >
> > Then I create subdirectories:
> >
> > /mnt/Persistent1/portage
> > /mnt/Persistent1/src
> > /mnt/Persistent1/rtorrent
> >
> > /mnt/Persistent2/share
> > /mnt/Persistent2/packages
> > /mnt/Persistent2/distfiles
> > /mnt/Persistent2/postfix
> > /mnt/Persistent2/postgresql
> >
> > Finally, I need to redirect the directories-I-want-to-split to th= e
> > above subdirs under /mnt/Persistent[12]
> >
> > SO.
> >
> > mount -o bind ... or ln -s ?
>
> OK, now I understand. I still think is kinda crazy, but to each its ow= n.
>
> I would definitely use symlinks.
>
> Regards.
> --
> Canek Pel=C3=A1ez Vald=C3=A9s
> Posgrado en Ciencia e Ingenier=C3=ADa de la Computaci=C3=B3n
> Universidad Nacional Aut=C3=B3noma de M=C3=A9xico
>

For critically performance wise, I think bindmounts would do better beca= use it is done at kernel level whereas symlinks will have to be resolved on= access, no dobut a kernel maintains cache but I can't really say much = about it because I don't know the code behind either.

--
Nilesh Govindrajan
http://nileshgr.com

--20cf307f31d2cf7ae804bb1d697e--