How to Change Mount Options at Runtime
File systems need to be mounted on Linux before you can access the data on them. You can specify mount options such as whether the file system is Read Only or Read/Write, and whether to support Access Control List, etc.
To see what file systems are currently mounted, where, and with what options, issue the mount command without arguments:
Recently, I wanted to tell the file system not to track the last access time (atime) of files under /home. I did not have any good use for the last access time. So, I opted to disable its tracking to reduce disk activity and save a few watts. This is accomplished through adding the mount option noatime.
To change the mount option for /home:
To remount a file system, say /home, with new mount options at run-time, issue a command like this:
There you have it. You can now feel good about saving a few watts, and be the hero in saving the environment.
To see what file systems are currently mounted, where, and with what options, issue the mount command without arguments:
$ mount
...
/dev/hda5 on /home type ext3 (rw,acl)
...
Recently, I wanted to tell the file system not to track the last access time (atime) of files under /home. I did not have any good use for the last access time. So, I opted to disable its tracking to reduce disk activity and save a few watts. This is accomplished through adding the mount option noatime.
To change the mount option for /home:
- Edit /etc/fstab as root.
- Add the option noatime to the line that corresponds to /home:
/dev/hda5 /home ext3 defaults,acl,noatime 0 2
- To make the change effective, you can either reboot (to which you sneer) or you can remount /home.
To remount a file system, say /home, with new mount options at run-time, issue a command like this:
$ mount -o remount,noatime /home
There you have it. You can now feel good about saving a few watts, and be the hero in saving the environment.