run TRIM on single SSD zfs


Go to solution Solved by cams1303,

Recommended Posts

Hi

Very new unraid but look fantastic.

For home I am running a total SSD unraid server as I wanted 100% silence as its in the main living room.

I followed Spaceinvader One guide on how to set up a zfs pool (2x 4TB nvme plus 2x 4TB SSD) as a zpool support auto trim, all good and seems to work well.

 

However I also followed Spaceinvaders One other guide (Mastering ZFS: Easily Auto Snapshot & Replicate a ZFS Dataset - Part A) to not only replicate the zfs pool appdata set but also I'm using it to backup OS images (not critical data). This replication of the zfs pool appdata is done to a single zfs SSD (8TB) using his script for zfs replication (rsync replication is another option in that script, see link below).

 

The issue I have is there seems to be no way to auto trim a single zfs drive (disk2), I was able to turn it on (maybe) with the cmd:

zpool autotrim=on disk2

so now I see:  disk2  autotrim  on  local

But seem to have no way in testing if it trim works on disk2 (8tb zfs ssd), or can be scheduled.

 

Thanks for any help or advice, maybe if I use another file system and see is rsync replication works.

His script is here:  https://github.com/SpaceinvaderOne/Unraid_ZFS_Dataset_Snapshot_and_Replications

and says: Rsync Replication: If the destination isn't ZFS, the script can mount the snapshot and then use rsync for replication. Two modes are available:Mirror Copy: A direct mirror of the source. Incremental Copy: Uses hardlinks to create space-efficient incremental backups.

 

Just Hoping I can stick with zfs for a single SSD and have trim functional.

 

Link to comment
  • Solution
Posted (edited)
4 hours ago, JorgeB said:

Assign the SSD as a pool instead, you can have an old flash drive to fulfill the array device requirement.

I have done that and from what you said years ago I could use btrfs instead as "With v6.8 you need to run trim manually, with v6.9 no need to trim any btrfs pool since it uses the new discard=async mount option," So tried btrfs with rsync replication and that worked but wasted hours trying to find out any info on how to restore from an rsync backup, can only guess more long cmd lines.

 

So end of story have dumped unraid out of frustration and using the PC with Windows because I know how to use that and backup/restore it with my SSD's that will all auto trim with zero effort. A mod may as well close the thread.

Edited by cams1303
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.