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.

fstrim cronjob in Unraid

Featured Replies

This post prompted me to poke around the forums, and I see there is some mention of running fstrim in a cronjob to allow manual trimming of ssds.

 

Does anyone happen to have a sample fstrim cronjob for unraid they would like to share? :)

  • 4 months later...

Bump!

 

I have literary just read the same two threads and after just installing an SSD as my cache drive am wondering the same  :)

 

Rich

Or even instruction on how to create one?

 

Rich

  • 7 months later...

Or even instruction on how to create one?

 

Rich

 

Bit of a necro, but if it helps, then great.

 

So, I have an SSD, not as a cache drive, but mounted outside my array via SNAP. I use it for my dockers. It is formatted in btrfs.

 

After some reading (complete noob here), this is what I did to get TRIM on that drive.

 

1. Create a folder on my UnRAID flash drive called "custom".

2. Create a txt file in /boot/custom called DailySSDTrim and use the below code:

 

#
# Trim the SSD drive.
#
/sbin/fstrim -v /mnt/SSD | logger

 

3. Edit my go file to include:

#
# Set up daily SSD cache trim for unRaid cron.
#
fromdos < /boot/custom/DailySSDTrim > /etc/cron.daily/DailySSDTrim
chmod +x /etc/cron.daily/DailySSDTrim

 

I would be very appreciative is someone could confirm that this is indeed the correct approach (how can I check if trim is working?)

 

There is a thread somewhere that I pulled the info. from, my google mofo is failing me atm.

Yes that is the correct way to do it.

 

You will see the following in the log:

 

Feb 26 04:52:28 Tower logger: /mnt/cache: 262714859520 bytes were trimmed

 

This drive is my cache drive.

 

The bytes trimmed is somewhat of a misnomer, it's actually the remaining free space on the drive in bytes.

Thanks mate, nice to have the confirmation.

 

I will check the logs in the morning.

Archived

This topic is now archived and is closed to further replies.

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.