March 6, 201412 yr 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?
July 18, 201411 yr 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
February 26, 201511 yr 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.
February 26, 201511 yr 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.
February 26, 201511 yr 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.