Created
July 13, 2017 14:18
-
-
Save tmyers273/d817155cf1411031d0fcb5e08499e2cc to your computer and use it in GitHub Desktop.
DO Block Storage Setup
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 characters
volume= | |
while [ -z $volume ] | |
do | |
echo -n 'Enter volume name: ' | |
read volume | |
done | |
echo "Volume = $volume" | |
echo -e "Stopping mysql...\c" | |
systemctl stop mysql | |
echo "done" | |
echo -e "Moving existing database directory to new location...\c" | |
mv /var/lib/mysql /mnt/$volume/mysql | |
echo "done" | |
echo -e "Creating symlink...\c" | |
ln -s /mnt/$volume/mysql /var/lib/mysql | |
echo "done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment