WeeboTech 6 Posted June 17, 2013 Share Posted June 17, 2013 Can you remake the swap file? Or is it a swap partition? Quote Link to post
ajax3712 0 Posted June 17, 2013 Share Posted June 17, 2013 It's a swapfile made by this plugin... I've tried deleting and using the GUI to recreate numerous times (about to try manually). but as best as I can tell, the plugin is using the correct commands (as per a google search and what's in the plugin/rc.swapfile code): # Create swap file logger -trc.swapfile -plocal7.info -is "Creating swap file ${SWAP_LOCATION}/${SWAP_FILENAME} please wait ..." dd if=/dev/zero of=${SWAP_LOCATION_NEW}/${SWAP_FILENAME_NEW} bs=1M count=${SWAP_SIZE_MB_NEW} # Assign SWAP_NAME to the swap file mkswap -L ${SWAP_NAME_NEW} ${SWAP_LOCATION_NEW}/${SWAP_FILENAME_NEW} # Change swap file permissions as required chmod 600 ${SWAP_LOCATION_NEW}/${SWAP_FILENAME_NEW} # Turn on swap file usage swapon -v ${SWAP_LOCATION_NEW}/${SWAP_FILENAME_NEW} logger -trc.swapfile -plocal7.info -is "Swap file ${SWAP_LOCATION_NEW}/${SWAP_FILENAME_NEW} created and started" Quote Link to post
WeeboTech 6 Posted June 18, 2013 Share Posted June 18, 2013 Also WHERE are you swapping to? What filesystem area? Quote Link to post
ajax3712 0 Posted June 18, 2013 Share Posted June 18, 2013 There's a user-controllable flag in the plugin UI to control whether the swap lasts past array stop. I have tried both deleting the swapfile on stop & keeping it. The swap file is being created in /mnt/user/apps (which is a cache-only share). The file's complete path is: /mnt/user/apps/swapfile It's on a brand-new, precleared drive (5400rpm laptop - don't think that matters) that was added when my old cache drive died (and when the plugin worked for me - i kept the swap file between array stop/starts) Quote Link to post
WeeboTech 6 Posted June 18, 2013 Share Posted June 18, 2013 OK that makes sense now. Try creating on the disk mount point instead of the user share. /mnt/cache/.swapfile or something like that. What I've just read, is that it could be that the file system does not support swap. usershare being a filesystem in user space. I just created a swapfile manually on my /mnt/disk1/.swapfile and I was successful Quote Link to post
ajax3712 0 Posted June 18, 2013 Share Posted June 18, 2013 well that did it . man, i wish i had my hours back... I forgot to mention that OCD forced me to consolidate my plugins to always reference the same base path for app data: /mnt/user/apps/ Prior to my drive crash, it was /mnt/cache/apps. now that same ocd is wondering if I should switch them all to /mnt/cache... Thanks so much!!! Quote Link to post
WeeboTech 6 Posted June 18, 2013 Share Posted June 18, 2013 I just tested this by hand, here are my results. root@unRAID2:/# dd if=/dev/zero of=/mnt/user/swapfile bs=1M count=256 256+0 records in 256+0 records out 268435456 bytes (268 MB) copied, 3.08609 s, 87.0 MB/s root@unRAID2:/# mkswap -L SWAP /mnt/user/swapfile mkswap: /mnt/user/swapfile: warning: don't erase bootbits sectors on whole disk. Use -f to force. Setting up swapspace version 1, size = 262140 KiB LABEL=SWAP, UUID=77b9d51f-163b-43a8-8977-71b3e709470e root@unRAID2:/# swapon -v /mnt/user/swapfile swapon on /mnt/user/swapfile swapon: /mnt/user/swapfile: found swap signature: version 1, page-size 4, same byte order swapon: /mnt/user/swapfile: pagesize=4096, swapsize=268435456, devsize=268435456 swapon: /mnt/user/swapfile: swapon failed: Invalid argument root@unRAID2:/# swapon -v /mnt/disk1/swapfile swapon on /mnt/disk1/swapfile swapon: /mnt/disk1/swapfile: found swap signature: version 1, page-size 4, same byte order swapon: /mnt/disk1/swapfile: pagesize=4096, swapsize=268435456, devsize=268435456 root@unRAID2:/# top -b | head top - 20:16:42 up 2 days, 1:24, 3 users, load average: 0.22, 0.12, 0.08 Tasks: 72 total, 1 running, 71 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.1%sy, 0.0%ni, 99.7%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 4146032k total, 616828k used, 3529204k free, 7608k buffers Swap: 262140k total, 0k used, 262140k free, 498764k cached Quote Link to post
theone 12 Posted June 18, 2013 Author Share Posted June 18, 2013 I will add the comment for the limitation of not using a user share as a location to the plugin WEBUI for clarity. Thank you WeeboTech for testing and finding this limitation. Quote Link to post
theone 12 Posted June 18, 2013 Author Share Posted June 18, 2013 New version 0.5.3 Added 60 second timeout to all network accesses Added comment regarding swap file location in WEBUI Quote Link to post
WeeboTech 6 Posted June 18, 2013 Share Posted June 18, 2013 New version 0.5.3 Added 60 second timeout to all network accesses Added comment regarding swap file location in WEBUI Quote Link to post
sacretagent 0 Posted June 19, 2013 Share Posted June 19, 2013 thx and HURRAY for the autoupdate feature Quote Link to post
exist2resist 1 Posted July 1, 2013 Share Posted July 1, 2013 does the file system need to be reiserfs for the swap file, or can I use ext? Quote Link to post
dmangus 0 Posted December 10, 2013 Share Posted December 10, 2013 Works perfect, just what i was looking for. Thanks Quote Link to post
theone 12 Posted April 22, 2015 Author Share Posted April 22, 2015 Updated plugin. Now also supports unRAID v6 Plugin Manager. Changes: 2015.04.22 - Added support for unRAID v6 Plugin Manager and Architecture - Changed timeout to 10 seconds for all network connections (was 60 seconds) Quote Link to post
hernandito 52 Posted July 24, 2015 Share Posted July 24, 2015 Trying to get this to work.... will it work if the swapfile is in a hard drive that is ReiserFS (array drive) or BTRFS (my cache drive). My array drives are old and I rather not reformat.... I do have a new cache drive which is btrfs. I created a new unRAID system for my sister, and it works perfectly if I store it to XFS formatted drive (array). But I need this to work on my old system. Please help. Thanks! Quote Link to post
theone 12 Posted July 24, 2015 Author Share Posted July 24, 2015 Mine is reiserfs and works perfectly. I actually never tried it on anything else. Quote Link to post
hernandito 52 Posted July 24, 2015 Share Posted July 24, 2015 Mine is reiserfs and works perfectly. I actually never tried it on anything else. Thank you... going to re-install. Quote Link to post
John_M 270 Posted August 12, 2015 Share Posted August 12, 2015 Mine is reiserfs and works perfectly. I actually never tried it on anything else. The plug-in is essentially broken under unRAID 6 because it defaults to creating the swap file on the cache drive without checking the filesystem format on that drive. The cache drive in turn now defaults to being btrfs formatted, which according to the swapon manpage does not support swap files. It gives the "swap file has holes" error. It would be nice if the plug-in checked first before creating the swap file and, on detecting an incompatible filesystem, warned the user and exited gracefully. Quote Link to post
John_M 270 Posted August 13, 2015 Share Posted August 13, 2015 I've been searching this board for a reliable way to implement a swap space but I'm struggling because it contains a lot of outdated information. I don't want to use reiserfs at all and will stick with the default use of XFS on my data disks and btrfs on my cache disk so after a little thought I came up with the idea of using a swap partition on my cache disk. So I did a bit of searching to see if unRAID supports the idea. This thread suggests that multiple partitions are supported as long as the cache is on partition 1. However this message, while confirming that it is theoretically possible, says that a bug was introduced back in 2011 that prevented it from working. Does anyone know the position with version 6.0.1 in 2015, please? Quote Link to post
MyKroFt 7 Posted August 25, 2015 Share Posted August 25, 2015 is this plugin going to be updated to be 6.1 compat with the new security requirements? Thanks Myk Quote Link to post
primeval_god 44 Posted September 1, 2015 Share Posted September 1, 2015 I don't really know much about swap on linux or Btrfs but I ran across something that might be useful to you. It appears that you can use a loop mounted device as a swap file. It mentions that this option has poor performance but since i haven't tried it I can say if it is cripplingly poor. Anyway here is a link http://comments.gmane.org/gmane.comp.file-systems.btrfs/29437 Quote Link to post
sacretagent 0 Posted September 1, 2015 Share Posted September 1, 2015 is this plugin going to be updated to be 6.1 compat with the new security requirements? Thanks Myk Same question as my machines don't have that much ram so before i upgrade i want to be sure about this Quote Link to post
joelones 4 Posted September 1, 2015 Share Posted September 1, 2015 For the time being you can manual create the swap, http://lime-technology.com/forum/index.php?topic=39341, preferably on a cache drive EDIT: Doing it this way, you'll have problems stopping the array if the swap file is located on the cache drive, so I guess we'll need an update to this plugin. I'm assuming this plugin unmounts the swap file during array shutdown? Quote Link to post
theone 12 Posted September 1, 2015 Author Share Posted September 1, 2015 Just came back from a long vacation. Need to understand the exact limitations of the 6.1 security checks. I will update all my plugins to 6.1 - probably not keep 6.0 compatibility. Quote Link to post
sacretagent 0 Posted September 2, 2015 Share Posted September 2, 2015 Just came back from a long vacation. Need to understand the exact limitations of the 6.1 security checks. I will update all my plugins to 6.1 - probably not keep 6.0 compatibility. THX.. waiting for the swap file one to be verified to upgrade to 6.1 Quote Link to post
98 posts in this topic Last Reply
Recommended Posts
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.