Created
November 18, 2015 11:00
-
-
Save diresi/d9739b31d04a0b46d958 to your computer and use it in GitHub Desktop.
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
# stolen from centos docker-storage-setup | |
VG=vg | |
POOL_LV_NAME="docker-pool" | |
DATA_LV_NAME=$POOL_LV_NAME | |
META_LV_NAME="${POOL_LV_NAME}meta" | |
CHUNK_SIZE=512K | |
CHUNK_SIZE_ARG="-c $CHUNK_SIZE" | |
VG_SIZE=$( vgs --noheadings --nosuffix --units s -o vg_size ${VG} ) | |
META_SIZE=$(( $VG_SIZE / 1000 + 1 )) | |
DATA_SIZE=40%FREE | |
lvremove ${VG}/${DATA_LV_NAME} | |
lvcreate -y -L ${META_SIZE}s -n ${META_LV_NAME} ${VG} | |
lvcreate -y -l $DATA_SIZE -n ${POOL_LV_NAME} ${VG} | |
lvconvert -y --zero n $CHUNK_SIZE_ARG --thinpool $VG/$DATA_LV_NAME --poolmetadata $VG/$META_LV_NAME | |
lvchange --metadataprofile vg--docker-pool-extend ${VG}/${DATA_LV_NAME} | |
lvs -o+seg_monitor | |
lvs -o+lv_when_full | |
ps aux | grep dmev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment