Re: mount -t null -o noatime

Taylor R Campbell <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
> Date: Mon, 23 Dec 2024 12:47:50 +0100
> From: Edgar Fuß <[email protected]>
> 
> Suppose I have a (FFS) fs mounted with atime (e.g., without -o noatime) 
> and I null-mount that fs somewhere else with -o noatime.
> Will that do what I expect, e.g. will operations on the null-mounted fs 
> leave the on-disc atimes alone?

No, I don't think so -- the noatime option and the access times are
both applied by the underlying ffs, not by the null mount.

> The use case I have in mind is restoring from a backup; updating the atimes 
> of the directories would be a waste of time since the backup program will 
> restore them afterwards anyway.  Or is there an easier way for this?

Just mount the file system noatime while you're doing the restore?

You can update the mount options dynamically with `mount -u -o
noatime' (plus any other options you want -- it replaces them
wholesale, rather than selectively adding or deleting them).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.