Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Swap File Plugin for unRAID v5 and v6

Featured Replies

So im on BRFS and have set things up but i cant seem to get it to use said swap file 

image.thumb.png.9703cbd7bc3bcba3b3f6e7c2f2cf3241.png

 

Clicking start does nothing

  • 2 weeks later...
  • Replies 110
  • Views 69.3k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • primeval_god
    primeval_god

    @artafinde Also since you last checked this plugin has been forked and the fork supports swapfiles on BTRFS.   

  • maciekish
    maciekish

    It is controlled by swappiness. I guess you could create a userscript on startup that sets the swappiness. https://askubuntu.com/questions/103915/how-do-i-configure-swappiness   I suggest th

  • On version 6.9.1, the Linux kernel updated to 5.10 and it supports swapfile on BTRFS. On filesystem BTRFS, you should follow this [url] to make a swapfile, and then it will work.  Hope this

Posted Images

On 3/29/2021 at 11:18 PM, BomB191 said:

So im on BRFS and have set things up but i cant seem to get it to use said swap file 

image.thumb.png.9703cbd7bc3bcba3b3f6e7c2f2cf3241.png

 

Clicking start does nothing

The same for me!

Did you read the last post on the previous page?

  • 4 weeks later...

Im having the same issue. 

 

Mine is set to "/mnt/cache-nvme/swap/" so I ran the below commands;

- cd /mnt/cache-nvme/swap/
- truncate -s 0 ./swapfile
- chattr +C ./swapfile
- btrfs property set ./swapfile compression none

 

everything looks fine, and I don't get any errors.

 

I see "Swap file exists: " but when I click "start" nothing happens and it still shows "Swap file in use: "


I have had the same issue with the plugin before, particularly when using large swapfiles. Run 

swapon /mnt/cache-nvme/swap/swapfile

 

@primeval_god thanks for the tip, I tried running the command and got the following output, and the swap is still not enabled. 
 

swapon: /mnt/cache-nvme/swap/swapfile: insecure permissions 0666, 0600 suggested.
swapon: /mnt/cache-nvme/swap/swapfile: read swap header failed


After some googling I see people using other Linux distorts running “mkswap”, but they are all referring to a swap partition. I’m not sure if that’s the correct fix for unraid. 

On 5/1/2021 at 9:57 PM, relink said:

@primeval_god thanks for the tip, I tried running the command and got the following output, and the swap is still not enabled. 
 



swapon: /mnt/cache-nvme/swap/swapfile: insecure permissions 0666, 0600 suggested.
swapon: /mnt/cache-nvme/swap/swapfile: read swap header failed


After some googling I see people using other Linux distorts running “mkswap”, but they are all referring to a swap partition. I’m not sure if that’s the correct fix for unraid. 

No you definitely need to run mkswap on the file before using it. I didnt notice that the steps you had posted skipped that. Your missing steps are (note 1G for a 1GB swapfile).

Quote

fallocate -l 1G /mnt/cache-nvme/swap/swapfile

chmod 600 /mnt/cache-nvme/swap/swapfile

mkswap /mnt/cache-nvme/swap/swapfile

swapon /mnt/cache-nvme/swap/swapfile

 

Edited by primeval_god

1 hour ago, primeval_god said:

No you definitely need to run mkswap on the file before using it.

Thank you for laying that out for me, I had no idea those steps were required to make this plugin work. But it is definitely working now.

 

oom errors are rare, but it's nice to have a safety net now. 

 

Screen Shot 2021-05-03 at 11.04.40 AM.png

5 minutes ago, relink said:

I had no idea those steps were required to make this plugin work.

They are not meant to be required, I believe that this plugin just hasn't been updated to account for swap file support in BTRFS.

  • 2 months later...
On 5/3/2021 at 4:28 PM, primeval_god said:

They are not meant to be required, I believe that this plugin just hasn't been updated to account for swap file support in BTRFS.

Last I checked which was 2-3 months ago I noticed the same, no support for swap file on BTRFS. As a workaround I've made a User Script to perform the commands from Archlinux wiki (some conditionally) during Array startup.

Edited by artafinde

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.