Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How can I create a auto.home file to mount certain /home directories via local disk and others via NFS?

share|improve this question

migrated from stackoverflow.com Mar 23 '11 at 12:29

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 2 down vote accepted

You should use the autofs package which can do this for you.

In /etc/auto.master, you'd put:

/home    /etc/auto.home

And in /etc/auto.home:

user1    my.other.machine:/path/to/user1
share|improve this answer
    
be carefull with nfs over wifi. –  MealstroM Mar 23 '11 at 13:47
    
I use NFS over wifi all the time. Works great (just a bit slower). Granted, it'll be a whole lot worse for home directories. –  Wes Hardaker Mar 23 '11 at 14:18
    
What syntax do I use in auto.home to mount some home directories via local disk, and some via NFS? –  Thomas Vincent Mar 23 '11 at 19:14
    
for a local disk, use "user1 -fstype=auto :/dev/sdb44" for example –  Wes Hardaker Mar 23 '11 at 19:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.