WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: how to automount nfs home directory  (Read 5583 times)

Offline risto3

  • Newbie
  • *
  • Posts: 43
how to automount nfs home directory
« on: January 15, 2013, 06:29:50 AM »
I'm at odds at finding the appropriate equivalent to autofs auto_home with nfs home directories on tinycore.

nfs-client seems to work alright on our tinycore thin clients, but now I'd like to get auto_home working.

cant't seem to find autofs in the apps directory.  the persistence for dummies nor netbooting really say anything about this.

Can anybody steer me in the right direction?

thanks in advance

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: how to automount nfs home directory
« Reply #1 on: January 15, 2013, 09:17:33 AM »
Use the nfsmount and home=nfs boot options described here: http://wiki.tinycorelinux.net/wiki:netbooting

Offline risto3

  • Newbie
  • *
  • Posts: 43
Re: how to automount nfs home directory
« Reply #2 on: January 15, 2013, 11:32:42 AM »
Yes, I know but that's a static mount at boot time. 

I'd like to use an auto_home for the login user such that my netboot can stay generic for all clients...

It's not possible then with linux (tiny core)?

Offline risto3

  • Newbie
  • *
  • Posts: 43
Re: how to automount nfs home directory
« Reply #3 on: March 14, 2013, 02:25:12 AM »
Finally got back to try to test this...
There seem to be a lot of limitations here, and I have yet to get it to work correctly.

First, it appears that nfsmount is designed to only take the "one" nfs mount, we have several.
for a simple example, if I specify on the bootline 'nfsmount=192.168.0.1:/export/dossiers nfsmount=192.168.0.1:/export/home home=nfs' I notice (using df) that only the first is actually mounted in /mnt/nfs while I get funky errors and a local home mount.

setting user=  also f*cks up /etc/passwd changing the uid for my user (as on the server).

Is there a way I could specify statically in /etc/vfstab the nfs mounts (and home lofs mounts)?


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11576
Re: how to automount nfs home directory
« Reply #4 on: March 14, 2013, 02:40:52 AM »
Hi risto3
Maybe you could just specify that the home directory NFS mounts on boot, then create a file in ~/.X.d that mounts
any other NFS shares you require?

Offline risto3

  • Newbie
  • *
  • Posts: 43
Re: how to automount nfs home directory
« Reply #5 on: March 18, 2013, 12:06:56 PM »
Hi risto3
Maybe you could just specify that the home directory NFS mounts on boot, then create a file in ~/.X.d that mounts
any other NFS shares you require?

This is frustrating.  If I set nfsmount=192.168.0.1:/export/home home=nfs noautologin
I get beans!
mkdir: can't create directory /mnt/nfs/home  permission denied
mount: mounting /mnt/nfs/home on /home failed   no such file or directory
ls /mnt/nfs shows my user directories so it is missing a level I believe.

If I get to root (tc is always created, need to set passwd on root, and hoopla, login to root and rm -rf /home and mkdir /home
then if I try to #mount -t nfs 192.168.0.1:/export/home /home,
I get a 'can't set permissions on mtab: operation no permitted' error.

I get the same things (mtab error) if I do
#mkdir /mnt/dossiers
# mount -t nfs 192.168.0.1:/export/dossiers /mnt/dossiers

so nfs seems a bit upset in general. (I'm getting there too)

There must be a way to do this butt standard nfs home directory mount. 
Is this tested somewhere with a solaris nfs server ? 
Is CIFS perhaps an alternative?

btw, I took home out of /opt/.filelist as well.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: how to automount nfs home directory
« Reply #6 on: March 18, 2013, 12:14:37 PM »
The sole purpose of the nfsmount boot option is to define the nfs directory that contains the tce directory.
It is not for general use.  If you want to mount other nfs directories, do it in bootlocal.sh.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11576
Re: how to automount nfs home directory
« Reply #7 on: March 18, 2013, 12:26:27 PM »
Hi risto3
Are you really exporting   /export/home? Or are you exporting   /home? If it's the latter, maybe:
Code: [Select]
nfsmount=192.168.0.1:/home

Offline risto3

  • Newbie
  • *
  • Posts: 43
Re: how to automount nfs home directory
« Reply #8 on: March 18, 2013, 12:57:08 PM »
Hi risto3
Are you really exporting   /export/home? Or are you exporting   /home? If it's the latter, maybe:
Code: [Select]
nfsmount=192.168.0.1:/home

Yes, nfsserver:/export/home is export, because autohome on unix does a loopback mount from [nfshost | localhost]:/export/home/<username> to /home/<username> on the local workstation.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11576
Re: how to automount nfs home directory
« Reply #9 on: March 18, 2013, 01:05:54 PM »
Hi risto3
Did you look through dmesg to see if there were any NFS related errors reported?
Code: [Select]
dmesg | lessUse PageUp and PageDown to navigate, q to quit.

Offline risto3

  • Newbie
  • *
  • Posts: 43
Re: how to automount nfs home directory
« Reply #10 on: March 18, 2013, 01:14:42 PM »
Hi risto3
Did you look through dmesg to see if there were any NFS related errors reported?
Code: [Select]
dmesg | lessUse PageUp and PageDown to navigate, q to quit.

nothing in particular, see attached