Move mysql to another disk?
Hello,
I need to move mysql to another disk because of speed problems.
I've added an SSD disk in the server:
root@server[/]# lsblk
sdc 8:32 0 238.5G 0 disk
??sdc1 8:33 0 238.5G 0 part /mnt
so then I did follow the instructions there:
#service mysql stop;
OK
#mv /var/lib/mysql /var/lib/mysql.actual;
OK
]# /sbin/mkfs.ext4 -L /var/lib/mysql /dev/sdc;
mke2fs 1.41.12 (17-May-2010)
/dev/sdc is entire device, not just one partition!
Proceed anyway? (y,n) y
etc etc
Then:
# mount /dev/sdc /var/lib/mysql;
mount: mount point /var/lib/mysql does not exist
so I cannot proceed.
also did try to make it as a partition
fdisk /dev/sdc
and created
root@server[/]# ll /dev/sdc1
brw-rw---- 1 root disk 8, 33 Nov 14 23:27 /dev/sdc1
then I did follow again the instructions from the article:
service mysql stop;
mv /var/lib/mysql /var/lib/mysql.actual;
/sbin/mkfs.ext4 -L /var/lib/mysql /dev/sdc1;
mount /dev/sdc1 /var/lib/mysql;
and again I gotthe error:
mount: mount point /var/lib/mysql does not exist
Any help?
-
You can't mount a volume on a fodler that does not exist. Since you renamed mysql to mysql.actual, you need to recreate /var/lib/mysql and then this command mount /dev/sdc1 /var/lib/mysql; Won't throw an error. 0 -
Hello @MaRiOsGR66, Let us know if the previous post helps. Thank you. 0
Please sign in to leave a comment.
Comments
2 comments