Last active
February 22, 2017 16:31
-
-
Save bradfordpythian/c6206f08e2641d1803ee213b20f0ab49 to your computer and use it in GitHub Desktop.
Revisions
-
bradfordpythian revised this gist
Feb 22, 2017 . 1 changed file with 1 addition and 1 deletion.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,7 @@ DISK="/dev/sdb" [ `fdisk -l ${DISK} | wc -l` -eq 0 ] && echo "ERROR: A second disk '${DISK}' was not found" && exit 2 fdisk -l ${DISK} pvdisplay ${DISK} [ $? -eq 0 ] && echo "ERROR: Physical Volume for '${DISK}' already exists" && exit 3 pvcreate ${DISK} vgcreate appvg ${DISK} -
bradfordpythian revised this gist
Feb 22, 2017 . 1 changed file with 2 additions 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 @@ -3,6 +3,8 @@ DISK="/dev/sdb" [ `fdisk -l ${DISK} | wc -l` -eq 0 ] && echo "ERROR: A second disk '${DISK}' was not found" && exit 2 fdisk -l ${DISK} pvdisplay ${DISK} [ $? -eq 0 ] && echo "ERROR: Physical Volume for '${DISK}' already exists && exit 3 pvcreate ${DISK} vgcreate appvg ${DISK} -
bradfordpythian revised this gist
Feb 22, 2017 . 1 changed file with 1 addition and 1 deletion.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,7 +1,7 @@ [ `id -u` -ne 0 ] && echo "ERROR: Script must be run as root" && exit 1 DISK="/dev/sdb" [ `fdisk -l ${DISK} | wc -l` -eq 0 ] && echo "ERROR: A second disk '${DISK}' was not found" && exit 2 fdisk -l ${DISK} pvcreate ${DISK} vgcreate appvg ${DISK} -
bradfordpythian revised this gist
Feb 22, 2017 . 1 changed file with 6 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,8 +1,10 @@ [ `id -u` -ne 0 ] && echo "ERROR: Script must be run as root" && exit 1 DISK="/dev/sdb" [ `fdisk -l ${DISK} | wc -l` -eq 0 ] && echo "ERROR: A second disk was not found" && exit 2 fdisk -l ${DISK} pvcreate ${DISK} vgcreate appvg ${DISK} lvcreate -L 100M -n mysql_data0_data_lv appvg lvcreate -L 100M -n mysql_audit0_lv appvg -
bradfordpythian revised this gist
Feb 22, 2017 . 1 changed file with 2 additions and 1 deletion.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,4 +1,5 @@ [ `id -u` -ne 0 ] && echo "Script must be run as root" && exit 1 fdisk -l /dev/sdb pvcreate /dev/sdb vgcreate appvg /dev/sdb -
bradfordpythian created this gist
Feb 22, 2017 .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,29 @@ sudo su - fdisk -l /dev/sdb pvcreate /dev/sdb vgcreate appvg /dev/sdb lvcreate -L 100M -n mysql_data0_data_lv appvg lvcreate -L 100M -n mysql_audit0_lv appvg lvcreate -L 100M -n mysql_binlog0_lv appvg lvcreate -L 100M -n mysql_tmp0_lv appvg mkfs.ext4 /dev/appvg/mysql_data0_data_lv mkfs.ext4 /dev/appvg/mysql_audit0_lv mkfs.ext4 /dev/appvg/mysql_binlog0_lv mkfs.ext4 /dev/appvg/mysql_tmp0_lv mkdir -p /mysql/data0/data /mysql/audit0 /mysql/binlog0 /mysql/tmp0 echo " /dev/appvg/mysql_data0_data_lv /mysql/data0/data ext4 defaults 0 0 /dev/appvg/mysql_audit0_lv /mysql/audit0 ext4 defaults 0 0 /dev/appvg/mysql_binlog0_lv /mysql/binlog0 ext4 defaults 0 0 /dev/appvg/mysql_tmp0_lv /mysql/tmp0 ext4 defaults 0 0" >> /etc/fstab mount /mysql/data0/data mount /mysql/audit0 mount /mysql/binlog0 mount /mysql/tmp0 df -h