Force TRIM on device
Posted: Thu Mar 04, 2021 11:29 pm
Hello
I've been playing around with ZFS on a single 4TB SMR drive because I would like to take advantage of the data checksumming feature in ZFS. I come from Linux where I used btrfs to do the same.
I just have one issue now, which surfaced after I filled the drive to capacity, and subsequently cleared half a terabyte of space. Write speeds have plummeted. As in, the patient appears dead, doctor.
The drive now performs like it does with HFS when it fills above about 6 GB free space. Basically, it doesn't perform any more (with writes - reads are fine). But, with HFS on this type of drive (I have a few of these), I can clear some space, and write speeds recover. I've already used `trimforce enable`, and I assume that macOS/HFS is using TRIM commands on these drives to make them recover.
I created the pool with autotrim on, but it seemed like this didn't kick in. I tried `sudo zpool trim dock`, but it exited with code 255. I then tried `sudo zpool trim dock media-B9F9B73B-D214-1E4B-9790-4C59C42C426B`, but this results in `cannot trim 'media-B9F9B73B-D214-1E4B-9790-4C59C42C426B': trim operations are not supported by this device`.
Is there any way to force this? I don't see any options in `man zpool`. ZFS seems to be my only way to get data checksumming onto this system. Btrfs doesn't do FUSE, and even if APFS eventually gets around to it, I'd have to get a new computer, because this one can't upgrade to the newer macOSes.
Thank you!
I've been playing around with ZFS on a single 4TB SMR drive because I would like to take advantage of the data checksumming feature in ZFS. I come from Linux where I used btrfs to do the same.
I just have one issue now, which surfaced after I filled the drive to capacity, and subsequently cleared half a terabyte of space. Write speeds have plummeted. As in, the patient appears dead, doctor.
The drive now performs like it does with HFS when it fills above about 6 GB free space. Basically, it doesn't perform any more (with writes - reads are fine). But, with HFS on this type of drive (I have a few of these), I can clear some space, and write speeds recover. I've already used `trimforce enable`, and I assume that macOS/HFS is using TRIM commands on these drives to make them recover.
I created the pool with autotrim on, but it seemed like this didn't kick in. I tried `sudo zpool trim dock`, but it exited with code 255. I then tried `sudo zpool trim dock media-B9F9B73B-D214-1E4B-9790-4C59C42C426B`, but this results in `cannot trim 'media-B9F9B73B-D214-1E4B-9790-4C59C42C426B': trim operations are not supported by this device`.
Is there any way to force this? I don't see any options in `man zpool`. ZFS seems to be my only way to get data checksumming onto this system. Btrfs doesn't do FUSE, and even if APFS eventually gets around to it, I'd have to get a new computer, because this one can't upgrade to the newer macOSes.
Thank you!