Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Sep 2024 02:39:24 +0100
From:      Jamie Landeg-Jones <jamie@catflap.org>
To:        freebsd-stable@freebsd.org
Subject:   mount -u removes "noatime"
Message-ID:  <202409020139.4821dOrY070960@donotpassgo.dyslexicfish.net>

next in thread | raw e-mail | index | archive | help
I noticed some of my noatime mounts keep being reset to atime. Looking
further, I found out the culprit was a snapshotting program running:

mount -u -o snapshot <path> <fs>

It turns out, that just using -u causes noatime to be dropped:

 | root@catflap# mount -v | grep da0p3
 | /dev/da0p3 on / (ufs, local, noatime, writes: sync 3343750 async 2795680, reads: sync 204356 async 10254, fsid 1fa69665dd23d4e8, vnodes: count 3803 )

 | root@catflap# mount -u /
 | /dev/da0p3 on / (ufs, local, writes: sync 3343750 async 2795680, reads: sync 204356 async 10254, fsid 1fa69665dd23d4e8, vnodes: count 3803 )

I assume this shouldn't be the case?

Incidentally, is there any difference between "mksnap_ffs" and "mount -u -o snapshot..."? (other that the noatime mangling)

Finally, man mount(8) has:

| Note that the schg flag is set on snapshots to ensure that not even the root
| user can write to them. The unlink command makes an exception for snapshot
| files in that it allows them to be removed even though they have the schg
| flag set, so it is not necessary to clear the schg flag before removing a
| snapshot file.

The schg flag isn't set on snapshots, at least according to ls -lo

Cheers, Jamie



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409020139.4821dOrY070960>