MaRiOsGR66

Well-Known Member
Feb 18, 2011
109
1
66
cPanel Access Level
Root Administrator
Hello,

I need to move mysql to another disk because of speed problems.
I've added an SSD disk in the server:

[email protected][/]# 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: The proper way to move MySQL to a second drive

#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
[email protected][/]# 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?
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,488
188
193
Chesapeake, VA
greenolivetree.net
cPanel Access Level
DataCenter Provider
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.