I'm trying to figure out if I can set up a LUKS container using several file images instead of just one. I came across a method that involves creating multiple images with fallocate, using losetup to bind them with loop devices, and then merging them with mdadm to create a linear RAID setup before finally making the LUKS container on those MD devices. Is there a better approach to achieve this? Any insights would be appreciated!
2 Answers
I think you might be mixing up terms a bit. When you mention 'container', it sounds like you're thinking of Docker or similar. But in this case, you're just looking to encrypt a file using LUKS.
It sounds like you're aiming for a LUKS container that can expand, right? Have you given your proposed method a shot? I'm curious if it worked out for you!

Thanks for your reply! Yes, I want to break down the LUKS container into smaller files so I can sync them remotely using rsync. I believe smaller files would be more manageable than one large file.