Re: NFS mounts at boot broken on F15?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I solaved the problem by adding a comment=systemd.automount
> for the NFS mounts in fstab. See man systmd.automount
> Louis

Another way to solve this problem is to just use systemd unit files, placed in:

  /etc/systemd/system

For example, here's a working pair of unit files that handle my
automount of a NAS backup dir for me:

# ----------
# notes:
# - to do a straight mount, you only need this file
# - the name should match the intended dir
#   ex. 'mnt-nas-bak' -> '/mnt/nas/bak'
$ cat /etc/systemd/system/mnt-nas-bak.mount
[Unit]
Description=NAS bak rootdir
Wants=network.target statd.service

[Mount]
What=cartman:/var/nas/bak
Where=/mnt/nas/bak
Type=nfs
Options=noatime
TimeoutSec=15
StandardOutput=syslog
StandardError=syslog

# ----------
# notes:
# - and to set this as an automount, add this unit file
$ cat /etc/systemd/system/mnt-nas-bak.automount
[Unit]
Description=NAS bak rootdir automount
Wants=network.target statd.service

[Automount]
Where=/mnt/nas/bak

[Install]
WantedBy=multi-user.target
# ----------

Then register the unit files with systemd:

$ sudo systemctl daemon-reload
$ sudo enable mnt-nas-bak.automount


--Mike
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux