LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-14-2013, 04:40 PM   #1
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
question about using systemd and automount for NFS share


I have been reading up on systemd and automount.automount to attempt to start replacing my use of autofs on the Fedora 19 laptops in my home network.

I am a bit confused about the use of /etc/systemd/system/foo.mount use before putting the automount.automount in fstab.

https://wiki.archlinux.org/index.php/Systemd#Automount
Quote:
If you have a large /home partition, it might be better to allow services that do not depend on /home to start while /home is checked by fsck. This can be achieved by adding the following options to the /etc/fstab entry of your /home partition:

noauto,x-systemd.automount

This will fsck and mount /home when it is first accessed, and the kernel will buffer all file access to /home until it is ready.
Note: This will make your /home filesystem type autofs, which is ignored by mlocate by default. The speedup of automounting /home may not be more than a second or two, depending on your system, so this trick may not be worth it.

The same applies to remote filesystem mounts. If you want them to be mounted only upon access, you will need to use the noauto,x-systemd.automountparameters. In addition, you can use the x-systemd.device-timeout=# option to specify a timeout in case the network resource is not available.

If you have encrypted filesystems with keyfiles, you can also add the noauto parameter to the corresponding entries in /etc/crypttab. systemd will then not open the encrypted device on boot, but instead wait until it is actually accessed and then automatically open it with the specified keyfile before mounting it. This might save a few seconds on boot if you are using an encrypted RAID device for example, because systemd does not have to wait for the device to become available. For example:

/etc/crypttab

data /dev/md0 /root/key noauto

so if i follow this correctly first i need to create a file in /etc/systemd/system/exports.mount and it should have something along the following:
Code:
[Unit]
Description = NFS media share

[Mount]
What = LABEL=exports
Where = /home/user/NFS
Type = nfsv4

[Install]
WantedBy = user.target
do i need that at all or can i just use the

x-systemd.device-timeout=#
and

noauto,x-systemd.automount

in fstab:

Code:
server_name:/exports    /home/user/NFS    nfs    noauto,x-systemd.automount,x-system.device-timeout=5,soft,rsize=16384,wsize=16384    0 0
or something like that.
 
Old 08-16-2013, 06:48 AM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Original Poster
Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
wow this is unusual for these forums, did i put this in the wrong place?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xen/NFS Share question-> sharptech Linux - Software 1 10-06-2010 09:38 AM
trying to automount an NFS share shahz Linux - Server 10 07-22-2009 05:30 AM
How to automount the nfs share in Mandriva 2007.1 deepugopi Linux - Server 4 10-12-2007 09:51 PM
Mounted NFS share service question tito2502 SUSE / openSUSE 1 12-15-2006 12:11 PM
NFS server share saving question emailssent Linux - Networking 1 10-07-2004 11:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration