public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alan McKinnon <alan.mckinnon@gmail.com>
To: Pandu Poluan <pandu@poluan.info>, gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] bindmount or symlink?
Date: Tue, 13 Mar 2012 13:38:39 +0200	[thread overview]
Message-ID: <20120313133839.48022a23@khamul.example.com> (raw)
In-Reply-To: <CAA2qdGVAK2GcZs34CGd+dk6Q5QefJnnkjHOjA3dvSVxjH903eQ@mail.gmail.com>

On Tue, 13 Mar 2012 16:00:08 +0700
Pandu Poluan <pandu@poluan.info> wrote:

> On Tue, Mar 13, 2012 at 15:15, Canek Peláez Valdés <caneko@gmail.com>
> 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 = for space efficiency (w/o notail option) and/or no inode#
> limitation
> * ext4 = for general purpose
> 
> The directories I'm going to split:
> 
> /usr/share ==> ext4
> /usr/portage ==> reiserfs
> /usr/portage/packages ==> ext4
> /usr/portage/distfiles ==> ext4
> /usr/src ==> reiserfs
> /var/cache/rtorrent (don't ask) ==> reiserfs
> /var/spool/postfix ==> ext4
> /var/lib/postgresql ==> 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 ?
> 
> Rgds,

Ah, now I see. You have many sub-directories of /usr that you don't
want to be part of the same volume as /usr. This is quite valid, I can
think of several lines of reasoning:

- you'd rather not have the pain of dealing with many smaller
  filesystems even if LVM is available.
- you just want a large storage area for "stuffs", and don't feel like
  finding out how much space each one needs
- you'd rather keep the bulk of /usr static and don't growing much

So instead make two big mount points in /mnt, one each for the
destination filesystem types you are interested in and link the
subdirectories there to the right place in /usr.

You want bindmounts for that.

Someone else here (I forget whom) did the same thing with his home
directories and /var. It's a valid need, but rare. And nobody else
understood his reasoning for a long time either :-)


OT: I can't wait for the day when ZFS- and btrfs-like filesystems are
the norm and we can dispense with all this physical disk, partitions,
LVM, volumes, file systems and mounting nonsense.

I want this model: I have X bytes of storage, I would like Y bytes to
be mounted here with these charactertics, and Z bytes mounted there
with those characteristics. Kernel, make it so, thanksverymuch and
have a nice day

-- 
Alan McKinnnon
alan.mckinnon@gmail.com




  parent reply	other threads:[~2012-03-13 11:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13  5:04 [gentoo-user] bindmount or symlink? Pandu Poluan
2012-03-13  5:11 ` Canek Peláez Valdés
2012-03-13  5:39   ` Pandu Poluan
2012-03-13  5:45     ` Canek Peláez Valdés
2012-03-13  6:59 ` Alan McKinnon
2012-03-13  8:05   ` Pandu Poluan
2012-03-13  8:15     ` Canek Peláez Valdés
2012-03-13  8:52       ` Philipp Riegger
2012-03-13  9:00       ` Pandu Poluan
2012-03-13  9:12         ` Canek Peláez Valdés
2012-03-13 10:35           ` Nilesh Govindrajan
2012-03-13 11:38         ` Alan McKinnon [this message]
2012-03-13 10:58     ` Alan McKinnon
2012-03-13 18:06 ` Walter Dnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120313133839.48022a23@khamul.example.com \
    --to=alan.mckinnon@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    --cc=pandu@poluan.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox