Todo #12145
Updated by Jim Pingle about 3 years ago
For various reasons we may want to switch the RAM disks from ufs on md devices to "tmpfs":https://www.freebsd.org/cgi/man.cgi?query=tmpfs&apropos=0&sektion=0&manpath=FreeBSD+13.0-RELEASE+and+Ports&arch=default&format=html . Appears to be a simple source change: <pre><code class="diff"> diff --git a/src/etc/rc.ramdisk_functions.sh b/src/etc/rc.ramdisk_functions.sh index 522b7f2b1e..0ec9894f70 100755 --- a/src/etc/rc.ramdisk_functions.sh +++ b/src/etc/rc.ramdisk_functions.sh @@ -101,7 +101,7 @@ ramdisk_try_mount () { NAME=$1 if [ ramdisk_check_size ]; then SIZE=$(eval echo \${${NAME}size})m - /sbin/mdmfs -S -M -s ${SIZE} md /${NAME} + /sbin/mount -o rw,size=${SIZE},mode=1777 -t tmpfs tmpfs /${NAME} return $? else return 1; diff --git a/src/usr/local/www/includes/functions.inc.php b/src/usr/local/www/includes/functions.inc.php index c25ccebaca..3edeeade3b 100644 --- a/src/usr/local/www/includes/functions.inc.php +++ b/src/usr/local/www/includes/functions.inc.php @@ -158,7 +158,7 @@ function get_temp() { function get_mounted_filesystems() { $mout = ""; $filesystems = array(); - exec("/bin/df -Tht ufs,zfs,cd9660 | /usr/bin/awk '{print $1, $2, $3, $6, $7;}'", $mout); + exec("/bin/df -Tht ufs,zfs,tmpfs,cd9660 | /usr/bin/awk '{print $1, $2, $3, $6, $7;}'", $mout); /* Get rid of the header */ array_shift($mout); </code></pre> Naturally that could be deceptively oversimplifying it. Needs lots of testing. Feel free to kick ahead as needed.