unknown option: x-systemd.automount

I have two shares working with systemd.automount but adding another share fails on the client end. The fstab entries on the client machines all use the following format:

192.168.1.223:/z/d/   mnt/m9nfs/d   nfs   noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10,_netdev,x-systemd.idle-timeout=5min  0  0

All of the shares are specified in the YaST NFS server module on the server machine and the client NFS client module. I cannot figure out why a newly added share registers an error on the client end. I must be missing something very simple.

Well, I managed to solve it by entering this command:

linux-9:~ #  exportfs -rav
exporting *:/z/g
exporting *:/z/f
exporting *:/z/e
exporting *:/z/d
linux-9:~ #

This was suggested by a Red Hat post:https://access.redhat.com/solutions/3773891

I now need to figure out why entry of the share in the NFS server without taking any additional steps was insufficient.

I suspect that the two other shares (d and e) worked because the server machine was rebooted, effectively stopping and restarting the NFS server.

Everything you do in /etc/exports is not imediatly active. Using exportfs propagates it to the master export table.
At boot exportfs is run. When one changes /etc/exports later during system up time, this becomes active either on next boot, or on using exportfs.

Read

man exportfs

The title of this thread is misleading. Has the “unkown option” message actually been observed, and if yes, under which circumstances?

You are correct. An error message was shown in the title, but we never got explained where it was shown. I assume it was a side effect of the export not being found (as the server was not updated with the new information). But a not very clear error in any case.

As you can see from last my two posts (##2 &3), I determined the reason for the error: the new share had not been exported. Because I had been using autofs for some time, the first two shares had been exported long before I added systemd.automount entries to the fstab files on the client machines. Since the d and e shares worked, I was initially stumped - the very same fstab entry for f (and then g) failed. (Thank you, Henk, for suggesting systemd.automount in another thread; I used your formulation for the options and it works very well.)

After reading the Red Hat post and the exportfs man page, I realized that the YaST NFS server was not exporting the share. If I was creating the share via the command line, I would expect to have to use the exportfs command, perhaps with option -a. There must be a reason why the developers did not incorporate the export function into the YaST NFS server module.

The title is based upon the information I had when I first posted this thread. The phrase “unknown option” was generated in YaST when I accessed the share in YaST NFS client on a few machines and noticed an asterisk in the share point entry. (Edit > OK > "Error - Unknown option: ‘x-systemd.automount’) An asterisk and the same error message also appear when the mount times out. In retrospect, a more accurate title would be: “mount.nfs: access denied by server while mounting.” That was generated in Dolphin on the client machines when I attempted to access the share.

Thanks for the explanation. I assume that YaST gives the “umknown option” message because it does not understand the systemd options.

On the sever side, indeed we system managers learned already 40 years ago that after editing the /etc/exports, you should do exportfs to activate those changes. :wink:

And I am with you when you say that YaST > NFS Server should do the exportfs by itself after changes are done (those are the details we have system managment tools like YaST for). I do not understand why it doesn’t. Maybe someone could document that and file a bug report?

Henk -

Thank you. I will take some screen shots in NFS client and post them so that you can see the exact message in context. I can then submit a bug report if you believe it would aid the developers.

Regarding the NFS Server dialog and exportfs function, I can submit that as well. The reference guide does not mention running the command exportfs when creating a share. See https://doc.opensuse.org/documentation/leap/reference/html/book-reference/cha-nfs.html#sec-nfs-configuring-nfs-server. It does mention the exports man page in step 7, which in turn discusses exportfs. See https://linux.die.net/man/5/exports.

Fine. Maybe better do not call them “shares”, but exports. They are NFS exports and NFS mounts. Already years before Microsoft invented it’s own terminlogy. And as the saying goes: "when doing Unix/Linux, forget everything you learned about MS Windows.

Henk -

Perhaps the reference guide chapter title, “Sharing file systems with NFS,” colored my thinking: https://doc.opensuse.org/documentation/leap/reference/html/book-reference/cha-nfs.html

Yes, I know that this term is used by many. Pollution everywhere rotfl! .

Someone please correct it with “Edit source” or “Report Documentation Bug” buttons.

I am afraid that the mentioning of the MS term there is done because many people will know that term from their former life as MS Windows adepts. And the author wants to catch their attention.

I have submitted the Bugzilla bug reports for the x-systemd.automount error and a suggestion to add exportfs to the YaST2 NFS server share export process. See: https://bugzilla.suse.com/show_bug.cgi?id=1187781 and https://bugzilla.suse.com/show_bug.cgi?id=1187782.

If appropriate, perhaps the title of this thread could be edited to read, “mount.nfs: access denied by server while mounting,” as mentioned in post #7 above. https://forums.opensuse.org/showthread.php/556018-unknown-option-x-systemd-automount?p=3043678#post3043678.

The bug report for the x-systemd.automount error has been picked up by the bugzilla folks and they are addressing the issue. See comments #2 and #3 here: https://bugzilla.suse.com/show_bug.cgi?id=1187781#c2.