(SOLVED) Cache drive -> encrypted


Kir

16 posts in this topic Last Reply

Recommended Posts

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

Link to post
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.

 

 

Link to post

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

Link to post

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 by Niklas
Link to post
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.

 

Link to post
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

Link to post
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?

Link to post
  • Kir changed the title to (SOLVED) Cache drive -> encrypted

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.