Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

FreeBSD 9 : Remount an already mounted filesystem without unmounting it
https://forum.ivorde.com/freebsd-9-remount-an-already-mounted-filesystem-without-unmounting-it-t16261.html
Page 1 of 1

Author:  mandrei99 [ Wed Feb 05, 2014 12:16 pm ]
Post subject:  FreeBSD 9 : Remount an already mounted filesystem without unmounting it

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.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/