Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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