Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Autofs home dirs over NFS without masking local ones?

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2007, 04:09 AM
Default Autofs home dirs over NFS without masking local ones?



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



Michael B Allen
Reply With Quote
  #2  
Old 04-22-2007, 08:25 AM
Tim S
Guest
 
Posts: n/a
Default Re: Autofs home dirs over NFS without masking local ones?

Michael B Allen wrote:

> 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.


Not possible in the general sense - automounters work by mounting an autofs
filesystem over, in this case, /home, so all the contents are masked as
soon as the automounter starts.

That doesn't preclude "interesting" solutions, one of which I'll propose
below (there are probably others).

> 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.


That's what /etc/passwd is for - though I do understand your desire for
uniformity.

> 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.


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.

autofs on linux is bright enough to bind mount local filesystems, so there
is no loss of efficiency.

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



Cheers

Tim
Reply With Quote
  #3  
Old 04-22-2007, 10:08 AM
Mark Hobley
Guest
 
Posts: n/a
Default Re: Autofs home dirs over NFS without masking local ones?

Tim S <(E-Mail Removed)> wrote:
> 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/

Reply With Quote
  #4  
Old 04-23-2007, 12:39 AM
Joe Pfeiffer
Guest
 
Posts: n/a
Default Re: Autofs home dirs over NFS without masking local ones?

Michael B Allen <(E-Mail Removed)> writes:

> 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).

Reply With Quote
  #5  
Old 04-23-2007, 02:55 PM
birre
Guest
 
Posts: n/a
Default Re: Autofs home dirs over NFS without masking local ones?

On 2007-04-22 05:09, Michael B Allen wrote:
> 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
Reply With Quote
Reply

Tags
autofs, dirs, home, local, masking, nfs

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 08:37 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.