2

I have a SSD with an encrypted (cryptsetup/luks) LVM partition. Since I'm not yet into that ssd stuff I offhandedly left approx. 10% unpartitioned for overprovisioning. Just because I was told that SSDs enjoy having some space left.

Since TRIM is working fine for the LVs I know that the drive gets informed about free blocks by the OS (or FS or whatever). Anyway this leads to the assumption that for the SSD to know about free space it's neccessary for it to be informed about.

But how do I know the SSD knows about the unpartitioned area? Assuming the above it won't until it's been told about. Or is the drive aware of the partitions?

After all I'm wondering whether I could expand the LVM partition to use the full disk. Would this make any difference? Would the free space become part of the encryption? Would the SSD know about this free space - so that it can take advantage for overprovisioning?

But again this space won't be managed by any trim-aware filesystem so that neither the LVM, OS etc nor the drive itself know what's in there and therefore none of them would touch it, correct?

If this is correct then what should one do?

I guess I'd be more comfortable having the free space be part of the encrypted PV/VG. But then how can I get the drive know about that it's actually free? Creating a LV and execute a TRIM command on it once, then delete it afterwards?

PS: It's about a Samsung 860 Evo 250GB with openSuse Leap 15

Thank you very much in advance!

3
  • You're using LUKS with TRIM, together at the same time? I've read that is a potential security leak, since now all the zero-sectors are clearly erased & empty. Usually LUKS does an initial write to fill the storage with pseudo-random data so you can't tell what's used and what's empty
    – Xen2050
    Nov 9, 2018 at 16:51
  • 1
    And no need for overprovisioning. That's old news periodically regurgitated in some blogs for clickbait.
    – user931000
    Nov 9, 2018 at 17:26
  • I'm aware of the theoretical risk, but many articles state that it's not that bad. I verified TRIM by applying this great article: askubuntu.com/a/457642
    – anse
    Nov 11, 2018 at 7:30

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.