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.

_Shorty

Members
  • Joined

  • Last visited

Solutions

  1. _Shorty's post in Problem with Scheduled Trim of CCTV drive and Frigate Container was marked as the answer   
    if (is_hdd($source)) continue; fwrite($myfile,"$source Is HDD\n\r"); ### Result of HDD Check  
    The "continue" command actually means "bail out here and don't execute any of the remaining commands in this side branch, and instead, continue back on the branch that called it."  So your fwrite is being executed only when a hard drive is NOT found.  Since you do not see your added line of text output when it looks at /dev/sde1 this tells you that it is indeed bailing out at that continue command.  What I find interesting about your list of processes that are running is the fstrim command is not the same as what's in the section of script code we're looking at.  The command listed there in the processes list is "fstrim -va", which means trim all drives.  I wonder where it is getting that command from, since the one we've been looking at doesn't have -va, but only -v.  Ah yes, right at the very start of the script.
     
    // cron operation if ($argc==2 && $argv[1]=='cron') {   // trim btrfs, xfs   echo shell_exec("fstrim -va 2>/dev/null");   // trim zfs   zfs_trim(false);   exit(0); }  
    This checks if it is running as a cron job, and if it is then it runs "fstrim -va 2>/dev/null" which trims ALL drives, and "zfs_trim(false);" to trim zfs pools, and then exits without running the rest of the script.  So the remainder of the code where it checks for which drive types there are, and only trims SSDs, never gets executed.  The two slashes "//" at the start of those lines are an indication that whatever else follows on that line is just commentary and is ignored as far as execution goes.  So if you just add two slashes to the start of the echo line and the exit line it should start behaving.
     
    // cron operation if ($argc==2 && $argv[1]=='cron') {   // trim btrfs, xfs   // echo shell_exec("fstrim -va 2>/dev/null");   // trim zfs   zfs_trim(false);   // exit(0); }  
    That will stop it from running fstrim on all drives here, and will also stop it from exiting here so that the remainder of the code will run.  I think that'll do the trick.

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.