* [gentoo-user] bindmount or symlink? @ 2012-03-13 5:04 Pandu Poluan 2012-03-13 5:11 ` Canek Peláez Valdés ` (2 more replies) 0 siblings, 3 replies; 14+ messages in thread From: Pandu Poluan @ 2012-03-13 5:04 UTC (permalink / raw To: gentoo-user [-- Attachment #1: Type: text/plain, Size: 350 bytes --] I am seriously thinking of splitting the storage of directories under /usr, e.g., /usr/portage and /usr/source actually living somewhere else, on different partition and different filesystem. Let's say something mounted on /mnt/Persistent. My question: should I use bindmount or symlinks to do that? What's the drawbacks/benefits for either? Rgds, [-- Attachment #2: Type: text/html, Size: 386 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 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 6:59 ` Alan McKinnon 2012-03-13 18:06 ` Walter Dnes 2 siblings, 1 reply; 14+ messages in thread From: Canek Peláez Valdés @ 2012-03-13 5:11 UTC (permalink / raw To: gentoo-user On Mon, Mar 12, 2012 at 11:04 PM, Pandu Poluan <pandu@poluan.info> wrote: > I am seriously thinking of splitting the storage of directories under /usr, > e.g., /usr/portage and /usr/source actually living somewhere else, on > different partition and different filesystem. Let's say something mounted on > /mnt/Persistent. > > My question: should I use bindmount or symlinks to do that? What's the > drawbacks/benefits for either? I'm sorry, I don't understand. What's the problem of having the following in /etc/fstab? LABEL=Portage /usr/portage ext4 noatime,auto 0 2 LABEL=Source /usr/source ext4 noatime,auto 0 2 (Replace LABEL=Portage with /dev/sda7, if you want to.) Why do you need to bindmount or link the directories when you can mount them wherever you want? Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 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 0 siblings, 1 reply; 14+ messages in thread From: Pandu Poluan @ 2012-03-13 5:39 UTC (permalink / raw To: gentoo-user On Tue, Mar 13, 2012 at 12:11, Canek Peláez Valdés <caneko@gmail.com> wrote: > On Mon, Mar 12, 2012 at 11:04 PM, Pandu Poluan <pandu@poluan.info> wrote: >> I am seriously thinking of splitting the storage of directories under /usr, >> e.g., /usr/portage and /usr/source actually living somewhere else, on >> different partition and different filesystem. Let's say something mounted on >> /mnt/Persistent. >> >> My question: should I use bindmount or symlinks to do that? What's the >> drawbacks/benefits for either? > > I'm sorry, I don't understand. What's the problem of having the > following in /etc/fstab? > > LABEL=Portage /usr/portage ext4 noatime,auto 0 2 > LABEL=Source /usr/source ext4 noatime,auto 0 2 > > (Replace LABEL=Portage with /dev/sda7, if you want to.) > > Why do you need to bindmount or link the directories when you can > mount them wherever you want? > Because I am avoiding "single partition per directory". And a slight mistake in my original email, it's not just /usr but also /var (and other root-based directories that will not interfere with boot-up / operations) Let me give an example: Let's say I have /dev/sdc and /dev/sdd, both having single partition each (/dev/sdc1 and /dev/sdd1). /dev/sdc1 will be formatted reiserfs mounted into /mnt/Persistent1 /dev/sdd1 will be formatted ext4 mounted into /mnt/Persistent2 Directories not really necessary for daily operations, such as /usr/src, /usr/portage, /var/db/pkg, and so on and so forth, will each be a subdir under either /mnt/Persistent1 or /mnt/Persistent2 according to each directory's nature. Let's take the example of /usr/src ... I can either make /usr/src a symlink to /mnt/Persistent1/src, or bindmount /mnt/Persistent1/src to /usr/src What will be the benefits/drawbacks for bindmount vs symlink? Rgds, -- FdS Pandu E Poluan ~ IT Optimizer ~ • LOPSA Member #15248 • Blog : http://pepoluan.tumblr.com • Linked-In : http://id.linkedin.com/in/pepoluan ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 2012-03-13 5:39 ` Pandu Poluan @ 2012-03-13 5:45 ` Canek Peláez Valdés 0 siblings, 0 replies; 14+ messages in thread From: Canek Peláez Valdés @ 2012-03-13 5:45 UTC (permalink / raw To: gentoo-user On Mon, Mar 12, 2012 at 11:39 PM, Pandu Poluan <pandu@poluan.info> wrote: > On Tue, Mar 13, 2012 at 12:11, Canek Peláez Valdés <caneko@gmail.com> wrote: >> On Mon, Mar 12, 2012 at 11:04 PM, Pandu Poluan <pandu@poluan.info> wrote: >>> I am seriously thinking of splitting the storage of directories under /usr, >>> e.g., /usr/portage and /usr/source actually living somewhere else, on >>> different partition and different filesystem. Let's say something mounted on >>> /mnt/Persistent. >>> >>> My question: should I use bindmount or symlinks to do that? What's the >>> drawbacks/benefits for either? >> >> I'm sorry, I don't understand. What's the problem of having the >> following in /etc/fstab? >> >> LABEL=Portage /usr/portage ext4 noatime,auto 0 2 >> LABEL=Source /usr/source ext4 noatime,auto 0 2 >> >> (Replace LABEL=Portage with /dev/sda7, if you want to.) >> >> Why do you need to bindmount or link the directories when you can >> mount them wherever you want? >> > > Because I am avoiding "single partition per directory". And a slight > mistake in my original email, it's not just /usr but also /var (and > other root-based directories that will not interfere with boot-up / > operations) > > Let me give an example: > > Let's say I have /dev/sdc and /dev/sdd, both having single partition > each (/dev/sdc1 and /dev/sdd1). > > /dev/sdc1 will be formatted reiserfs mounted into /mnt/Persistent1 > > /dev/sdd1 will be formatted ext4 mounted into /mnt/Persistent2 > > Directories not really necessary for daily operations, such as > /usr/src, /usr/portage, /var/db/pkg, and so on and so forth, will each > be a subdir under either /mnt/Persistent1 or /mnt/Persistent2 > according to each directory's nature. > > Let's take the example of /usr/src ... I can either make /usr/src a > symlink to /mnt/Persistent1/src, or bindmount /mnt/Persistent1/src to > /usr/src All of that sounds incredible complicated. Interesting choice of partition handling. > What will be the benefits/drawbacks for bindmount vs symlink? In my experience, and if you are not dealing with NFS, no respectable program cares about a dir being a symlink, so I would use symlinks (they are easier to handle). Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 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 6:59 ` Alan McKinnon 2012-03-13 8:05 ` Pandu Poluan 2012-03-13 18:06 ` Walter Dnes 2 siblings, 1 reply; 14+ messages in thread From: Alan McKinnon @ 2012-03-13 6:59 UTC (permalink / raw To: gentoo-user; +Cc: pandu On Tue, 13 Mar 2012 12:04:00 +0700 Pandu Poluan <pandu@poluan.info> wrote: > I am seriously thinking of splitting the storage of directories > under /usr, e.g., /usr/portage and /usr/source actually living > somewhere else, on different partition and different filesystem. > Let's say something mounted on /mnt/Persistent. > > My question: should I use bindmount or symlinks to do that? What's the > drawbacks/benefits for either? > > Rgds, You should do neither as they do not give you split storage, they both give you the same thing in two different places. Create two new filesystems and mount them. I personally use /var/portage as there is no good reason for it to be under /usr where it is just clutter. Code goes in /usr Data goes in /var You have to change PORTDIR in /etc/make.conf for this to work as well as /etc/make.profile. Nothing breaks without it, you just get errors from portage -- Alan McKinnnon alan.mckinnon@gmail.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 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 10:58 ` Alan McKinnon 0 siblings, 2 replies; 14+ messages in thread From: Pandu Poluan @ 2012-03-13 8:05 UTC (permalink / raw To: Alan McKinnon; +Cc: gentoo-user [-- Attachment #1: Type: text/plain, Size: 1176 bytes --] On Mar 13, 2012 2:00 PM, "Alan McKinnon" <alan.mckinnon@gmail.com> wrote: > > On Tue, 13 Mar 2012 12:04:00 +0700 > Pandu Poluan <pandu@poluan.info> wrote: > > > I am seriously thinking of splitting the storage of directories > > under /usr, e.g., /usr/portage and /usr/source actually living > > somewhere else, on different partition and different filesystem. > > Let's say something mounted on /mnt/Persistent. > > > > My question: should I use bindmount or symlinks to do that? What's the > > drawbacks/benefits for either? > > > > Rgds, > > You should do neither as they do not give you split storage, they > both give you the same thing in two different places. > > Create two new filesystems and mount them. > > I personally use /var/portage as there is no good reason for it to be > under /usr where it is just clutter. > > Code goes in /usr > Data goes in /var > > You have to change PORTDIR in /etc/make.conf for this to work as well > as /etc/make.profile. Nothing breaks without it, you just get errors > from portage > Eh? But I put portage, src, share, etc. on a different partition mounted under /mnt ... doesn't that mean I am using a split filesystem? Rgds, [-- Attachment #2: Type: text/html, Size: 1548 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 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 10:58 ` Alan McKinnon 1 sibling, 2 replies; 14+ messages in thread From: Canek Peláez Valdés @ 2012-03-13 8:15 UTC (permalink / raw To: gentoo-user; +Cc: Alan McKinnon On Tue, Mar 13, 2012 at 2:05 AM, Pandu Poluan <pandu@poluan.info> wrote: > > On Mar 13, 2012 2:00 PM, "Alan McKinnon" <alan.mckinnon@gmail.com> wrote: >> >> On Tue, 13 Mar 2012 12:04:00 +0700 >> Pandu Poluan <pandu@poluan.info> wrote: >> >> > I am seriously thinking of splitting the storage of directories >> > under /usr, e.g., /usr/portage and /usr/source actually living >> > somewhere else, on different partition and different filesystem. >> > Let's say something mounted on /mnt/Persistent. >> > >> > My question: should I use bindmount or symlinks to do that? What's the >> > drawbacks/benefits for either? >> > >> > Rgds, >> >> You should do neither as they do not give you split storage, they >> both give you the same thing in two different places. >> >> Create two new filesystems and mount them. >> >> I personally use /var/portage as there is no good reason for it to be >> under /usr where it is just clutter. >> >> Code goes in /usr >> Data goes in /var >> >> You have to change PORTDIR in /etc/make.conf for this to work as well >> as /etc/make.profile. Nothing breaks without it, you just get errors >> from portage >> > > Eh? But I put portage, src, share, etc. on a different partition mounted > under /mnt ... doesn't that mean I am using a split filesystem? 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. Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 2012-03-13 8:15 ` Canek Peláez Valdés @ 2012-03-13 8:52 ` Philipp Riegger 2012-03-13 9:00 ` Pandu Poluan 1 sibling, 0 replies; 14+ messages in thread From: Philipp Riegger @ 2012-03-13 8:52 UTC (permalink / raw To: gentoo-user On 13.03.2012 09:15, Canek Peláez Valdés wrote: > 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. There are 2 possible things one can do: 1) Split everything, /usr, /usr/src, /usr/portage each on a seperate filesystem. 2) Seperate multiple paths from /usr: Have 1 fs /mnt/data and link (or bind mount) /usr/src, /usr/portage there. You have a shared fs for dirx, that are usually not shared. What would be the benefits of symlinks and bind mounts for doing 2)? Philipp ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 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 11:38 ` Alan McKinnon 1 sibling, 2 replies; 14+ messages in thread From: Pandu Poluan @ 2012-03-13 9:00 UTC (permalink / raw To: gentoo-user; +Cc: Alan McKinnon 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, -- FdS Pandu E Poluan ~ IT Optimizer ~ • LOPSA Member #15248 • Blog : http://pepoluan.tumblr.com • Linked-In : http://id.linkedin.com/in/pepoluan ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 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 1 sibling, 1 reply; 14+ messages in thread From: Canek Peláez Valdés @ 2012-03-13 9:12 UTC (permalink / raw To: gentoo-user; +Cc: Alan McKinnon 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á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 ? OK, now I understand. I still think is kinda crazy, but to each its own. I would definitely use symlinks. Regards. -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 2012-03-13 9:12 ` Canek Peláez Valdés @ 2012-03-13 10:35 ` Nilesh Govindrajan 0 siblings, 0 replies; 14+ messages in thread From: Nilesh Govindrajan @ 2012-03-13 10:35 UTC (permalink / raw To: gentoo-user; +Cc: Alan McKinnon [-- Attachment #1: Type: text/plain, Size: 2893 bytes --] On Mar 13, 2012 2:42 PM, "Canek Peláez Valdés" <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á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 ? > > OK, now I understand. I still think is kinda crazy, but to each its own. > > I would definitely use symlinks. > > Regards. > -- > Canek Peláez Valdés > Posgrado en Ciencia e Ingeniería de la Computación > Universidad Nacional Autónoma de México > 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 [-- Attachment #2: Type: text/html, Size: 4109 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 2012-03-13 9:00 ` Pandu Poluan 2012-03-13 9:12 ` Canek Peláez Valdés @ 2012-03-13 11:38 ` Alan McKinnon 1 sibling, 0 replies; 14+ messages in thread From: Alan McKinnon @ 2012-03-13 11:38 UTC (permalink / raw To: Pandu Poluan, gentoo-user 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 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 2012-03-13 8:05 ` Pandu Poluan 2012-03-13 8:15 ` Canek Peláez Valdés @ 2012-03-13 10:58 ` Alan McKinnon 1 sibling, 0 replies; 14+ messages in thread From: Alan McKinnon @ 2012-03-13 10:58 UTC (permalink / raw To: gentoo-user On Tue, 13 Mar 2012 15:05:59 +0700 Pandu Poluan <pandu@poluan.info> wrote: > On Mar 13, 2012 2:00 PM, "Alan McKinnon" <alan.mckinnon@gmail.com> > wrote: > > > > On Tue, 13 Mar 2012 12:04:00 +0700 > > Pandu Poluan <pandu@poluan.info> wrote: > > > > > I am seriously thinking of splitting the storage of directories > > > under /usr, e.g., /usr/portage and /usr/source actually living > > > somewhere else, on different partition and different filesystem. > > > Let's say something mounted on /mnt/Persistent. > > > > > > My question: should I use bindmount or symlinks to do that? > > > What's the drawbacks/benefits for either? > > > > > > Rgds, > > > > You should do neither as they do not give you split storage, they > > both give you the same thing in two different places. > > > > Create two new filesystems and mount them. > > > > I personally use /var/portage as there is no good reason for it to > > be under /usr where it is just clutter. > > > > Code goes in /usr > > Data goes in /var > > > > You have to change PORTDIR in /etc/make.conf for this to work as > > well as /etc/make.profile. Nothing breaks without it, you just get > > errors from portage > > > > Eh? But I put portage, src, share, etc. on a different partition > mounted under /mnt ... doesn't that mean I am using a split > filesystem? Do you have separate filesystems for each of those directories, or one big storage area? I'm struggling to find out what you are trying to accomplish and what problem that is a solution for. -- Alan McKinnnon alan.mckinnon@gmail.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [gentoo-user] bindmount or symlink? 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 6:59 ` Alan McKinnon @ 2012-03-13 18:06 ` Walter Dnes 2 siblings, 0 replies; 14+ messages in thread From: Walter Dnes @ 2012-03-13 18:06 UTC (permalink / raw To: gentoo-user On Tue, Mar 13, 2012 at 12:04:00PM +0700, Pandu Poluan wrote > I am seriously thinking of splitting the storage of directories under /usr, > e.g., /usr/portage and /usr/source actually living somewhere else, on > different partition and different filesystem. Let's say something mounted > on /mnt/Persistent. > > My question: should I use bindmount or symlinks to do that? What's the > drawbacks/benefits for either? There might be some really rare occasions when you boot up in rescue mode ("single") where a program expects a directory. -- Walter Dnes <waltdnes@waltdnes.org> ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2012-03-13 18:08 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2012-03-13 10:58 ` Alan McKinnon 2012-03-13 18:06 ` Walter Dnes
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox