Jump to content

dlandon

Community Developer
  • Posts

    10,251
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by dlandon

  1. See below for a better implementation in unRAID 6. Currently unRAID does not support mounting cache drives with trim support. The trim support when mounting a drive is with the 'discard' switch. I have done some research on trim in Linux and there are those that believe that mounting a drive with trim may cause the drive to do too much work whenever a file is written to the drive and that once a day issuing a 'fstrim' will suffice. There is also some feeling that trim support when mounting a drive with a file system other that ext4 or BTRFS may not be ready for everyday use. Trim lets the SSD know what the OS using the drive thinks is available space on the drive. I have come up with a solution to support trim in unRAID until LT gets native trim support implemented for cache drives. There is currently an open feature request for trim support here: http://lime-technology.com/forum/index.php?topic=34409.msg320174#msg320174 Put the following file on your flash drive in the 'custom' directory. Trim script named 'DailyCacheTrim': # # Trim the SSD cache drive. # /sbin/fstrim -v /mnt/cache | logger go file entry: # # Set up daily SSD cache trim for unRaid cron. # fromdos < /boot/custom/DailyCacheTrim > /etc/cron.daily/DailyCacheTrim chmod +x /etc/cron.daily/DailyCacheTrim With the output piped to logger ('| logger') the output of the fstrim will show in the log. It simply displays the number of bytes trimmed. This is normal operation and is the correct output. The fromdos command is used to copy a file to Linux and insure the carriage return characters are removed and the output file is in Linux line feed format. It prevents issues with editing a file with an editor that is not Linux file format compatible. While the chmod +x may not be required, it just insures that the Linux file is executable. A better method for unRAID 6 Dynamix has a built in cron system that is a better way to implement the SSD Trim. Create a file called "trim.cron" and put it in the /flash/config/plugins/dynamix folder: 30 5 * * * /boot/custom/DailyCacheTrim &> /dev/null This will be added to the cron events when unRAID is booted, or you can manually start it without a reboot by: /usr/local/emhttp/webGui/scripts/notify cron-init Remove the trim entries from the go file and delete the DailyCacheTrim file from /etc/cron.daily. The SSD trim will be run at 5:30 AM daily. You can adjust this for a different time of day, or once an hour as you see fit. I think daily is sufficient.
  2. Careful with calling it CLI Tools...... WOW! I DIDN'T EVEN THINK OF THAT! I TRULY DID AN LMAO WHEN I READ THAT JUST NOW! Yeah, I think "Power Tools" is probably good to avoid any less than desirable acronyms ;-) If you aren't careful, my parental controls will block me out.
  3. The plugin removal script should remove all the packages. i.e. removepkg ... EDIT: inotify is used by SNAP so it should not be removed. If it is removed, SNAP will no longer detect a hot plug event.
  4. Yes, it makes sense, but I can't click on my any plugin icons with Chrome. Not sure what it's supposed to do. Maybe you've done something different in your plugin that makes that happen.
  5. I'm not sure what you are asking here, but I don't think a plugin can tell if it is being installed the first time or being updated.
  6. What is not getting refreshed? What are the symptoms?
  7. Thanks for the feedback. I agree that it is a bit rough when changing settings and I'll take a look at it again. It wasn't really a priority before, but I think if I can do anything to keep down support issues, it is worth it. I'll have a go at it. Turned out to be a piece of cake. Not sure why the form was read only when the ups daemon was running. I'll work with it a bit to be sure I didn't break anything.
  8. Thanks for the feedback. I agree that it is a bit rough when changing settings and I'll take a look at it again. It wasn't really a priority before, but I think if I can do anything to keep down support issues, it is worth it. I'll have a go at it.
  9. And that trick you told me about sorting helps too for each child page. Menu="APCUPS:1" Menu="APCUPS:2" And each page needs an icon in the icons folder. I just borrowed from /usr/local/emhttp/plugins/dynamix/icons and renamed. I figured out the sorting. Pretty slick way to control the order of the tabs. I have released another apcupsd update. Is there a way to get the full bar back with the icon and "APC UPS" text and the status on the right? I'd like to have the full bar as it was and then the two menu tabs underneath if possible.
  10. Like this with separate page files for each tab? Menu="OtherSettings" Icon="apcupsd.png" Version="2014.12.05" Author="seeDrs/dlandon" Title="APC UPS" Tabs="true"
  11. Thanks that's very useful. Another thing that's useful is the tabs. I've been helping Peter with his openvpn plugins. So instead of having everything on one page it's tabbed with settings and logs. It could be useful for your apcupsd to show full ups status in a separate tab. Or you could have 3 tabs with a main status page, settings page and full status page. Get me started. What does the base page file have in it to enable tabs?
  12. Thanks that's very useful. Another thing that's useful is the tabs. I've been helping Peter with his openvpn plugins. So instead of having everything on one page it's tabbed with settings and logs. It could be useful for your apcupsd to show full ups status in a separate tab. Or you could have 3 tabs with a main status page, settings page and full status page. Great idea. I'll look into it.
  13. Dynamix has a status indicator you can use to show the status of your process. Details are in the OP. I would encourage you to do this to be consistent with the way dynamix shows process status.
  14. You'll probably have to start fresh with all plugins removed manually and add them back. I would delete all files and directories from the /boot/config/plugins directory. Be sure to delete /boot/plugins if it is there. This is left over from the v5 and early v6 dynamix install.
  15. Don't delete plugins from the flash drive. You should always use the plugin manager on the webgui to install and remove plugins. Re-install the plugin and then remove it using the plugin manager and see if that clears it up.
  16. The cachedirs plugin downloads the cache_dirs script each time the plugin is installed. If the Internet is not available (network may not be ready yet on a reboot) or the download does not succeed, the plugin will successfully install but the cache_dirs script will not be available. That is why it won't start - the cache_dirs script is not available. I've passed this along to bonienl with some ideas on how to fix. For the time being, remove and then re-install the cachedirs plugin until a fix is made.
  17. Thanks. I struggle with these image files because Windows paint is so wimpy. I managed to get the 16 x 16 original that has the transparent background and I've updated apcupsd. Thanks for finding that for me. I didn't even catch that was an option. I guess the more I work with plugins, the more I learn.
  18. It's nothing big but this is what I was talking about. And by adding a 16x16 icon png fixes it. How did you convert it to maintain the transparent background? I can't seem to get it. Or if you don't mind, send me the one you are using.
  19. It's nothing big but this is what I was talking about. And by adding a 16x16 icon png fixes it. Ok. Now I get it. Not a problem to fix that.
  20. Sorry. I really meant this for dmacias. I don't see the issues you are talking about with the apcupsd plugin.
  21. Is this my apcupsd plugin you are talking about? Here: http://lime-technology.com/forum/index.php?topic=34994.0
  22. You also need an icons directory with a 16x16 image in lowercase matching the Tittle. So for apcupsd your title is APC UPS so I resized the 48x48 png and renamed it apcups.png and put it in an icons directory in emhttp/plugins/apcupsd. For one of my own plugins I had to move the main 48x48 png to an images folder for it to show up in the installed plugins section. I don't understand this. It is not necessary for apcupsd. I modified apcupsd so the php is included in the .page file and the image is fine in the plugins section. I know. I'm not sure why my plugin's image didn't show up there. I was just pointing it out that it could go in an images directory and it would. But my main point was if you don't have an 16x16 icon then there is a default icon in settings to the left of the Title instead of the apcupsd.png. It has to be apcups.png in the icons directory to match the Title. It's actually not the title, but the name of the plugin. In the case of apcupsd, the name is 'apcupsd' so the icon needs to be 'apcupsd.png' for the plugin manager. <!DOCTYPE PLUGIN [ <!ENTITY name "apcupsd"> <---- this one <!ENTITY author "seeDrs/dlandon"> <!ENTITY version "2014.11.30"> <!ENTITY pluginURL "https://github.com/dlandon/unraid-snap/raw/master/Apcupsd-x86_64.plg"> <!ENTITY pkgversion "3.14.12"> ]> <PLUGIN name="&name;" author="&author;" version="&version;" pluginURL="&pluginURL;"> The application icon is specified in the 'apcupsd.page' file. Menu="OtherSettings" Icon="apcupsd.png" <------ application icon Version="2014.11.30" Author="seeDrs/dlandon" Title="APC UPS" --- <?PHP In this case the icons are both the same, but could be different if desired.
  23. You also need an icons directory with a 16x16 image in lowercase matching the Tittle. So for apcupsd your title is APC UPS so I resized the 48x48 png and renamed it apcups.png and put it in an icons directory in emhttp/plugins/apcupsd. For one of my own plugins I had to move the main 48x48 png to an images folder for it to show up in the installed plugins section. I don't understand this. It is not necessary for apcupsd. I modified apcupsd so the php is included in the .page file and the image is fine in the plugins section.
  24. There is a change in v6b12 that will affect plugins. The emhttp file structure has changed and you can no longer have a .page and a .php file. unRAID expects the php for your page to be included in the .page file of your plugin. The OP has more details. EDIT: I have found a work around. I have posted in the OP.
×
×
  • Create New...