Skip to main content
Topic: Artix Gnome OpenRC dont mount NFS Shares at start (Read 1315 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Artix Gnome OpenRC dont mount NFS Shares at start

Hi,

two days ago i found Artix Linux. Prior that i used Arch Linux over 10 Years.

And i must say, great Distribrution! Nice to know that there exist a Systemd Variant of Arch.

Thanks for the hard Work.

I had  a lot of Problems, but many of them was because of "old thinking systemd" and i could fix them.

Now i have everything working. Even my two Windows VMs with GPU passthroughed (that gave me the most problems, because i didnt know that i could use the Archlinux Repo for virt-manager for example.

The only Issue i know have, is the Problem that i cant get my NFS Shares mounted at start.

mount -a works after start, so fstab works.

I already thought that i maybe need to start nfs and rpc.statd. both i enabled with rc-update.

That is my fstab:

10.10.10.3:/mnt/Storage/Solaris /mnt/nfs_solaris nfs defaults 0 0
10.10.10.3:/mnt/Storage/Luna /mnt/nfs_luna nfs defaults 0 0
10.10.10.3:/mnt/Storage/Terra /mnt/nfs_terra nfs defaults 0 0

Sry for my bad English. im native german.

Edit:

Here is the rc.log

Code: [Select]
rc boot logging started at Sun Jul 18 02:08:02 2021

 * Loading module crypto_user ...
 [ ok ]
 * Loading module sg ...
 [ ok ]
 * Setting system clock using the hardware clock [UTC] ...
 [ ok ]
 * Mounting misc binary format filesystem ...
 [ ok ]
 * Loading custom binary format handlers ...
 [ ok ]
 * Checking local filesystems  ...
fsck.fat 4.2 (2021-01-31)
/dev/nvme1n1p1: 6 files, 70/76646 clusters
 [ ok ]
 * Remounting filesystems ...
 [ ok ]
 * Updating /etc/mtab ...
 * Creating mtab symbolic link
 [ ok ]
 * Activating swap devices ...
 [ ok ]
 * Mounting local filesystems ...
 [ ok ]
 * Configuring kernel parameters ...
 [ ok ]
 * Creating user login records ...
 [ ok ]
 * Wiping /tmp directory ...
 [ ok ]
 * Starting dbus ...
 [ ok ]
 * Starting elogind ...
 [ ok ]
 * Setting hostname to threadripper from /etc/hostname ...
 [ ok ]
 * Setting terminal encoding [UTF-8] ...
 [ ok ]
 * Setting keyboard mode [UTF-8] ...
 [ ok ]
 * Loading key mappings [de] ...
 [ ok ]
 * Bringing up network interface lo ...
 [ ok ]
 * Bringing up interface lo
 *   Caching network module dependencies
 *   127.0.0.1/8 ...
 [ ok ]
 *   Adding routes
 *     127.0.0.0/8 via 127.0.0.1 ...
 [ ok ]
 [ ok ]
 * Setting up sysusers.d entries ...
 [ ok ]
 * Setting up tmpfiles.d entries ...
 [ ok ]
 * Saving key mapping ...
 [ ok ]
 * Saving terminal encoding ...
 [ ok ]
 * Initializing random number generator ...
 [ ok ]

rc boot logging stopped at Sun Jul 18 02:08:04 2021


rc default logging started at Sun Jul 18 02:08:04 2021

 * Starting NetworkManager ...
 [ ok ]
Connecting......             1sConnecting.......            1sConnecting........           1sConnecting.........          1sConnecting..........         1sConnecting...........        1sConnecting............       1sConnecting.............      1sConnecting..............     1sConnecting...............    1sConnecting...............    0s [offline]
 * Marking NetworkManager as inactive. It will automatically be marked
 * as started after a network connection has been established.
 * WARNING: NetworkManager has started, but is inactive
 * Starting acpid ...
 [ ok ]
 * Starting bluetoothd ...
 [ ok ]
 * Starting cronie ...
 [ ok ]
 * Starting rpcbind ...
 [ ok ]
 * Starting NFS statd ...
 [ ok ]
 * Setting up RPC pipefs ...
 [ ok ]
 * Starting idmapd ...
 [ ok ]
 * Starting NFS sm-notify ...
 [ ok ]
 * WARNING: netmount will start when NetworkManager has started
 * Starting gdm ...
 [ ok ]
 * Starting ntpd ...
 [ ok ]
 * Mounting nfsd filesystem in /proc ...
 [ ok ]
 * Starting NFS mountd ...
 [ ok ]
 * Starting NFS daemon ...
 [ ok ]
 * Starting NFS smnotify ...
 [ ok ]
 * Starting virtlogd ...
 [ ok ]
 * Starting libvirtd ...
 [ ok ]
 * Starting libvirt networks ...
 [ ok ]
 * Starting libvirt domains ...
 *   Windows
 [ ok ]
 * Starting local ...
 [ ok ]

rc default logging stopped at Sun Jul 18 02:08:13 2021

Re: Artix Gnome OpenRC dont mount NFS Shares at start

Reply #1
I believe the problem is that the file systems get mounted before your NFS are up. OpenRC literally just runs mount -a just like you are doing now, however I think it is happening so early that NFS is not up when it is run.

To get around this problem you could create a file at /etc/local.d/mount-nfs.start

Inside that file put this:
Code: [Select]
#!/bin/sh
mount -a

Make sure to make the file executable.

That will run mount -a again once the system is fully up. Anything in /etc/local.d is always run after everything else in init.
Chris Cromer

Re: Artix Gnome OpenRC dont mount NFS Shares at start

Reply #2
I believe the problem is that the file systems get mounted before your NFS are up. OpenRC literally just runs mount -a just like you are doing now, however I think it is happening so early that NFS is not up when it is run.

To get around this problem you could create a file at /etc/local.d/mount-nfs.start

Inside that file put this:
Code: [Select]
#!/bin/sh
mount -a

Make sure to make the file executable.

That will run mount -a again once the system is fully up. Anything in /etc/local.d is always run after everything else in init.

Ok this would be a workaround. but is this the right way?


Re: Artix Gnome OpenRC dont mount NFS Shares at start

Reply #4
Did you add netmount to your default run level?

Did you configure the netmount conf.d filr for OpenRC to use your networking software?

https://wiki.gentoo.org/wiki/Nfs-utils#Mounting_exports

Didnt know. But in the log in my first post, you see that netmount get started.

i didnt configured anything in the netmount file. i give a look.

The link didnt help me. i added _netdev to my fstab. still not working.

EDIT:

I edited netmount but still no sucess.

rc.log:
Code: [Select]
rc boot logging started at Sun Jul 18 19:42:06 2021

 * Loading module crypto_user ...
 [ ok ]
 * Loading module sg ...
 [ ok ]
 * Setting system clock using the hardware clock [UTC] ...
 [ ok ]
 * Mounting misc binary format filesystem ...
 [ ok ]
 * Loading custom binary format handlers ...
 [ ok ]
 * Checking local filesystems  ...
fsck.fat 4.2 (2021-01-31)
/dev/nvme1n1p1: 6 files, 70/76646 clusters
 [ ok ]
 * Remounting filesystems ...
 [ ok ]
 * Updating /etc/mtab ...
 * Creating mtab symbolic link
 [ ok ]
 * Activating swap devices ...
 [ ok ]
 * Mounting local filesystems ...
 [ ok ]
 * Configuring kernel parameters ...
 [ ok ]
 * Creating user login records ...
 [ ok ]
 * Wiping /tmp directory ...
 [ ok ]
 * Starting dbus ...
 [ ok ]
 * Starting elogind ...
 [ ok ]
 * Setting hostname to threadripper from /etc/hostname ...
 [ ok ]
 * Setting terminal encoding [UTF-8] ...
 [ ok ]
 * Setting keyboard mode [UTF-8] ...
 [ ok ]
 * Loading key mappings [de] ...
 [ ok ]
 * Bringing up network interface lo ...
 [ ok ]
 * Bringing up interface lo
 *   Caching network module dependencies
 *   127.0.0.1/8 ...
 [ ok ]
 *   Adding routes
 *     127.0.0.0/8 via 127.0.0.1 ...
 [ ok ]
 [ ok ]
 * Setting up sysusers.d entries ...
 [ ok ]
 * Setting up tmpfiles.d entries ...
 [ ok ]
 * Saving key mapping ...
 [ ok ]
 * Saving terminal encoding ...
 [ ok ]
 * Initializing random number generator ...
 [ ok ]

rc boot logging stopped at Sun Jul 18 19:42:08 2021


rc default logging started at Sun Jul 18 19:42:09 2021

 * Starting NetworkManager ...
 [ ok ]
Connecting......             1sConnecting.......            1sConnecting........           1sConnecting.........          1sConnecting..........         1sConnecting...........        1sConnecting............       1sConnecting.............      1sConnecting..............     1sConnecting...............    1sConnecting...............    0s [offline]
 * Marking NetworkManager as inactive. It will automatically be marked
 * as started after a network connection has been established.
 * WARNING: NetworkManager has started, but is inactive
 * Starting acpid ...
 [ ok ]
 * Starting bluetoothd ...
 [ ok ]
 * Starting cronie ...
 [ ok ]
 * Starting rpcbind ...
 [ ok ]
 * Starting NFS statd ...
 [ ok ]
 * Setting up RPC pipefs ...
 [ ok ]
 * Starting idmapd ...
 [ ok ]
 * Starting NFS sm-notify ...
 [ ok ]
 * WARNING: netmount will start when NetworkManager has started
 * Starting gdm ...
 [ ok ]
 * Starting ntpd ...
 [ ok ]
 * Mounting nfsd filesystem in /proc ...
 [ ok ]
 * Starting NFS mountd ...
 [ ok ]
 * Starting NFS daemon ...
 [ ok ]
 * Starting NFS smnotify ...
 [ ok ]
 * Starting virtlogd ...
 [ ok ]
 * Starting libvirtd ...
 [ ok ]
 * Starting libvirt networks ...
 [ ok ]
 * Starting libvirt domains ...
 *   Windows
 [ ok ]
 * Starting local ...
 [ ok ]

rc default logging stopped at Sun Jul 18 19:42:17 2021

netmount:
Code: [Select]
# You will need to set the dependencies in the netmount script to match
# the network configuration tools you are using. This should be done in
# this file by following the examples below, and not by changing the
# service script itself.
#
# Each of these examples is meant to be used separately. So, for
# example, do not set rc_need to something like "net.eth0 dhcpcd".
#
# If you are using newnet and configuring your interfaces with static
# addresses with the network script, you  should use this setting.
#
#rc_need="network"
#
# If you are using oldnet, you must list the specific net.* services you
# need.
#
# This example assumes all of your netmounts can be reached on
# eth0.
#
#rc_need="net.eth0"
#
# This example assumes some of your netmounts are on eth1 and some
# are on eth2.
#
#rc_need="net.eth1 net.eth2"
#
# If you are using a dynamic network management tool like
# NetworkManager, dhcpcd in standalone mode, wicd, badvpn-ncd, etc, to
# manage the network interfaces with the routes to your netmounts, you
# should list that tool.
#
rc_need="NetworkManager"
#rc_need="dhcpcd"
#rc_need="wicd"
#
# The default setting is designed to be backward compatible with our
# current setup, but you are highly discouraged from using this. In
# other words, please change it to be more suited to your system.
#
#rc_need="net"
#
# Mark certain mount points as critical.
# This contains aspace separated list of mount points which should be
# considered critical. If one of these mount points cannot be mounted,
# netmount will fail.
# By default, this is empty.
#critical_mounts="/home /var"

 

Re: Artix Gnome OpenRC dont mount NFS Shares at start

Reply #5
There is no solution for this?