fstab.ramdisk revision 1.5 1 1.5 christos # $NetBSD: fstab.ramdisk,v 1.5 2015/03/04 16:18:04 christos Exp $
2 1.1 hubertf #
3 1.4 jmmv # Sample fstab for multiple ramdisks (mfs and tmpfs).
4 1.4 jmmv #
5 1.4 jmmv
6 1.4 jmmv #
7 1.4 jmmv # mfs examples
8 1.4 jmmv #
9 1.4 jmmv
10 1.1 hubertf # /tmp is on a 5MB mfs partition; see mount_mfs(8) for details.
11 1.3 sketch # Adjust the size according to the amount of free RAM.
12 1.4 jmmv swap /tmp mfs rw,-s=5m,nodev,nosuid
13 1.4 jmmv
14 1.4 jmmv #
15 1.4 jmmv # tmpfs examples
16 1.1 hubertf #
17 1.4 jmmv
18 1.4 jmmv # Standard tmpfs entry for /tmp.
19 1.4 jmmv tmpfs /tmp tmpfs rw
20 1.4 jmmv
21 1.4 jmmv # Standard tmpfs entry for /var/run.
22 1.4 jmmv #tmpfs /var/run tmpfs rw
23 1.4 jmmv # Note that for this to work correctly you must add /var/run to the list
24 1.4 jmmv # of critical local file systems in /etc/rc.conf. You can do so by adding
25 1.4 jmmv # the following to that file:
26 1.4 jmmv #critical_filesystems_local="${critical_filesystems_local} /var/run"
27 1.4 jmmv
28 1.4 jmmv # Mounts tmpfs over /tmp with a size limit.
29 1.4 jmmv #tmpfs /tmp tmpfs rw,-s128M
30 1.4 jmmv
31 1.4 jmmv # Mounts a tmpfs instance to be used by a specific user.
32 1.4 jmmv #tmpfs /home/foo/tmp tmpfs rw,-ufoo,-gusers,-s50M
33 1.5 christos
34 1.5 christos # Shared memory tempfs template allocating 25% of available memory
35 1.5 christos tmpfs /var/shm tmpfs rw,-m1777,-sram%25
36