tmpfs in /etc/fstab ....
Dave Babb
dcbdbis at comcast.net
Sat Sep 13 04:23:28 UTC 2014
This should help you.
I use tmpfs for /tmp, I use tmpfs for a RamDisk where I do a lot of
small compilations, and I also use tmpfs for my /usr/obj tree. I have an
SSD that I want to protect at all costs. tmpfs will use half of your ram
before going to swap. In my case, I have 32Gb of ram and no swap.
I just did a buildworld, followed by a portmaster -af. At the worst
case...I was using 7% of my tmpfs ram, according to df -h....7 % of 16Gb
is only 1.12 Gb.
So I had no issue doing some heavy duty system rebuilding from
ram......via tmpfs. I did this the long way because I needed the
experience...I understand and have been told that there are easier and
shorter ways.....But I did it to learn about rebuilding world which to
date I had never done.
Hope this helps!
Dave
On 09/12/14 22: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 ....
>
>
-------------- next part --------------
# Daves customized fstab for FreeBSD
#
#
# First Lines are for system required entries
#
#
#
# keep temporary files and in ram rather than wear out the SSD
#
# Device Mountpoint FStype Options Dump Pass#
tmpfs /tmp tmpfs rw,mode=01777 0 0
tmpfs /usr/home/dcbdbis/RamDisk tmpfs rw 0 0
tmpfs /usr/obj tmpfs rw,mode=01777 0 0
# Keeps OpenJDK happy and some linux apps as well
fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0
# -------------------------------------------------------
# End of system level fstab entries, now on to the devices
# -------------------------------------------------------
# Device Mountpoint FStype Options Dump Pass#
# /dev/ada0p2 is the root drive
/dev/ada0p2 / ufs rw,noatime 1 1
# /dev/ada1p1, Backup-1
/dev/gpt/Backup-1 /media/Backup-1 ufs rw,noatime 0 2
# /dev/ada2p1, Backup-2
/dev/gpt/Backup-2 /media/Backup-2 ufs rw,noatime 0 2
# /dev/ada3p3, Misc storage and VM's
/dev/gpt/Misc /media/Misc ufs rw,noatime 0 2
More information about the freebsd-questions
mailing list