Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #193878 > unrolled thread

How to mount or link as extention of fs?

Started byDennis Wicks <wix@mgssub.com>
First post2018-03-17 23:40 +0100
Last post2018-03-18 21:30 +0100
Articles 7 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  How to mount or link as extention of fs? Dennis Wicks <wix@mgssub.com> - 2018-03-17 23:40 +0100
    Re: How to mount or link as extention of fs? Ben Caradoc-Davies <ben@transient.nz> - 2018-03-17 23:50 +0100
    Re: How to mount or link as extention of fs? David Wright <deblis@lionunicorn.co.uk> - 2018-03-18 00:10 +0100
    Re: How to mount or link as extention of fs? Joseph Loo <jloo20111002@gmail.com> - 2018-03-18 02:40 +0100
      Re: How to mount or link as extention of fs? David Wright <deblis@lionunicorn.co.uk> - 2018-03-18 17:50 +0100
    Re: How to mount or link as extention of fs? Joseph Loo <jloo20111002@gmail.com> - 2018-03-18 02:40 +0100
    Re: How to mount or link as extention of fs? Abdullah Ramazanoglu <ar018@yahoo.com> - 2018-03-18 21:30 +0100

#193878 — How to mount or link as extention of fs?

FromDennis Wicks <wix@mgssub.com>
Date2018-03-17 23:40 +0100
SubjectHow to mount or link as extention of fs?
Message-ID<vusEy-8a2-5@gated-at.bofh.it>
Greetings!

I have separated my /home file system from root so I can
install new systems without clobbering it. To make it most
useful is there any way I can mount, link, whatever, it so
that it appears to be an extension of, or included in,
/home? That is not just another mount on the root fs.

TIA Dennis

[toc] | [next] | [standalone]


#193879

FromBen Caradoc-Davies <ben@transient.nz>
Date2018-03-17 23:50 +0100
Message-ID<vusOe-8eM-1@gated-at.bofh.it>
In reply to#193878
On 18/03/18 11:32, Dennis Wicks wrote:
> Greetings!
> I have separated my /home file system from root so I can
> install new systems without clobbering it. To make it most
> useful is there any way I can mount, link, whatever, it so
> that it appears to be an extension of, or included in,
> /home? That is not just another mount on the root fs.
> TIA Dennis

Are you trying to separate your own (for example) /home/dennis while 
leaving other /home subdirectories on the /home filesystem? You can do 
this by mounting /home/dennis under /home. Just make a mount point 
/home/dennis and add fstab entries. Nested mount points work, and are 
the way other filesystems are mounted on root. The only tricky part is 
that your /home/dennis should still contain lost+found owned by root (if 
ext4) and you will need to move all files and directories into the root 
of the /home/dennis filesystem.

I recommend using a mount point with root:root ownership and no access 
to others to prevent unintentional modification while /home/dennis is 
not mounted.

Kind regards,

-- 
Ben Caradoc-Davies <ben@transient.nz>
Director
Transient Software Limited <https://transient.nz/>
New Zealand

[toc] | [prev] | [next] | [standalone]


#193880

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-03-18 00:10 +0100
Message-ID<vut7z-bh-7@gated-at.bofh.it>
In reply to#193878
On Sat 17 Mar 2018 at 17:32:00 (-0500), Dennis Wicks wrote:
> I have separated my /home file system from root so I can
> install new systems without clobbering it.

Which presumably means you have moved it to a separate partition.

> To make it most
> useful is there any way I can mount, link, whatever, it so
> that it appears to be an extension of, or included in,
> /home?

One would normally add a line to /etc/fstab like:
LABEL=myhome /home ext4 errors=remount-ro,defaults 0 2
or:
UUID=4a4e352f-2180-4083-92b4-f46e4e0104b4 /home ext4 errors=remount-ro,defaults 0 2
with the appropriate filesystem type (ext4 here). Then do
# mount -a

> That is not just another mount on the root fs.

I'm not sure what you mean by this, because that is exactly how a
separate /home normally is mounted. But I'll hazard a guess:

The filesystem on the partition labelled myhome (using the terminology
above) should have top-level directories with names like adam, brian,
carl, etc, ie the usernames. It should *not* have home as its
top-level directory or you'll end up with /home/home/adam etc when
it's mounted.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#193881

FromJoseph Loo <jloo20111002@gmail.com>
Date2018-03-18 02:40 +0100
Message-ID<vuvsJ-1sM-3@gated-at.bofh.it>
In reply to#193878
On 03/17/2018 03:32 PM, Dennis Wicks wrote:
> Greetings!
> 
> I have separated my /home file system from root so I can
> install new systems without clobbering it. To make it most
> useful is there any way I can mount, link, whatever, it so
> that it appears to be an extension of, or included in,
> /home? That is not just another mount on the root fs.
> 
> TIA Dennis
> 
Have you ever thought of doing an autofs mount on the /home directory?
That way you do not need to have it a separate partition. I just mount
the individual home directories to the /home mount point.

