Disclaimer: I've never used LVM or LUKS before.
Context: I use CentOS 7 and have X disk space available. I want to set up this disk space to store some important data, hence why I want to use LUKS to encrypt it.
However I'm not sure X will be sufficient; so, in the future, I might need to expand it (or even contract it if X turns out to be too much). But I want to do that in a more easy way, such that a full re-construction of the whole thing is not necessary and I have minimal disruption to the applications using that disk-space.
(I searched online for a solution on how to do this, but I didn't find anywhere someone who had such requirements)
So this is my thinking on how to approach the problem:
- add LVM layer on top of the disk space
- on top add LUKS layer to encrypt the space
- on top add a logical volume, most likely ext4
If I do it like this, will I able in the future to add extra space using LVM and expand the logical volume to include it? If not, what should I change to the steps above to achieve what I want? Is it even possible? Also: am I missing anything?