Suppose I have created a 1 GiB VeraCrypt container and now have it filled to 900 MiB.
How can I extend the container to 5 GiB on Ubuntu?
(without having to create a new 5 GiB container and then copying the files over)
Following the advice of pbies, I created a 5 MiB VeraCrypt container (with a normal and hidden partition).
I used dd if=/dev/zero bs=5M count=1 >> File
to append 5 MiB of null bytes
Running sudo resize2fs /dev/mapper/veracrypt1
, I get an error:
resize2fs 1.42.13 (17-May-2015)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/veracrypt1
Couldn't find valid filesystem superblock.
I made sure to use EXT4 as the filesystem (rather than FAT, as resize2fs
cannot operate on it)