View previous topic :: View next topic |
Author |
Message |
amasidlover Apprentice
Joined: 16 Jun 2002 Posts: 293 Location: Manchester, UK
|
Posted: Mon Aug 24, 2015 3:27 pm Post subject: Systemd and mounting nfs drives |
|
|
Under OpenRC (which I still run on most of my machines), netmount and now nfs-client have always 'simply' mounted any NFS mounts listed in fstab.
However, I can't work out which service should be doing this under systemd - I'm pretty sure the pre-requisites (rpc etc.) are all loading since as soon as the system boots I can do mount [mount dir] from the command line and it just works. The closest I could find was this:
Code: |
lamech ~ # systemctl status remote-fs.target
● remote-fs.target - Remote File Systems
Loaded: loaded (/usr/lib64/systemd/system/remote-fs.target; enabled; vendor preset: enabled)
Active: active since Mon 2015-08-24 15:54:51 BST; 21min ago
Docs: man:systemd.special(7)
Aug 24 15:54:51 lamech systemd[1]: Starting Remote File Systems.
Aug 24 15:54:51 lamech systemd[1]: Reached target Remote File Systems.
|
So I've grepped for remote-fs and found nfs-client as a target, I then grepped for nfs-client and found nothing useful (in /usr/lib64/systemd/system/* )
Do I have to write my own .service to get network mounts to work under systemd (which is what I had to do to get a static IP working)? _________________ http://www.axiomtech.co.uk
http://www.zednax.com |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9677 Location: almost Mile High in the USA
|
|
Back to top |
|
|
amasidlover Apprentice
Joined: 16 Jun 2002 Posts: 293 Location: Manchester, UK
|
Posted: Tue Aug 25, 2015 7:54 am Post subject: |
|
|
Thanks for that link - not sure yet if it will work on reboot, but at least I've now managed to track down what systemd _should_ be doing and can manually start and stop the mounts and locate their statuses.... _________________ http://www.axiomtech.co.uk
http://www.zednax.com |
|
Back to top |
|
|
ian.au Guru
Joined: 07 Apr 2011 Posts: 591 Location: Australia
|
Posted: Tue Aug 25, 2015 12:15 pm Post subject: |
|
|
For automounting nfsv4 shares at boot, you just enable the rpcbind.service
I think you need to add the idmapd.service to do nfsv3 shares (Used to be the case anyway, I don't have any nfsv3 shares left and you don't say which). |
|
Back to top |
|
|
|