tmpfs in /etc/fstab ....

Arthur Chance freebsd at qeng-ho.org
Sat Sep 13 13:12:13 UTC 2014


On 13/09/2014 09:21, Rolf Nielsen wrote:

> On 2014-09-13 06:06, William A. Mahaffey III wrote:
>>
>>
>> .... I would like to enable use of tmpfs on my FBSD 9.3 box for
>> performance. The box has 16 GB of both RAM & swap. I added
>> 'tmpfs_load="YES"' to my /boot/loader.conf, but I can't figure out
>> what to put in /etc/fstab to allow the process to happen
>> automatically upon reboot. Specifically, what is the device I
>> should be using. The man page gives the mount command, which looks
>> like the device is called 'tmpfs'. Is that correct ? Are there any
>> issues w/ this procedure ? TIA ....
>>
>>
>
>
> tmpfs	/tmp	tmpfs	rw,uid=0,gid=0,mode=1777,size=1073741824	0	0
>
> should do it. Adjust the size parameter to your needs. It should be
> specified in bytes.

As of 10.0-REL you can use the usual multiplier suffix letters in the 
size (and other size related fields), which is easier than writing the 
size in bytes. This is my fstab entry

tmpfs		/tmp		tmpfs	rw,mode=01777,size=512M 0 0

A quick look at the svn repository suggests you do this with 9.3-REL as 
well. I've no idea whether earlier releases let you do it.


More information about the freebsd-questions mailing list