persistent fstab changes


Recommended Posts

obligatory "I'm new to unraid..."

 

how and where do i change files? currently I need to modify fstab and have it persistent across reboots.  I'm familiar with Linux and would prefer CLI over some plugin, just don't know where unraid keeps things.

 

why I want to change it-

-add a tmpfs mount for plex trancode.  the default shm mounts using defaults, I don't want that.

-----i want to do it to RAM to prevent a drive from spinning and reduce writes to ssd's..... not for performance/speed reasons.

-add a swap file, due to using tmpfs, insurance to prevent memory from depleting. This will be on a spinner, I'll set swappiness to 5 or 10 to prevent it from spinning up unless really needed.

 

the swap plugin is crap and old, I don't care to try to fix it, it's easy normal changes to make to a normal system... this boot from usb, running from RAM thing is just new to me.

Edited by Abzstrak
Link to comment
16 minutes ago, Squid said:

Every boot is effectively a fresh reinstall of unRaid.  To make changes to any system file, you would need to perform those changes within the /config/go file on the flash drive.

yeah, seems odd to me but I could just mount and swapon in there I guess, same effect.

Link to comment
1 hour ago, primeval_god said:

You might look into using docker for creating the tmpfs mount https://docs.docker.com/storage/tmpfs/

There is also the user scripts plugin that lets you run script on a schedule and at startup, which is what i used for applying swapon, though i was using a swapfile on an unassigned drive. 

yeah, using a plugin seems silly for something so easy and trivial.  What benefit is there in a docker for doing a one line mount command for a ram drive?

 

My swap is not acting the way I expected either... I have swappiness set to 0 and the vfs_cache_pressure set to 100 and yet the stupid thing still uses up to 100MB of swap when there is no reason (60%'ish ram usage).   I've never had reason to try to get a system to NOT swap unless absolutely necessary, interesting problem.  I tried a swappiness of 1, same crap... insists on using some swap.  I don't want it to spin up a drive unless absolutely necessary... ugh.

Edited by Abzstrak
Link to comment
2 hours ago, Abzstrak said:

yeah, using a plugin seems silly for something so easy and trivial.  What benefit is there in a docker for doing a one line mount command for a ram drive?

The wording of that response confuses me. I am assuming that you are using one of the plex docker containers (probably the LSIO one) as that is the preferred method for running plex. My understanding is that you want to create a RAM drive and mount that into the plex container for plex to use as trans-code memory. My suggestion is that docker already has a mechanism for mounting a RAM backed tmpfs into a container, which is what i linked.

 

As for swap you may want to look into how docker uses swap, not sure how many containers you have. As i remember it i could set swappiness for each container separately, but i have no idea how that plays into setting swappiness system wide.

Edited by primeval_god
Link to comment
2 hours ago, primeval_god said:

The wording of that response confuses me. I am assuming that you are using one of the plex docker containers (probably the LSIO one) as that is the preferred method for running plex. My understanding is that you want to create a RAM drive and mount that into the plex container for plex to use as trans-code memory. My suggestion is that docker already has a mechanism for mounting a RAM backed tmpfs into a container, which is what i linked.

 

As for swap you may want to look into how docker uses swap, not sure how many containers you have. As i remember it i could set swappiness for each container separately, but i have no idea how that plays into setting swappiness system wide.

I hadn't considered the swappiness of the containers, I only have two, but I'll look and see if that is somehow related.

 

I think I misunderstood on the ram drive, I thought you meant to make an additional docker just for it, which seemed, well, odd.  I planned to just mount a 24GB max tmpfs from unraid and pass that mount to the docker transcode folder for plex.... The link you provided is interesting though, it appears as though the docker can mount it as it brings up the container, which would save a step.

Now I'm just waiting patiently for my RAM to arrive... :)  Then I can start testing it.

 

regarding the Plex container, I used the limetech built template and then changed the repo to the official plex one... Is that not a good idea?

Edited by Abzstrak
Link to comment
1 hour ago, jonathanm said:

Unraid already sets up a RAM drive, it's mounted at / and contains the OS. All you need to do is specify a folder not in /mnt/user or /mnt/diskX or /boot and it will be in RAM.

yep, and its mounted with default options, which I don't want

Link to comment
14 hours ago, Abzstrak said:

regarding the Plex container, I used the limetech built template and then changed the repo to the official plex one... Is that not a good idea?

Its probably fine, I mentioned LSIO because they have more or less become the defacto standard for many unRAID containers. I use several containers from them and have always been pleased with their work and support for their containers. Luckily with docker containers you arent locked into to one in particular. If you run into trouble, spinning up a container based on an alternate image is quick an easy.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.