I verified the new devices and I can mount them with the
How may I validate the modifications made to
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
You can simple run:
-a Mount all filesystems (of the given types) mentioned in fstab.
This command will mount all (not-yet-mounted) filesystems mentioned in fstab and is used in system script startup during booting.
mount -aby rereading
/etc/fstabwould also reload
/etc/mtabso he should be fine with that only.
The mount command take an
-f for short. The following command should do what you need:
The following is in the documentation for
Causes everything to be done except for the actual system call; if it's not obvious, this ``fakes'' mounting the filesystem. This option is useful in conjunction with the -v flag to determine what the mount command is trying to do.
(Note this is Linux - check before using elsewhere: FreeBSD uses
-f for 'force' - exactly the opposite meaning.)
mount --fake -abut it seems to return
exit code($?)=0always. Umm..
successfully mountedeven when the mount point dosent exist Nov 23, 2018 at 8:33
mount -favvalidated it as correct. As soon as I did a
mount -ait found an error. Aug 11, 2019 at 20:42
"Debian GNU/Linux 11 (bullseye)"Jul 28, 2022 at 15:24
sudo findmnt --verify --verbose is the best way I've found
findmnttold me that
fuse.sshfs seems unsupported by the current kernel, which is not true because I was able to mount the sshfs share with
mount -aMar 8, 2021 at 3:10
errors=remout-rofor example, i have to boot using another live cd to investigate
Note that if you add a swap file to your fstab,
mount -a won't turn it on: you'll want to run
I found this /problem/ but the solution didn't meet my requirements.
When rebooting with any invalid entries in the /etc/fstab, such as missing file systems that fsck cannot check; the system will fail to boot. That can be much more difficult to deal with if you have a headless box.
This is my solution to checking /etc/fstab to avoid this boot problem:
# cat /usr/local/bin/check-fstab-uuid-entries.sh #!/usr/bin/env bash for x in $(grep ^UUID /etc/fstab|cut -d \ -f 1|cut -d = -f 2) do if [ ! -h /dev/disk/by-uuid/$x ];then echo $(grep $x /etc/fstab) ..... not found fi done
mount -fav... Jan 30, 2022 at 5:18
TBH even fake mounting doesn't safely validate the fstab for bad fs type entries.
you can have entries that have correct uuid's, directories etc but if you specify a noexistant FS type this will halt your boot next time.
[root@grumpy ~]# grep backup /etc/fstab UUID=5ed48e5e-7251-4d49-a273-195cf0432a89 /mnt/backup noatime,nodiratime,xfs defaults,nodev,nosuid 0 0 [root@grump ~]# [root@grumpy ~]# mount -fav | grep backup /mnt/backup : successfully mounted [root@grumpy ~]#
mount -a is safe method to check /etc/fstab otherwise wrong entry could break the system
It is also advised to keep a backup copy of original /etc/fstab file. it could be copied to home directory of root
I open another term or tab and run: tail -f /var/log/kern.log
Sometimes errors show there that don't show when mounting.