Testing fstab without restart?
I need to do some changes to fstab,so i wondering is it possible to test it does it work without restating?Because if add something wrong then linux wont start ssh and i wont be able to access server remotely.What i want to do,is to mount /dev/shm with noexec,nosuid instead none.
|
Use umount and mount. No harm done to me.
Code:
$ grep shm /etc/fstab |
You can try to mount, if there is any typo error or wrong directory, it will give you message at standard out.
mount -a mount: mount point /boots does not exist mount: mount point swap does not exist |
My advice, don't do a mount -a unless you just have to, that's just bad practice if it's just one mount point you need to deal with. Read the man page to learn what the -a does and why you think it might not be a good idea to run on an existing running system.
If you want to test new mount options, don't even edit fstab until you know they work properly. Just do something like: mount -o rw,nosuid,noexec,remount /dev/shm Test, if all seems good, then proceed with editing your fstab and go from that point on. |
Yes i used command mount -o remount /dev/shm and it worked pretty fine.
|
All times are GMT -5. The time now is 01:02 AM. |