Fallocate fails inside my docker container
I am trying to run a script inside a Docker Linux Ubuntu 14.10 container that uses a command fallocate
like this:
fallocate -l 10M 10meg
However, when I run this script, and even when I run the command, when I have ssh'd to my container, I get the following error:
root@~$>> fallocate -l 10M 10meg
fallocate: fallocate failed: Operation not supported
Any ideas why this is happening in my container?
+3
source to share
1 answer
at the time of writing, fallocate()
syscall is not supported by Union FS , the filesystem used by Docker. You can use truncate
like this (recommended):
truncate -s 10M 10meg
or dd
(expensive):
dd if=/dev/zero of=10meg bs=1M count=10
+3
source to share