Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Systemd and mounting nfs drives
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
amasidlover
Apprentice
Apprentice


Joined: 16 Jun 2002
Posts: 293
Location: Manchester, UK

PostPosted: Mon Aug 24, 2015 3:27 pm    Post subject: Systemd and mounting nfs drives Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Mon Aug 24, 2015 3:56 pm    Post subject: Reply with quote

How is your NFS mount setup currently? Just an fstab entry?

https://wiki.archlinux.org/index.php/NFS#Mount_using_.2Fetc.2Ffstab_with_systemd
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
amasidlover
Apprentice
Apprentice


Joined: 16 Jun 2002
Posts: 293
Location: Manchester, UK

PostPosted: Tue Aug 25, 2015 7:54 am    Post subject: Reply with quote

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
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 591
Location: Australia

PostPosted: Tue Aug 25, 2015 12:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum