wiper.sh (hdparm) for SSD Trim support


Recommended Posts

So I did a quick search for "wiper.sh" and "wiper" and came up empty.  Then i tried "hdparm" and as you can imagine I got a lot of hits but none that seemed to discuss wiper.

 

So my question is: can we use wiper.sh in UnRAID to add in keeping SSD's trimmed, like my soon to be repurposed Vertex 2 as a cache drive which has no firmware based garbage collection / trim?

 

Or does the new kernel in 5.0RC4 support automatic trim now on RFS?

 

My thoughts were we could run wiper.sh after every mover run.

 

http://sourceforge.net/projects/hdparm/files/

 

Based on the readme:

This script works for read-write mounted ext4 and xfs filesystems,

and for read-only mounted/unmounted ext2, ext3, ext4, reiser3 and xfs filesystems.

 

Also according to the readme:

The sil24_trim_protocol_fix.patch file in this directory is a kernel

patch for all recent Linux kernel versions up to and including 2.6.31.

 

This fixes the kernel device driver for the Silicon Image SiI-3132

SATA controller to correctly pass DSM/TRIM commands to the drives.

 

If you use this hardware in your system, then you will need to apply

the patch to your kernel before using the wiper scripts.

Link to comment

So some more food for thought.

 

Looks like from the readme as I posted above, and from other forums Im' reading, we'd need to first unmount or at least set as read-only the cache drive before running wiper.sh

 

Is it possible to script those events?  Can you set cache as read-only while the array is still on-line?  can you script taking the array off-line and back on-line again?

 

Absolute worst case it should be doable manually, and then it would be nice to be able to run wiper.sh from the gui but even as a first step running it from ssh would be helpful.

 

Thoughts?

Link to comment

ok come to think of it ... is the cache drive running reiserFS?  does it HAVE TO? >;-)  Iknow reiser was choosen for unRAID for a specific reason (something about inodes iirc) but the cache drive certainly shouldn't *need* to be resier :)

 

 

Tom has already mentioned the possibility of allowing the cache drive to be ext4 in a future version of unraid for just this reason. He mentions it in a thread about TRIM support over in the 5.0-rc support forum.

 

EDIT: This is the thread if you're interested. http://lime-technology.com/forum/index.php?topic=20451.0

Link to comment
  • 1 month later...

Running 5.0-rc5 and I can confirm that ext4 works fine. The only problem is that you can't use the ext4 partition as the cache drive. Kind of a non-starter for me.

 

I'm looking at automating wiper.sh. You could issue a quick "mount -o remount,ro /mnt/cache", but more likely than not you'll get a busy error. That means shutting down all processes with open files (e.g., plugins like dropbox). Probably a good idea to stop Samba also.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.