How do I make mergerfs changes permanent? Currently I run the commany mergerfs ... via…
- User
How do I make mergerfs changes permanent? Currently I run the commany mergerfs ... via command line and the filesystem disappears after a reboot
- Assistant
To make the mergerfs changes permanent, you'll need to update your system's configuration files. Here are the general steps you can follow:
-
Open the configuration file: Determine the configuration file used by your operating system to mount filesystems. Commonly used files are
/etc/fstabfor Linux or/etc/vfstabfor BSD systems. -
Get the UUID or device name: Find the UUID or device name of the filesystem you want to mount. You can see this information by running the command
lsblk -forlsblk -o +UUIDfor Linux. -
Edit the configuration file: Using a text editor, open the configuration file found in step 1. Add a new line that specifies the mergerfs mount point details. The format should be:
<UUID or device> <mount point> fuse.mergerfs defaults,allow_other 0 0Replace
<UUID or device>with the actual value obtained in step 2 and<mount point>with the desired directory to mount the filesystem. -
Save and exit the file: After making the necessary changes, save the configuration file and exit the text editor.
-
Test the configuration: Run the command
sudo mount -ato check if the updated configuration works without any errors. If there are any issues, you'll see error messages indicating the problem. -
Reboot your system: After successfully testing the configuration, you can safely reboot your system. Upon startup, the mergerfs mount point should be automatically mounted and persist across reboots.
These steps may vary slightly based on your specific Linux distribution or BSD variant, so ensure you are using the appropriate configuration file and commands for your system.
-