Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aputs
Created October 11, 2016 07:24
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 aputs/768c7016cf8c13fe1ff44d95960bd6ac to your computer and use it in GitHub Desktop.
Save aputs/768c7016cf8c13fe1ff44d95960bd6ac to your computer and use it in GitHub Desktop.
lvcreate --wipesignatures y -n thinpool arch -L 100G
lvcreate --wipesignatures y -n thinpoolmeta arch -L 1G
lvconvert -y --zero n -c 512K --thinpool arch/thinpool --poolmetadata arch/thinpoolmeta
cat <<EOF | tee /etc/lvm/profile/docker-thinpool.profile
activation {
thin_pool_autoextend_threshold=80
thin_pool_autoextend_percent=20
}
EOF
lvchange --metadataprofile docker-thinpool arch/thinpool
cat <<EOF | tee /etc/docker/daemon.json
{
"storage-driver": "devicemapper",
"storage-opts": [
"dm.thinpooldev=/dev/mapper/arch-thinpool",
"dm.use_deferred_removal=true"
]
}
EOF
systemctl start docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment