Errors with events/actions/remount-filesystems

(Eddie Atherton) #1

OK, I will admit up front that some of the naming in my system set up is probably strange to long-time Linux/UNIX admins, but it all is allowable according to the rules.

Recently when removing a package I no longer use it threw a couple of errors with the remount-filesystems script failing. Looking at the script, I can see why.

The script scans /etc/fstab and issues a mount for the filesystems using the first parameter in each parsed line. However, there are a number of constructs that are perfectly legal to use in /etc/fstab that do not work when issued by the mount command. In my case, here are 2 examples:

/poolmount/Data?        /MyPool fuse.mergerfs   atomic_o_trunc,auto_cache,big_writes,default_permissions,allow_other    0 0
/MyPool/F1\040Grand\040Prix     /var/lib/nethserver/ibay/F1_Grand_Prix  none    defaults,bind   0 0

Perhaps the script can be changed to use the second parameter of each /etc/fstab line instead, as I think that will always be acceptable to a mount command. Unless anyone knows differently. :grinning:


(Giacomo Sanchietti) #2

Oh, god! Never seen such strange path inside fstab! :smiley:

I think you’re right, @filippo_carletti do you agree?

(Filippo Carletti) #3

Ok for me.

(Eddie Atherton) #4

Well, I did say it was a weird set-up. :scream:

Now I think more, that will only work for the first of my “oddities”, the wild card mounting 6 drives in a mergerfs pool.

The second example, the space in the directory name, which requires the “/040” construct to work, could occur in either, or both, the mounted directory and the mount point.


(Giacomo Sanchietti) #5

Do you how we can protect such characters within the mount command?
Can you try with single quotes?
Something like:

mount -o remount '/My weird\04stuff'

(Eddie Atherton) #6

Sorry, that doesn’t work. Here’s what happens without the quotes:

 [root@NethServer ~]# mount -o remount /MyPool/F1\040Grand\040Prix
mount: can't find /MyPool/F1040Grand040Prix in /etc/fstab or /etc/mtab

And with quotes:

[root@NethServer ~]# mount -o remount '/MyPool/F1\040Grand\040Prix'
mount: can't find /MyPool/F1\040Grand\040Prix in /etc/fstab or /etc/mtab


(Eddie Atherton) #7

And another thing to consider. You can’t re-mount “fuse” type file systems:

Mar  8 18:17:49 NethServer esmith::event[3435]: fuse: mountpoint is not empty
Mar  8 18:17:49 NethServer esmith::event[3435]: fuse: if you are sure this is safe, use the 'nonempty' mount option
Mar  8 18:17:49 NethServer esmith::event[3435]: Action: /etc/e-smith/events/fstab-update/S20remount-filesystems FAILED: 1 [3.489736]