On my Linux system I have a file "1gb.file" that is 1073741824 bytes in size.
This file I'll put into a LUKS container ("1gb.file.crypt") with ext4 filesystem inside.
What size must the file "1gb.file.crypt" have so there is enough space inside for the luksformat
and the ext4 filesystem (I'll do mkfs.ext4 -m 0
) on the luksdevice
.
How to get enough space in the ext4 filesystem so I can put my 1073741824 bytes file inside, how to calculate this?
What size for the container if I have a 3 ... 7 or 10GB file into a LUKS container with ext4 filesystem?
How to calculate?
Some MBs left and free inside the container and on the ext4 filesystem it's OK, but I don't want to have hundreds of MBs free.
I don't know id it's relevant, but the file and the container are for read-only.
Or should I make the container big enough and shrink it after the file is in there a better way? But how to do this?
ext4
is usually not capitalized. Writing it asEXT4
is more than unusual, so I fixed your edit in that respect. Authorative source