Kir Posted December 7, 2018 Share Posted December 7, 2018 Hi guys, After going through encrypting my data drives and moving data back and forth, I'm ready for the next step- cache drive encryption. I have read some discussion on it, including the fact that TRIM is not supported at the dm-layer, so overprovisioning is the only option at the moment. I currently have the following: 1. 512Gb cache SSD drive with dockers only formatted btrfs 2. Empty 512Gb SSD drive, newly purchased, not added to the config Desired outcome: 2 mirrored cache drive formatted btrfs-enc Could somebody be so kind to list the steps of what needs to be done? Thank you Quote Link to comment
JorgeB Posted December 8, 2018 Share Posted December 8, 2018 -Backup cache -Add the other device to pool and format with btrfs encrypted -Restore data to cache You can use this to help with the backup/restore: https://forums.unraid.net/topic/46802-faq-for-unraid-v6/?do=findComment&comment=511923 Quote Link to comment
Kir Posted December 8, 2018 Author Share Posted December 8, 2018 And what about TRIM and overprovisioning? Quote Link to comment
JorgeB Posted December 9, 2018 Share Posted December 9, 2018 And what about TRIM and overprovisioning? Can't help with that, I don't use encryption so never had to worry about it, but google Unraid HPA, it should work if you create one, but before doing it use blkdiscard or secure erase on the SSDs. Quote Link to comment
Kir Posted December 10, 2018 Author Share Posted December 10, 2018 I can't believe nobody's done it before? Quote Link to comment
Kir Posted December 17, 2018 Author Share Posted December 17, 2018 So open topics: 1. What's the consensus on overprovisioning of encrypted SSD cache drives? 2. Should I pre-clear a SSD? Quote Link to comment
JorgeB Posted December 17, 2018 Share Posted December 17, 2018 2 hours ago, Kir said: 2. Should I pre-clear a SSD? No, use: blkdiscard /dev/sdX Quote Link to comment
Kir Posted December 18, 2018 Author Share Posted December 18, 2018 blkdiscard: /dev/sdi: BLKDISCARD ioctl failed: Remote I/O error In log: Dec 18 16:31:12 Storage kernel: sd 1:0:8:0: [sdi] tag#3 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08 Dec 18 16:31:12 Storage kernel: sd 1:0:8:0: [sdi] tag#3 Sense Key : 0x5 [current] Dec 18 16:31:12 Storage kernel: sd 1:0:8:0: [sdi] tag#3 ASC=0x21 ASCQ=0x0 Dec 18 16:31:12 Storage kernel: sd 1:0:8:0: [sdi] tag#3 CDB: opcode=0x42 42 00 00 00 00 00 00 00 18 00 Dec 18 16:31:12 Storage kernel: print_req_error: critical target error, dev sdi, sector 998244232 Quote Link to comment
JorgeB Posted December 18, 2018 Share Posted December 18, 2018 That means the SSD is on a controller that doesn't support trim, use onboard SATA instead (set to AHCI) Quote Link to comment
Niklas Posted December 19, 2018 Share Posted December 19, 2018 (edited) Following this thread with interest. I just moved all my drives over to encrypted fs, mostly to protect the data if hw stolen. I have 2 SSDs as cache and fs is encrypted btrfs in raid 1. Trim "should" work even on encrypted drives, right? I understand it won't on unraid (yet?) but what problems can this cause me? Over provisioning is an acceptable workaround if it helps with anything. But how do we do that? Would be nice to be able to set size when formatting the drives in the gui. Just leave some unformatted is what over provisioning does? Edited December 19, 2018 by Niklas Quote Link to comment
JorgeB Posted December 19, 2018 Share Posted December 19, 2018 1 hour ago, Niklas said: have 2 SSDs as cache and fs is encrypted btrfs in raid 1. Trim "should" work even on encrypted drives, right? No, you should get an unsupported operation error. 1 hour ago, Niklas said: Over provisioning is an acceptable workaround if it helps with anything. But how do we do that? On 12/9/2018 at 12:25 AM, johnnie.black said: google Unraid HPA, it should work if you create one, but before doing it use blkdiscard or secure erase on the SSDs. Quote Link to comment
Kir Posted December 19, 2018 Author Share Posted December 19, 2018 15 hours ago, johnnie.black said: That means the SSD is on a controller that doesn't support trim, use onboard SATA instead (set to AHCI) It's connected to the same controller as the other SSD, and I'm seeing this in the syslog: root: /var/lib/docker: 6.8 GiB (7294545920 bytes) trimmed Quote Link to comment
JorgeB Posted December 19, 2018 Share Posted December 19, 2018 6 minutes ago, Kir said: root: /var/lib/docker: 6.8 GiB (7294545920 bytes) trimmed That's the docker image getting trimmed, not the SSD filesystem. Quote Link to comment
Kir Posted December 19, 2018 Author Share Posted December 19, 2018 Just now, johnnie.black said: That's the docker image getting trimmed, not the SSD filesystem. Damn, and I always thought it was working 😕 Since I can't move it to another controller (Supermicro cage), is there another command to issue? Quote Link to comment
JorgeB Posted December 19, 2018 Share Posted December 19, 2018 You can preclear it, though it will cause some wear on the SSD, but doing it one time is not a big deal. Quote Link to comment
Kir Posted December 19, 2018 Author Share Posted December 19, 2018 I managed to do secure erase instead following this guide Quote Link to comment
Recommended Posts
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.