I'm working with a complex /etc/fstab
on a RHEL 6.x-based server. The system has a variety of mount options in use across eight partitions, including several bind mounts. I'm testing options and their effect on the image I'm working on.
e.g. options like nodev
,nosuid
,noexec
,nobarrier
and several XFS filesystem parameters are in place.
While I know it's possible to remount with specific options, is there a quick way to revert all mounts to the persistent settings hardcoded in /etc/fstab
?
For instance sysctl -p
loads the /etc/sysctl.conf
values and applies them. Is there a mount
equivalent?
Edit:
An example config:
#
# /etc/fstab
#
UUID=e6ca80cd / ext4 noatime,nobarrier 1 1
UUID=a327d315 /boot ext4 defaults 1 2
UUID=333ada18 /home ext4 noatime,nobarrier,nodev 1 2
UUID=7835718b /tmp ext4 nodev,nosuid,noexec 1 2
UUID=4dd2e9d4 /usr ext4 defaults 1 2
UUID=c274f65f /var ext4 noatime,nobarrier 1 2
UUID=5b5941e0 /var/log ext4 defaults 1 2
UUID=3645951a /var/log/audit ext4 defaults 1 2
UUID=3213123c /vol1 xfs noatime,logbufs=8,nobarrier 1 2
UUID=1ee1c070 swap swap defaults 0 0
# Bind mount for /tmp
/tmp /var/tmp none bind 0 0
tmpfs /dev/shm tmpfs nodev,nosuid,noexec 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
Of course, a developer asks for execute permissions on /tmp
in order to install an application...
I'm finding that the remount
option does not work on this system without specifying the device and (re)mountpoint. This is a security-hardened server, so the issues I'm seeing may be SElinux-related or a result of the bind mounts, or maybe even the presence of negated options (noexec versus exec)...