Skip to content

Tmpfs configuration

7thCore edited this page Jan 31, 2022 · 2 revisions

This is optional. You can skip this and the script will use it's default values (tmpfs being disabled).

You can run this function with root privileges so the script can add the tmpfs line to /etc/fstab or it can be executed with the mcsrv user to only change the configuration value in the script's configuration file but you will have to add the tmpfs line to /etc/fstab manually.


Using the script

Run the script with root privliges and follow the instructions:

sudo mcsrv-script config_tmpfs

Manual

To create a ramdisk manually you need to get the user id of the mcsrv user:

id -u mcsrv

Add the following to your fstab with the user id:

/etc/fstab
tmpfs				   /srv/mcsrv/tmpfs		tmpfs		   rw,size=8G,uid=<user-id>,mode=0777	0 0

The size value is for the size of your tmpfs/ramdisk. 8G is for 8 gigabytes.

Reload user services as the mcsrv user:

mcsrv-script reload_services

Clone this wiki locally