You are not logged in.
Greetings, it would have been nice to know if it is possible to actually use LUKS (or possibly any alternative) to easily encrypt already-used spaces on any disk, thanks.
Original post-name "Is it possible to encrypt drive through LUKS without reformatting?"
Last edited by LowkeyUndergrounder (2022-10-17 19:11:56)
Offline
No. LUKS (and any encryption layer) operates by creating a container for the encrypted contents (sometimes covering a full partition, sometimes serving as a nested filesystem, etc.). So, there's no way to in-place encrypt a file unless its filetype natively supports some form of encryption (this is particularly true for LUKS which is most typically used covering a full partition rather than sitting underneath a filesystem).
You'll need to create a partition that you setup for LUKS encryption, and copy files into it. You could either do this via RAM (and a tmpfs), or another disk.
All the best,
-HG
Offline
It's possible if the file system can be shrunk. See dm-crypt/Device encryption#Encrypt an existing unencrypted file system.
Offline
No. LUKS (and any encryption layer) operates by creating a container for the encrypted contents (sometimes covering a full partition, sometimes serving as a nested filesystem, etc.). So, there's no way to in-place encrypt a file unless its filetype natively supports some form of encryption (this is particularly true for LUKS which is most typically used covering a full partition rather than sitting underneath a filesystem).
You'll need to create a partition that you setup for LUKS encryption, and copy files into it. You could either do this via RAM (and a tmpfs), or another disk.
All the best,
-HG
Ahh damn, gotta change the disks the files are on a few times, thanks for the answer mate!
Offline