I created a file to mount as /tmp dir to limit it's size so it cant crash the system. I used mkfs.ext4 on it and it mounts in /etc/fstab. Now I need to increase the size, so I used fallocate again, and the /tmpfile shows larger now, but when mounted is the same size. I tried a bunch of things, like mounting manually and using resize2fs on the unmounted file and the mounted dir. The former has no errors, but still isnt larger, even after running the suggested
e2fsck -f /tmpfile on it.
I'm not using a loop device as with this answer, nor 2 partitions formated with parted. How to increase the size of a loop virtual disk?
EDIT: As pointed out, mounting a file to a directory uses a loop device by default, even without the
mount -o loop option. Using
fallocate -l 200M /tmpfile and then
resize2fs /dev/loop# worked with the file mounting edited out of the /etc/fstab, rebooting, and then mounting it over the bootup /tmp to check the size, by undoing the fstab edit and using
mount -a. Sidenote, I could have mounted it to /mnt to check, but unix/linux deals with overmounting gracefully: What happens when you 'mount over' an existing folder with contents?, though it seems there could be more conflicts when overmounting the home directory, but perhaps not.
lsblkshould show it, and then you can follow the answer to the linked question to solve your problem.
mount -o loopoption, thanks. I'll edit in what I did and you can use that as an answer if you like.