-
-
Save lapngodoan/d26f4dc1cd7dcaed34eb to your computer and use it in GitHub Desktop.
Revisions
-
ambakshi revised this gist
Dec 21, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ pvcreate $DEVS && \ vgcreate direct-lvm $DEVS && \ lvcreate $STRIPE -n data direct-lvm -l 95%VG && \ lvcreate $STRIPE -n metadata direct-lvm -l 5%VG && \ dd if=/dev/zero of=/dev/direct-lvm/metadata bs=1M count=10 if ! rpm -qa | grep -q '^xfsprogs'; then yum install -y xfsprogs @@ -46,4 +46,4 @@ else if [ "$START" = yes ]; then /sbin/service docker start fi fi -
ambakshi revised this gist
Dec 16, 2014 . 1 changed file with 10 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -22,24 +22,27 @@ else fi fi pvcreate $DEVS && \ vgcreate direct-lvm $DEVS && \ lvcreate $STRIPE -n data direct-lvm -l 95%VG && \ lvcreate $STRIPE -n metadata direct-lvm -l 5%VG && \ dd if=/dev/zero of=/dev/direct-lvm/metadata bs=10M count=1 if ! rpm -qa | grep -q '^xfsprogs'; then yum install -y xfsprogs fi if [ -e /etc/sysconfig/docker-storage ]; then echo 'DOCKER_STORAGE_OPTIONS="--storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs --storage-opt dm.blocksize=512K"' | tee -a /etc/sysconfig/docker-storage else echo 'other_args="--storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs --storage-opt dm.blocksize=512K"' | tee -a /etc/sysconfig/docker fi if which systemctl >/dev/null 2>&1; then if [ "$START" = yes ]; then systemctl start docker.service fi else if [ "$START" = yes ]; then /sbin/service docker start fi -
ambakshi revised this gist
Nov 28, 2014 . 1 changed file with 9 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,11 @@ set -e ## striping seems to break docker #STRIPE="-i2 -I64" #DEVS="/dev/xvdf /dev/xvdg" DEVS="$1" if [ -z "$DEVS" ]; then echo >&2 "Specify which block devices to use" exit 1 fi if which systemctl >/dev/null 2>&1; then if systemctl status docker.service; then @@ -25,11 +29,12 @@ lvcreate $STRIPE -n metadata direct-lvm -l 5%VG dd if=/dev/zero of=/dev/direct-lvm/metadata bs=10M count=1 if ! rpm -qa | grep -q '^xfsprogs'; then yum install -y xfsprogs fi if which systemctl >/dev/null 2>&1; then echo 'OPTIONS="-d -H unix:///var/run/docker.sock"' | tee -a /etc/sysconfig/docker echo 'DOCKER_STORAGE="--storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs"' | tee -a /etc/sysconfig/docker-storage if [ "$START" = yes ]; then systemctl start docker.service fi @@ -38,4 +43,4 @@ else if [ "$START" = yes ]; then /sbin/service docker start fi fi -
ambakshi revised this gist
Nov 20, 2014 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -20,8 +20,8 @@ fi pvcreate $DEVS vgcreate direct-lvm $DEVS lvcreate $STRIPE -n data direct-lvm -l 95%VG lvcreate $STRIPE -n metadata direct-lvm -l 5%VG dd if=/dev/zero of=/dev/direct-lvm/metadata bs=10M count=1 if ! rpm -qa | grep -q '^xfsprogs'; then -
ambakshi revised this gist
Nov 15, 2014 . 1 changed file with 24 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,25 +4,38 @@ set -e ## striping seems to break docker #STRIPE="-i2 -I64" #DEVS="/dev/xvdf /dev/xvdg" DEVS="${DEVS:-/dev/sdb}" if which systemctl >/dev/null 2>&1; then if systemctl status docker.service; then systemctl stop docker.service START=yes fi else if /sbin/service docker status; then /sbin/service docker stop START=yes fi fi pvcreate $DEVS vgcreate direct-lvm $DEVS lvcreate --wipesignatures y $STRIPE -n data direct-lvm -l 95%VG lvcreate --wipesignatures y $STRIPE -n metadata direct-lvm -l 5%VG dd if=/dev/zero of=/dev/direct-lvm/metadata bs=10M count=1 if ! rpm -qa | grep -q '^xfsprogs'; then yum install -y xfsprogs fi if which systemctl >/dev/null 2>&1; then echo 'OPTIONS="-d -H unix:///var/run/docker.sock --storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs --storage-opt dm.blkdiscard=false --storage-opt dm.blocksize=512K"' | tee -a /etc/sysconfig/docker if [ "$START" = yes ]; then systemctl start docker.service fi else echo 'other_args="--storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs --storage-opt dm.blkdiscard=false --storage-opt dm.blocksize=512K"' | tee -a /etc/sysconfig/docker if [ "$START" = yes ]; then /sbin/service docker start fi fi -
ambakshi revised this gist
Nov 13, 2014 . 1 changed file with 20 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,28 @@ #!/bin/bash set -e ## striping seems to break docker #STRIPE="-i2 -I64" #DEVS="/dev/xvdf /dev/xvdg" DEVS="/dev/xvdg" if /sbin/service docker status; then /sbin/service docker stop START=yes fi pvcreate $DEVS vgcreate direct-lvm $DEVS lvcreate --wipesignatures y $STRIPE -n data direct-lvm -l 95%VG lvcreate --wipesignatures y $STRIPE -n metadata direct-lvm -l 5%VG dd if=/dev/zero of=/dev/direct-lvm/metadata bs=4096 count=1 if ! rpm -qa | grep -q '^xfsprogs'; then yum install -y xfsprogs fi echo 'other_args="--storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs --storage-opt dm.blkdiscard=false --storage-opt dm.blocksize=512K"' | tee -a /etc/sysconfig/docker if [ "$START" = yes ]; then /sbin/service docker start fi -
ambakshi revised this gist
Oct 31, 2014 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,14 @@ #!/bin/bash DEVS="/dev/xvdf /dev/xvdg" ## seems to break docker #STRIPE="-i2 -I64" pvcreate $DEVS vgcreate direct-lvm $DEVS lvcreate --wipesignatures y $STRIPE -n data direct-lvm -l 95%VG lvcreate --wipesignatures y $STRIPE -n metadata direct-lvm -l 5%VG dd if=/dev/zero of=/dev/direct-lvm/metadata bs=1M count=10 yum install -y xfsprogs service docker stop -
ambakshi revised this gist
Oct 30, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ pvcreate $DEVS vgcreate direct-lvm $DEVS lvcreate --wipesignatures y -i2 -I64 -n data direct-lvm -l 95%VG lvcreate --wipesignatures y -i2 -I64 -n metadata direct-lvm -l 5%VG dd if=/dev/zero of=/dev/direct-lvm/metadata bs=1M count=10 yum install -y xfsprogs service docker stop echo 'other_args="--storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs"' | tee -a /etc/sysconfig/docker -
ambakshi revised this gist
Oct 30, 2014 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,5 @@ lvcreate --wipesignatures y -i2 -I64 -n data direct-lvm -l 95%VG lvcreate --wipesignatures y -i2 -I64 -n metadata direct-lvm -l 5%VG yum install -y xfsprogs service docker stop echo 'other_args="--storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs"' | tee -a /etc/sysconfig/docker service docker start -
ambakshi revised this gist
Oct 30, 2014 . 1 changed file with 7 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,12 @@ #!/bin/bash DEVS="/dev/xvdf /dev/xvdg" pvcreate $DEVS vgcreate direct-lvm $DEVS lvcreate --wipesignatures y -i2 -I64 -n data direct-lvm -l 95%VG lvcreate --wipesignatures y -i2 -I64 -n metadata direct-lvm -l 5%VG yum install -y xfsprogs service docker stop echo 'other_args="--storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs"' \ | tee -a /etc/sysconfig/docker service docker start -
ambakshi created this gist
Oct 30, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ #!/bin/bash pvcreate /dev/xvdf /dev/xvdg vgcreate direct-lvm /dev/xvdg /dev/xvdh lvcreate --wipesignatures y -i2 -I64 -n data direct-lvm -l 95%VG lvcreate --wipesignatures y -i2 -I64 -n metadata direct-lvm -l 5%VG yum install -y xfsprogs echo 'other_args="--storage-opt dm.datadev=/dev/direct-lvm/data --storage-opt dm.metadatadev=/dev/direct-lvm/metadata --storage-opt dm.fs=xfs"' | tee -a /etc/ sysconfig/docker service docker restart