Skip to content

Instantly share code, notes, and snippets.

@dmcgowan
Last active May 17, 2016 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmcgowan/46d96ba48a38ace4ce03572efbf25697 to your computer and use it in GitHub Desktop.
Save dmcgowan/46d96ba48a38ace4ce03572efbf25697 to your computer and use it in GitHub Desktop.
New overlay driver storage analysis
# ./testpartition.sh /dev/loop0 overlay
++ mktemp -d
+ tmpdir=/tmp/tmp.kwAmm1WgsH
+ mount /dev/loop0 /tmp/tmp.kwAmm1WgsH
+ df /tmp/tmp.kwAmm1WgsH
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 38984 14726460 1% /tmp/tmp.kwAmm1WgsH
+ df -i /tmp/tmp.kwAmm1WgsH
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 11 999413 1% /tmp/tmp.kwAmm1WgsH
+ sleep 10
+ docker daemon -D -s overlay -g /tmp/tmp.kwAmm1WgsH
+ docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
6d28225f8d96: Pull complete
166102ec41af: Pull complete
d09bfba2bd6a: Pull complete
c80dad39a6c0: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:5718d664299eb1db14d87db7bfa6945b28879a67b74f36da3e34f5914866b71c
Status: Downloaded newer image for ubuntu:latest
+ df /tmp/tmp.kwAmm1WgsH
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 186788 14578656 2% /tmp/tmp.kwAmm1WgsH
+ df -i /tmp/tmp.kwAmm1WgsH
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 17545 981879 2% /tmp/tmp.kwAmm1WgsH
+ docker pull golang
Using default tag: latest
latest: Pulling from library/golang
8b87079b7a06: Pull complete
a3ed95caeb02: Pull complete
1bb8eaf3d643: Pull complete
3e04171ce2e5: Pull complete
9f9bcb469766: Pull complete
70062a14b40c: Pull complete
21c92d96cb05: Pull complete
9fb07296d135: Pull complete
Digest: sha256:ac856e0e50b686552d62249dfd98cb449ab8e38e5a167dd444194ae1e59d924c
Status: Downloaded newer image for golang:latest
+ df /tmp/tmp.kwAmm1WgsH
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 1065428 13700016 8% /tmp/tmp.kwAmm1WgsH
+ df -i /tmp/tmp.kwAmm1WgsH
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 92032 907392 10% /tmp/tmp.kwAmm1WgsH
+ docker pull wordpress
Using default tag: latest
latest: Pulling from library/wordpress
8b87079b7a06: Already exists
a3ed95caeb02: Pull complete
af1704cb90e1: Pull complete
6acdef7ebe13: Pull complete
4fc566a7c22a: Pull complete
b06a1bacee51: Pull complete
c5fc21fb6c09: Pull complete
df319b61c869: Pull complete
f958e5267409: Pull complete
b06010f04fa8: Pull complete
17c1b5f8acff: Pull complete
2ed292d591c7: Pull complete
5ea0585ac6f2: Pull complete
f53bd0951968: Pull complete
93949259a9c2: Pull complete
33ea413bdf77: Pull complete
8d937227258e: Pull complete
f79a39a56bc2: Pull complete
Digest: sha256:0ee9d65c19b39496363224c8b6ff0dc25dda8f71b8aabc24662a552e6ed0443d
Status: Downloaded newer image for wordpress:latest
+ df /tmp/tmp.kwAmm1WgsH
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 1748224 13017220 12% /tmp/tmp.kwAmm1WgsH
+ df -i /tmp/tmp.kwAmm1WgsH
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 237641 761783 24% /tmp/tmp.kwAmm1WgsH
+ docker pull dockercore/docker
Using default tag: latest
latest: Pulling from dockercore/docker
8b87079b7a06: Already exists
a3ed95caeb02: Already exists
0c0fb1975f5f: Pull complete
ff8d8c5faa3d: Pull complete
ec2a986e30b5: Pull complete
0338be69ec1f: Pull complete
c112a23af8d1: Pull complete
d9524b4363f0: Pull complete
55dc1ccd0c94: Pull complete
5cabc14c5b68: Pull complete
52217305a219: Pull complete
067349543543: Pull complete
a5f067bd9e04: Pull complete
37e71a0d361d: Pull complete
ab5f18f2c8bb: Pull complete
91188acae54d: Pull complete
bd6fccd39e19: Pull complete
fea6dcf13113: Pull complete
8a46bb5b8421: Pull complete
307dac139dae: Pull complete
8ace9bf388c1: Pull complete
2f9a0a69fdfc: Pull complete
fe3caff7866b: Pull complete
3d1c6097924d: Pull complete
b2b80561e166: Pull complete
8269cba6c331: Pull complete
49e47d61188c: Pull complete
e27704471197: Pull complete
129c3d917335: Pull complete
2ae2245bca21: Pull complete
85c41bf7bb42: Pull complete
adc271421271: Pull complete
Digest: sha256:d452d5dca9e5c14738da5cc1735edb113781ceb5fa2a9ac074ac1f6f022232b4
Status: Downloaded newer image for dockercore/docker:latest
+ df /tmp/tmp.kwAmm1WgsH
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 4960420 9805024 34% /tmp/tmp.kwAmm1WgsH
+ df -i /tmp/tmp.kwAmm1WgsH
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 698217 301207 70% /tmp/tmp.kwAmm1WgsH
++ cat /var/run/docker.pid
+ kill 13251
+ sleep 2
+ umount /tmp/tmp.kwAmm1WgsH
+ rmdir /tmp/tmp.kwAmm1WgsH
# ./testpartition.sh /dev/loop0 overlay2
++ mktemp -d
+ tmpdir=/tmp/tmp.3eYxlwOtdI
+ mount /dev/loop0 /tmp/tmp.3eYxlwOtdI
+ df /tmp/tmp.3eYxlwOtdI
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 38984 14726460 1% /tmp/tmp.3eYxlwOtdI
+ df -i /tmp/tmp.3eYxlwOtdI
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 11 999413 1% /tmp/tmp.3eYxlwOtdI
+ sleep 10
+ docker daemon -D -s overlay2 -g /tmp/tmp.3eYxlwOtdI
+ docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
6d28225f8d96: Pull complete
166102ec41af: Pull complete
d09bfba2bd6a: Pull complete
c80dad39a6c0: Pull complete
a3ed95caeb02: Pull complete
Digest: sha256:5718d664299eb1db14d87db7bfa6945b28879a67b74f36da3e34f5914866b71c
Status: Downloaded newer image for ubuntu:latest
+ df /tmp/tmp.3eYxlwOtdI
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 174684 14590760 2% /tmp/tmp.3eYxlwOtdI
+ df -i /tmp/tmp.3eYxlwOtdI
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 8165 991259 1% /tmp/tmp.3eYxlwOtdI
+ docker pull golang
Using default tag: latest
latest: Pulling from library/golang
8b87079b7a06: Pull complete
a3ed95caeb02: Pull complete
1bb8eaf3d643: Pull complete
3e04171ce2e5: Pull complete
9f9bcb469766: Pull complete
70062a14b40c: Pull complete
21c92d96cb05: Pull complete
9fb07296d135: Pull complete
Digest: sha256:ac856e0e50b686552d62249dfd98cb449ab8e38e5a167dd444194ae1e59d924c
Status: Downloaded newer image for golang:latest
+ df /tmp/tmp.3eYxlwOtdI
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 962532 13802912 7% /tmp/tmp.3eYxlwOtdI
+ df -i /tmp/tmp.3eYxlwOtdI
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 32960 966464 4% /tmp/tmp.3eYxlwOtdI
+ docker pull wordpress
Using default tag: latest
latest: Pulling from library/wordpress
8b87079b7a06: Already exists
a3ed95caeb02: Pull complete
af1704cb90e1: Pull complete
6acdef7ebe13: Pull complete
4fc566a7c22a: Pull complete
b06a1bacee51: Pull complete
c5fc21fb6c09: Pull complete
df319b61c869: Pull complete
f958e5267409: Pull complete
b06010f04fa8: Pull complete
17c1b5f8acff: Pull complete
2ed292d591c7: Pull complete
5ea0585ac6f2: Pull complete
f53bd0951968: Pull complete
93949259a9c2: Pull complete
33ea413bdf77: Pull complete
8d937227258e: Pull complete
f79a39a56bc2: Pull complete
Digest: sha256:0ee9d65c19b39496363224c8b6ff0dc25dda8f71b8aabc24662a552e6ed0443d
Status: Downloaded newer image for wordpress:latest
+ df /tmp/tmp.3eYxlwOtdI
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 1425992 13339452 10% /tmp/tmp.3eYxlwOtdI
+ df -i /tmp/tmp.3eYxlwOtdI
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 60744 938680 7% /tmp/tmp.3eYxlwOtdI
+ docker pull dockercore/docker
Using default tag: latest
latest: Pulling from dockercore/docker
8b87079b7a06: Already exists
a3ed95caeb02: Already exists
0c0fb1975f5f: Pull complete
ff8d8c5faa3d: Pull complete
ec2a986e30b5: Pull complete
0338be69ec1f: Pull complete
c112a23af8d1: Pull complete
d9524b4363f0: Pull complete
55dc1ccd0c94: Pull complete
5cabc14c5b68: Pull complete
52217305a219: Pull complete
067349543543: Pull complete
a5f067bd9e04: Pull complete
37e71a0d361d: Pull complete
ab5f18f2c8bb: Pull complete
91188acae54d: Pull complete
bd6fccd39e19: Pull complete
fea6dcf13113: Pull complete
8a46bb5b8421: Pull complete
307dac139dae: Pull complete
8ace9bf388c1: Pull complete
2f9a0a69fdfc: Pull complete
fe3caff7866b: Pull complete
3d1c6097924d: Pull complete
b2b80561e166: Pull complete
8269cba6c331: Pull complete
49e47d61188c: Pull complete
e27704471197: Pull complete
129c3d917335: Pull complete
2ae2245bca21: Pull complete
85c41bf7bb42: Pull complete
adc271421271: Pull complete
Digest: sha256:d452d5dca9e5c14738da5cc1735edb113781ceb5fa2a9ac074ac1f6f022232b4
Status: Downloaded newer image for dockercore/docker:latest
+ df /tmp/tmp.3eYxlwOtdI
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 15579920 3962348 10803096 27% /tmp/tmp.3eYxlwOtdI
+ df -i /tmp/tmp.3eYxlwOtdI
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/loop0 999424 137652 861772 14% /tmp/tmp.3eYxlwOtdI
++ cat /var/run/docker.pid
+ kill 17688
+ sleep 2
+ umount /tmp/tmp.3eYxlwOtdI
+ rmdir /tmp/tmp.3eYxlwOtdI
#!/bin/env sh
set -x
tmpdir=$(mktemp -d)
mount $1 $tmpdir
df $tmpdir
df -i $tmpdir
docker daemon -D -s $2 -g $tmpdir > /tmp/dockertestlog.txt 2>&1 &
sleep 10
docker pull ubuntu
df $tmpdir
df -i $tmpdir
docker pull golang
df $tmpdir
df -i $tmpdir
docker pull wordpress
df $tmpdir
df -i $tmpdir
docker pull dockercore/docker
df $tmpdir
df -i $tmpdir
kill $(cat /var/run/docker.pid)
sleep 2
umount $tmpdir
rmdir $tmpdir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment