Networking Forums

Networking Forums > Computer Networking > Linux Networking > Autofs home dirs over NFS without masking local ones?

Reply
Thread Tools Display Modes

Autofs home dirs over NFS without masking local ones?

 
 
Michael B Allen
Guest
Posts: n/a

 
      04-22-2007, 03:09 AM
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

 
Reply With Quote
 
 
 
 
Tim S
Guest
Posts: n/a

 
      04-22-2007, 07:25 AM
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
 
Mark Hobley
Guest
Posts: n/a

 
      04-22-2007, 09:08 AM
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
 
Joe Pfeiffer
Guest
Posts: n/a

 
      04-22-2007, 11:39 PM
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
 
birre
Guest
Posts: n/a

 
      04-23-2007, 01:55 PM
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

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
assigning a static local IP to a machine on my home network laredotornado@zipmail.com Wireless Internet 6 03-11-2007 05:13 PM
Autofs removes /home on restart James Backa Linux Networking 3 07-21-2005 08:27 PM
masking question alexk Linux Networking 2 12-25-2004 11:56 AM
Can see dirs but not files on LAN Rock Linux Networking 0 02-01-2004 04:42 AM
How to auto logon WIN98 with a local home network? Raman Windows Networking 2 12-07-2003 02:56 AM



1 2 3 4 5 6 7 8 9 10 11