2

I would like to use ecryptfs for some files/directories, maybe a whole file system. Some of my files can be compressed pretty good, but from what I've read so far ecryptfs doesn't support compression currently. There's file systems like BTRFS or ZFS supporting compression, but from my understanding that shouldn't work in a setup using ecryptfs because the file systems only see random encrypted data and can't compress it anymore.

So is there some transparent way like ecryptfs itself to get compression before encryption?

I'm not interested in things like bzip or manually zipping files or such, I need something transparent, so that applications don't need to care, just like ecryptfs itself works. So I need some file system layer or such. Additionally, I'm aware of lower level things like LUKS, but am especially interested in something on top of the file system to easier be able to use e.g. BTRFS and ZFS with their LVM possibilities to increase storage and such.

1

Not with ecryptfs AFAIK.

But if you used a LUKS container you could then use a compressing filesystem like btrfs or zfs.

The downside is LUKS needs a fixed size container (file/partition) first, so if you know the space requirements beforehand it may save space overall.

I've read about methods to get a variable size, or expanding LUKS file using virtual machine hard drive container files...

  • Thanks, I'm aware of LUKS but the downsides of it in combination with BTRFS or ZFS you mentioned are the reason why I'm asking for something on top of the file system, like ecryptfs. Added that to my question. – Thorsten Schöning Jun 15 '17 at 10:04

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.