Problem with tmpmfs

Hello

I use this in /etc/rc.conf for a /tmp with tmpmfs:

Code:
tmpmfs="YES"
tmpsize="1024m"
tmpmfs_flags="-m 0 -o async,noatime -S -p 1777"

This worked in FreeBSD 10.3-RELEASE but in 12.0-RELEASE I got an error message: mdmfs: tmpfs mount exited with error code 1.

Thanks for any advice.
 
Yes, they are different. But you can use either one for /tmp. The mdmfs(8) solution actually existed long before tmpfs(5) became available.

Try removing the flags. The mode doesn't need to be set, it already defaults to 01777.
 
I changed flags to this:
Code:
tmpmfs_flags="-S"

and now without error message. Also df -h shows /tmp.

Problem is solved.

Thanks.
 
A minor pointer:
Code:
tmpmfs_flags="-S"

doesn’t need to be set in /etc/rc.conf. It is already set as default in /etc/defaults/rc.conf (12.0-RELEASE).

From rc.conf(5)
Rich (BB code):
tmpmfs_flags
         Extra options passed to the mdmfs(8) utility when the memory
         file system for /tmp is created.  The default is ``-S'',
         which inhibits    the use    of softupdates on /tmp so that file
         system    space is freed without delay after file    truncation or
         deletion.  See    mdmfs(8) for other options you can use in
         tmpmfs_flags.
 
Back
Top