Solved noatime and nullfs

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,684
Messages: 30,622

It's just a pass-through, so the nullfs(5) filesystem will have same atime/noatime setting as the underlying filesystem.
 
OP
OP
T

tobiam

Member

Reaction score: 22
Messages: 87

Okay, thank you. I thought so and it seemed to be validated with testing, but I've seen quite a few example nullfs based jail setups that use noatime in the fstab.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,684
Messages: 30,622

Well, you can turn features off on the upper nullfs(8) filesystem but you can't turn features back on. For example, if the underlying filesystem is read-write you can mount a nullfs(5) read-only. Or, if the underlying filesystem has atime set, nullfs(5) can be noatime. But the other way around won't work, you can nullfs(5) a filesystem read-write but if the underlying filesystem is read-only the nullfs(5) filesystem is going to be read-only. Same for noatime.
 
OP
OP
T

tobiam

Member

Reaction score: 22
Messages: 87

Thanks, that totally makes sense. I also wanted to not miss stuff, such as remounting the lower file system, or that it somehow will still do some unnecessary writes if the upper FS doesn't have the noatime flag, set, when the lower one does have it set.

I kind of would have expected that the upper FS would also get this flag (in the mount command output) or something.

Anyway, if the "limits" of the flags are essentially defined by the underlying file system that's pretty clear. :)
 
Top