If you have an autofs setup, you could have the individual directories
on different machines and share the same directory. If you are clever
enough, you could even have multiple directories for the same user come
from different nfs servers, e.g. ~user/Picture can be in one location
and ~user/Documents from another location. But the user logging into the
machine would only see it as a single location without any links.

-- 
Joseph Loo
jloo@acm.org

[toc] | [prev] | [next] | [standalone]


#193885

FromDavid Wright <deblis@lionunicorn.co.uk>
Date2018-03-18 17:50 +0100
Message-ID<vuJFn-2sT-5@gated-at.bofh.it>
In reply to#193881
On Sat 17 Mar 2018 at 18:33:59 (-0700), Joseph Loo wrote:
> On 03/17/2018 03:32 PM, Dennis Wicks wrote:
> > Greetings!
> > 
> > I have separated my /home file system from root so I can
> > install new systems without clobbering it. To make it most
> > useful is there any way I can mount, link, whatever, it so
> > that it appears to be an extension of, or included in,
> > /home? That is not just another mount on the root fs.
> > 
> > TIA Dennis
> > 
> Have you ever thought of doing an autofs mount on the /home directory?
> That way you do not need to have it a separate partition. I just mount
> the individual home directories to the /home mount point.

But doesn't that just push the problem down one level, which
multiplies it by the number of directories you had under /home.

> If you have an autofs setup, you could have the individual directories
> on different machines and share the same directory. If you are clever
> enough, you could even have multiple directories for the same user come
> from different nfs servers, e.g. ~user/Picture can be in one location
> and ~user/Documents from another location.

I do something a bit like this with my picture/video/flac/etc archives,
but I don't see the need to have these mounts made within the user's
own home directory.

> But the user logging into the
> machine would only see it as a single location without any links.

These archive-style directories aren't really the interesting issue.
What's important about *home* is the dot files and directories.
Having them scattered about on different machines can raise issues
because many of them are not suitable for sharing. What do you do
to cope with this? It also requires all the various sources to be
up before a user gets their home directory fully populated.

Cheers,
David.

[toc] | [prev] | [next] | [standalone]


#193882

FromJoseph Loo <jloo20111002@gmail.com>
Date2018-03-18 02:40 +0100
Message-ID<vuvsJ-1sM-7@gated-at.bofh.it>
In reply to#193878
On 03/17/2018 03:32 PM, Dennis Wicks wrote:
> Greetings!
> 
> I have separated my /home file system from root so I can
> install new systems without clobbering it. To make it most
> useful is there any way I can mount, link, whatever, it so
> that it appears to be an extension of, or included in,
> /home? That is not just another mount on the root fs.
> 
> TIA Dennis
> 
Have you ever thought of doing an autofs mount on the /home directory?
That way you do not need to have it a separate partition. I just mount
the individual home directories to the /home mount point.

If you have an autofs setup, you could have the individual directories
on different machines and share the same directory. If you are clever
enough, you could even have multiple directories for the same user come
from different nfs servers, e.g. ~user/Picture can be in one location
and ~user/Documents from another location. But the user logging into the
machine would only see it as a single location without any links.

-- 
Joseph Loo
jloo@acm.org

[toc] | [prev] | [next] | [standalone]


#193889

FromAbdullah Ramazanoglu <ar018@yahoo.com>
Date2018-03-18 21:30 +0100
Message-ID<vuN6h-4UK-5@gated-at.bofh.it>
In reply to#193878
On Sat, 17 Mar 2018 17:32:00 -0500 Dennis Wicks said:
> I have separated my /home file system from root so I can
> install new systems without clobbering it. To make it most
> useful is there any way I can mount, link, whatever, it so
> that it appears to be an extension of, or included in,
> /home? That is not just another mount on the root fs.

Hi Dennis,

I have a similar setup, with a 600 G mirrored (RAID-1) partition
holding all my goodies, and several other partitions for distros. Each
instance of them has their own /home directory as part of root
file system, but I don't put anything of value in those /home
directories.

My regular distro (Debian Buster) is in /dev/sda5 mounted as "/" and my
user home is "/home/aramazan/". My goodies (real home) directory is
in /dev/md1 (the raid-1 partition) mounted as "/ar".

In my home (/home/aramazan) directory;

~$ ln -s /ar .

This symlinks /ar partition as "/home/aramazan/ar" which I use as my
real home directory, so that I always access the same home, no matter
which partition I have booted up. That is;

/home/aramazan/ar -> /ar

My mail home is also residing in the common /ar partition (/ar/.Posta),
which is also symlinked from home, as in;

/home/aramazan/.Posta -> /ar/.Posta

P.S.: I have presented a simplified setup for the purposes of this
thread. Actually I have two separate "goodies" partition, both raid-1,
one of them is 600G (/ar) for general use, and the other is an
encrypted 40G partition for sensitive data (symlinked
under /home/aramazan the same way as /ar, only with a different name).
So I have two separate "homes" - a general home and a secure home. My
mail home is actually under the encrypted home.

-- 
Abdullah Ramazanoglu

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web