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.
man findmnt
... it seems that -t or --types list takes a comma seperated list of filesystem types.