buildman: create and mount btrfs volume for docker
There are numerous issues with overlayfs that actually aren't present with btrfs. Btrfs seems to have long-running issues, but our builders are ephemeral. Example issue: https://github.com/docker/docker/issues/10180
This commit is contained in:
parent
9f31bdd571
commit
6a5cecebc5
1 changed files with 22 additions and 0 deletions
|
@ -50,3 +50,25 @@ coreos:
|
|||
after_units=['quay-builder.service']
|
||||
) | indent(4) }}
|
||||
{%- endif %}
|
||||
- name: format-var-lib-docker.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Before=docker.service var-lib-docker.mount
|
||||
ConditionPathExists=!/var/lib/docker.btrfs
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/truncate --size=28G /var/lib/docker.btrfs
|
||||
ExecStart=/usr/sbin/mkfs.btrfs /var/lib/docker.btrfs
|
||||
- name: var-lib-docker.mount
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Before=docker.service
|
||||
After=format-var-lib-docker.service
|
||||
Requires=format-var-lib-docker.service
|
||||
[Mount]
|
||||
What=/var/lib/docker.btrfs
|
||||
Where=/var/lib/docker
|
||||
Type=btrfs
|
||||
Options=loop,discard
|
||||
|
|
Reference in a new issue