Remount shared folder: alternative to mount -a
Some shared folders unexpectedly get unmounted sometimes, therefore I've scheduled a mount -a with the purpose of remountig only those shared folders that got unmounted in the meantime.
In the manual, however, I read:
Note that it is a bad practice to use mount -a for fstab checking.
The recommended solution is findmnt --verify.
It is my understanding that findmnt --verify checks all mounted filesystems, and does not perform any further action. I would like to only check cifs mounts and remount them if any error is encountered.
What is the preferred way to accomplish this?
Edit:
Thanks to Soren A for pointing out how to filter only cifs filesystems: findmnt -t cifs --verify.
Update:
I added a line in my /etc/fstab and findmnt --verify did not detect it as being unmounted. It thus seems ineffective at detecting unmounted entries in /etc/fstab. Maybe I just mistook fstab checking for checking whether all entries in fstab are correctly mounted instead of just verify /etc/fstab parsability and usability.
1 Answer
It seems I have misunderstood the meaning of the mount manual:
it is a bad practice to use mount -a for fstab checking.
Maybe because this is what I was looking for, I took it to mean: checking whether all entries in fstab are correctly mounted.
Instead, the findmnt manual says:
-x, --verify
Check mount table content. The default is to verify /etc/fstab parsability and usability.
So, it seems findmnt --verify is just meant to check the correctness of /etc/fstab, regardless of the current state of mounted filesystems.
More in general
"Zoraya ter Beek, age 29, just died by assisted suicide in the Netherlands. She was physically healthy, but psychologically depressed. It's an abomination that an entire society would actively facilitate, even encourage, someone ending their own life because they had no hope. Th…"