Adjust gate btrfs setup
This is in preperation for the DinD gate. Change-Id: I2d2489df00808824f957ed0e3aa3a44496ff7e3e Partially-Implements: blueprint multinode-gate
This commit is contained in:
parent
e4b84fbeac
commit
e65392aefb
@ -20,8 +20,15 @@ sudo parted /dev/${DEV} -s -- mklabel msdos
|
|||||||
sudo service docker stop
|
sudo service docker stop
|
||||||
echo 'DOCKER_OPTS="-s btrfs"' | sudo tee /etc/default/docker
|
echo 'DOCKER_OPTS="-s btrfs"' | sudo tee /etc/default/docker
|
||||||
sudo rm -rf /var/lib/docker/*
|
sudo rm -rf /var/lib/docker/*
|
||||||
|
|
||||||
|
# We want to snapshot the entire docker directory so we have to first create a
|
||||||
|
# subvolume and use that as the root for the docker directory.
|
||||||
sudo mkfs.btrfs -f /dev/${DEV}
|
sudo mkfs.btrfs -f /dev/${DEV}
|
||||||
sudo mount /dev/${DEV} /var/lib/docker
|
sudo mount /dev/${DEV} /var/lib/docker
|
||||||
|
sudo btrfs subvolume create /var/lib/docker/docker
|
||||||
|
sudo umount /var/lib/docker
|
||||||
|
sudo mount -o noatime,compress=lzo,space_cache,subvol=docker /dev/${DEV} /var/lib/docker
|
||||||
|
|
||||||
sudo service docker start
|
sudo service docker start
|
||||||
|
|
||||||
sudo docker info
|
sudo docker info
|
||||||
|
Loading…
Reference in New Issue
Block a user