Last active
January 9, 2020 21:16
-
-
Save dmytrotkk/f302e3474405167efaf45cf4e7f43eac to your computer and use it in GitHub Desktop.
Limit Docker volume size tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install convoy | |
wget https://github.com/rancher/convoy/releases/download/v0.5.2/convoy.tar.gz | |
tar xvzf convoy.tar.gz | |
sudo cp convoy/convoy convoy/convoy-pdata_tools /usr/local/bin/ | |
sudo mkdir -p /etc/docker/plugins/ | |
sudo bash -c 'echo "unix:///var/run/convoy/convoy.sock" > /etc/docker/plugins/convoy.spec' | |
# download and execute preparation script | |
wget https://raw.githubusercontent.com/rancher/convoy/master/tools/dm_dev_partition.sh | |
bash dm_dev_partition.sh --write-to-disk $DISK_MOUNTPOINT | |
# unmount disk | |
umount $DISK_MOUNTPOINT | |
# copy-paste last string of the output | |
# or just run: | |
convoy daemon --drivers devicemapper --driver-opts dm.datadev=$DISK_MOUNTPOINT\1 --driver-opts dm.metadatadev=$DISK_MOUNTPOINT\2 & | |
# now you should be able to create volumes using convoy driver: | |
docker volume create --driver convoy --opt size=100m test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment