# Problem with tmpmfs



## Caligula28 (Mar 26, 2019)

Hello

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


```
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.


----------



## youngunix (Apr 5, 2019)

tmpfs and tmpmfs are two different things. You're going to want to use the former (see this thread for description).


----------



## SirDice (Apr 5, 2019)

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.


----------



## Caligula28 (Apr 11, 2019)

I changed flags to this:

```
tmpmfs_flags="-S"
```

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

Problem is solved.

Thanks.


----------



## T-Daemon (Apr 11, 2019)

A minor pointer:

```
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)

```
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.
```


----------



## Caligula28 (Apr 15, 2019)

OK,

Thanks for info.


----------

