tmpfs and noatime heads up

Roland Smith rsmith at xs4all.nl
Tue Sep 9 19:48:18 UTC 2014


On Mon, Sep 08, 2014 at 06:05:16PM -0600, Dave Babb wrote:
> I added the noatime option to my fstab where the tempfs entries were....

The noatime option is generally meant to cut down on the amount of writes that
is done to a filesystem. This is only important for HDDs and especially SDDs.

Looking at the tmpfs code, it does maintain atime. The driver code checks for
unknown options when mounting and returns EINVAL when a not allowed option is found.
See tmpfs_mount() /usr/src/sys/fs/tmpfs/tmpfs_vfsops.c

> FreeBSD didn't like it and dropped me out to single user mode upon
> reboot with the appropriate warning of "invalid mount option".

Presumably that's just a conservative way of handling it.

Does that also happen when you try to mount a tmpfs by hand after booting?
I would guess not.

> I removed the noatime flags for my tempfs entries, rebooted, and all
> came back up as it should be.
> 
> No harm done.....Just an FYI that the tmpfs (at least on my system)
> doesn't support the noatime flag....

According to the code in /usr/src/sys/fs/tmpfs/tmpfs_vfsops.c, the only
supported options are;

    static const char *tmpfs_opts[] = {
            "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export",
            "union", NULL
    };

> Anyway...an FYI!

You might want to submit this as at least a documentation bug. FreeBSD now
uses bugzilla: https://bugs.freebsd.org/bugzilla/


Roland
-- 
R.F.Smith                                   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 5753 3324 1661 B0FE 8D93  FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20140909/947b3bc1/attachment.sig>


More information about the freebsd-questions mailing list