nfs shares not mounted at boot

Tom H tomh0665 at gmail.com
Wed Feb 25 10:57:02 UTC 2015


On Wed, Feb 25, 2015 at 5:55 AM, Tom H <tomh0665 at gmail.com> wrote:
> On Wed, Feb 25, 2015 at 4:45 AM, Jens Neu <jens at zeeroos.de> wrote:
>> On 02/23/2015 10:17 AM, Andrew R Paterson wrote:
>>>
>>> This poroblem occurs on other unices as well, try using the bg option in
>>> your nfs fstab entry.
>>
>> unfortunatley option bg does not resolve it. mount -a still is the way to
>> go.
>
> Pre-systemd there was a "_netdev" option for network mounts. It should
> still work.
>
> You can also create a .mount systemd unit.
>
> For example:
>
> # cat /etc/systemd/system/mnt-fedora.mount
> [Unit]
> After=network-online.target
> [Mount]
> What=127.0.0.1:/srv
> Where=/mnt/fedora
> Type=nfs
> Options=nfsvers=4
>
> # sc status mnt-fedora.mount
> ● mnt-fedora.mount - /mnt/fedora
>    Loaded: loaded (/etc/systemd/system/mnt-fedora.mount; static;
> vendor preset: enabled)
>    Active: active (mounted) since Wed 2015-02-25 05:51:12 EST; 6s ago
>     Where: /mnt/fedora
>      What: 127.0.0.1:/srv
>   Process: 4491 ExecMount=/bin/mount 127.0.0.1:/srv /mnt/fedora -n -t
> nfs -o nfsvers=4 (code=exited, status=0/SUCCESS)
>
> Feb 25 05:51:12 yoga.lenovo systemd[1]: Mounting /mnt/fedora...
> Feb 25 05:51:12 yoga.lenovo systemd[1]: Mounted /mnt/fedora.

Don't forget to comment out the nfs fstab entry.


More information about the users mailing list