Autofs home dirs over NFS without masking local ones?

Autofs home dirs over NFS without masking local ones?

Post by Michael B Alle » Mon, 23 Apr 2007 12:09:40



If I use an auto.master like:

/home   /etc/auto.home --timeout=60

then when autofs mounts /home any local home directories are masked. This
is fine if *all* home directories are mounted over NFS.

However, I want to mount *some* home directories and some not.

One solution would be to simply put the NFS mounted home directories
somewhere else. But that would be inconsistent. Why should I have some
home directories scattered about.

Another solution would be to mount the home directory somewhere else
and then create a soft link to it (e.g. cd /home && ln -s /mnt/miallen
miallen). But having a link for a home directory is sub-optimal. You
have no control over it's permissions and some programs can be configured
not to follow links.

So, I ask, what is the best way to NFS mount home directories without
masking local home directories?

Thanks,
Mike

 
 
 

Autofs home dirs over NFS without masking local ones?

Post by Mark Hobl » Mon, 23 Apr 2007 18:08:02



> One way would be to put the local home directories in the automounter map
> and set up autofs onto another area - eg /homes (or vice-versa - move
> the "real" local home dirs somewhere else.

Possibly restructure the /home directory as follows:

/home/local
/home/network

The /home/network directory is mounted /autofs, and /home/local mounts as
/home does now.

Regards,

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Telephone: (0121) 247 1596
International: 0044 121 247 1596

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

 
 
 

Autofs home dirs over NFS without masking local ones?

Post by Joe Pfeiffe » Tue, 24 Apr 2007 08:39:07



Quote:> So, I ask, what is the best way to NFS mount home directories without
> masking local home directories?

I can think of a couple of possibilities.  I don't use autofs for
/home, instead I use it for each user's home directory individually.,
like this:

becca           -fstype=nfs     snowball:/snowball_home/becca

(my file server, snowball, is also one of my workstation; all home
directories are actually in /snowball_home/; they get mounted in /home
as needed).  This requires a line per home directory, of course.

Another option is to learn about unionfs, a fuse filesystem that
somehow merges the contents of two directory trees (I've never used
it, so don't know how well it will really work).

 
 
 

Autofs home dirs over NFS without masking local ones?

Post by birr » Tue, 24 Apr 2007 22:55:18



Quote:> If I use an auto.master like:

> /home   /etc/auto.home --timeout=60

> then when autofs mounts /home any local home directories are masked. This
> is fine if *all* home directories are mounted over NFS.

> However, I want to mount *some* home directories and some not.

> One solution would be to simply put the NFS mounted home directories
> somewhere else. But that would be inconsistent. Why should I have some
> home directories scattered about.

> Another solution would be to mount the home directory somewhere else
> and then create a soft link to it (e.g. cd /home && ln -s /mnt/miallen
> miallen). But having a link for a home directory is sub-optimal. You
> have no control over it's permissions and some programs can be configured
> not to follow links.

> So, I ask, what is the best way to NFS mount home directories without
> masking local home directories?

> Thanks,
> Mike

Do as in solaris , and have your local homes in /export/home ,
then add to /etc/auto.home

+auto.home
* localhost:/export/home/&

This should (I guess) look for users not found in the auto.home map
in your /export/home/* and mount them in /home

/birre

 
 
 

1. autofs mounting dirs under autofs mounted dirs.

I have two directories that I'd like to automount.

server:/home/username
server:/secure/username

I'd like them to show up as:

/home/username, and
/home/username/secure respectively.

I've got the first one working fine - it's getting that subdirectory one
to work that's troubling me.

If I create the directory, I can manually mount it, so I'm assuming
autofs can handle it and that my problem lies in my auto.* files.

What's the best way to do this?

If
username        -rw     server:/home/username
is a valid /etc/auto.home entry, then is this one:
username/secure -ro     server:/secure/username ?

Or do I need to do something funky with auto.master and create an
auto.secure, or a whole bunch of auto.user? (tried this and it didn't
seem to work).

Thanks.

2. new iptables firewalling script

3. Problem with autofs and local /home

4. Linux autologin PLEASE HELP!!

5. nfs - mount -t nfs host:<dir> <dir>

6. Help: How install Oracle in linux?

7. nis, nfs, autofs: auto.master, auto.misc, auto.home help please

8. C function to convert IP to name

9. Home dir without using ~ symbol

10. how to link /root and /home/user to one dir?

11. NFS home dir problem

12. Compilations stuck in the NFS mounted home dir. Why?!

13. NIS and home dirs via NFS