Reputation: 21
I encounter an issue with docker. I want to restore a big database in a postgres container but, when I try to restore my sql i have this :
ERROR: could not extend file "base/16384/16481": wrote only 4096 of 8192 bytes at block 7873 db_1 | HINT: Check free disk space.
Is there a way to increase my container disk space ?
Upvotes: 2
Views: 4037
Reputation: 4279
If you run multiple containers/images your host file system may run out of available inodes. Use df -ih
to check how much inodes you have left. "Standard" df -h
might show you that you have 40% disk space free, but still your docker images (or even docker itself) might report that disk is full. If you have ext4, it's very easy to exceed the limit. If you can do it, change docker's data dir to be placed on a XFS partition.
For some reference checkout:
ext2/3/4 hold inode numbers in a 32-bit on-disk structure, so yes, the maximum possible number of inodes on an ext2/3/4 filesystem is 2^32, or about 4 billion. Most modern filesystems like XFS use 64-bit structures for this sort of thing, so XFS can in theory go to 2^64 inodes. But with a minimum inode size of 256 bytes, that would mean 4096 Exabytes of disk space for the inodes alone. In reality, theoretical/design limits such as this are not usually attainable (or advisable) in practice.
Upvotes: 1
Reputation: 5062
Try using overlay2
as a driver to see if it makes any change. It shouldn't have a restriction on size limit.
If your default driver is devicemapper
, there seem to be a 10 gb size limit
If you are stuck with the devicemapper
driver, you can alter the value of the dm.basesize
parameter of you docker daemon (official documentation). Start your docker daemon with the option --storage-opt dm.basesize=xxxG
. You will need to rebuild all the necessary containers for them to be affected.
Upvotes: 1