Topic review - FreeBSD 9 : Remount an already mounted filesystem without unmounting it
Author
Message
mandrei99
Post subject: FreeBSD 9 : Remount an already mounted filesystem without unmounting it | Posted: Wed Feb 05, 2014 12:16 pm
Existing mounted filesystems and their options.
To remount an already mounted filesystem without unmounting it (in Linux world) is changing mount options in FreeBSD world. Quote "man mount":
Quote:
-u The -u flag indicates that the status of an already mounted file system should be changed. Any of the options discussed above (the -o option) may be changed; also a file system can be changed from read-only to read-write or vice versa. An attempt to change from read-write to read-only will fail if any files on the file system are currently open for writing unless the -f flag is also specified. The set of options is determined by applying the options specified in the argument to -o and finally applying the -r or -w option.
Code:
# mount /dev/da0p2 on / (ufs, local, journaled soft-updates) devfs on /dev (devfs, local, multilabel) /dev/da0p4 on /storage (ufs, local, journaled soft-updates) devfs on /var/named/dev (devfs, local, multilabel)
The goal is to change the "/storage" filesystem mount option to add "noatime".
Code:
# mount -u -o rw,noatime /storage # mount /dev/da0p2 on / (ufs, local, journaled soft-updates) devfs on /dev (devfs, local, multilabel) /dev/da0p4 on /storage (ufs, local, noatime, journaled soft-updates) devfs on /var/named/dev (devfs, local, multilabel)
No unmounting, no reboot required.
Existing mounted filesystems and their options.
To remount an already mounted filesystem without unmounting it (in Linux world) is changing mount options in FreeBSD world. Quote "man mount": [quote] -u The -u flag indicates that the status of an already mounted file system should be changed. Any of the options discussed above (the -o option) may be changed; also a file system can be changed from read-only to read-write or vice versa. An attempt to change from read-write to read-only will fail if any files on the file system are currently open for writing unless the -f flag is also specified. The set of options is determined by applying the options specified in the argument to -o and finally applying the -r or -w option. [/quote]
[code]# mount /dev/da0p2 on / (ufs, local, journaled soft-updates) devfs on /dev (devfs, local, multilabel) /dev/da0p4 on /storage (ufs, local, journaled soft-updates) devfs on /var/named/dev (devfs, local, multilabel)[/code] The goal is to change the "/storage" filesystem mount option to add "noatime". [code] # mount -u -o rw,noatime /storage # mount /dev/da0p2 on / (ufs, local, journaled soft-updates) devfs on /dev (devfs, local, multilabel) /dev/da0p4 on /storage (ufs, local, noatime, journaled soft-updates) devfs on /var/named/dev (devfs, local, multilabel) [/code]