1
1
I have a dedicated server with OVH for my website that has 2x2TB SATA3 hard drives.
Currently I am using about 12GB with files and MySQL databases, however, an email notification I got from them told my hard drive is at 60% capacity. When I log in as root, the command df -k
gives the following:
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 20317384 11543220 7750220 60% /
/dev/root 20317384 11543220 7750220 60% /
none 16420916 452 16420464 1% /dev
/dev/md4 1917281348 13558900 1807097148 1% /home
tmpfs 16421232 0 16421232 0% /dev/shm
/dev/loop0 495844 11122 459122 3% /tmp
/dev/loop0 495844 11122 459122 3% /var/tmp
And the command fdisk -l t
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes 255 heads, 63
sectors/track, 243201 cylinders Units = cylinders of 16065 * 512 =
8225280 bytes Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier:
0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 243202 1953514583+ ee GPT
Partition 1 does not start on physical sector boundary.
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 243202 1953514583+ ee GPT
Partition 1 does not start on physical sector boundary.
Disk /dev/md4: 1978.9 GB, 1978886193152 bytes
2 heads, 4 sectors/track, 483126512 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/md2: 21.0 GB, 20970405888 bytes
2 heads, 4 sectors/track, 5119728 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
So my question is... how am I at 60% capacity of 2x2TB drives if I am only using 12GB? Please explain how I can fix this to someone who knows very little about Linux sys admin and partitions, etc., as well as cPanel. Do I have to do something special to make cPanel do this correctly? I'm not even sure why my account says I have 2x2TB drives but it seems I am at 60% capacity of a mere 20GB drive? Very confused by what these Linux commands are telling me.
Please explain, thanks!
Well why do I have so much un-utilized space? Can't I somehow partition up to 2TB to / (rootfs)? Or, how can I move stuff to /home which has 2TB on it? – mike719 – 2013-04-11T20:29:15.300
I guess what I think I should ask is I only have one cPanel account on the system, why isn't it located in /home to begin with? – mike719 – 2013-04-11T20:31:56.627
It is customary to split OS and data parts. (Just as in windows where you would install the OS on C:, and the SQL data on D:. If anything goes wrong you just reinstall the OS without formatting D:. Same here, except in a disaster you reinstall and keep /home. However someone ignored this during configuration and put the DB somewhere on /. That is just as silly as putting data in c:/program files/sql/, and sadly just as often done. – Hennes – 2013-04-11T20:32:42.227
That makes sense... ok so how do I move my MySQL (or really, I think I'd like to move the whole cPanel account too) to /home ?? – mike719 – 2013-04-11T20:34:16.230
question 1: Is there important data in the database. Question 2: Is there a backup of that data. Action 1: Either make that backup or make sure how you can restore it. (if not read up on sqldump). Only then consider moving the database. – Hennes – 2013-04-11T20:37:29.847
Yes there is important data, the database is almost 7GB. I know about sqldump but not sure how to move it to a different partition. – mike719 – 2013-04-11T20:39:21.473
If have limited experience with MySQL databases, so read up on this and double check things! However one solution seems to be:
mkdir /home/var_mysql
service mysql stop
mv /var/lib/mysql /home/var_mysql
ln -s /var/lib/mysql /home/var_mysql
6 Once this is done restart mysql
start mysql server
7 document this. – Hennes – 2013-04-11T20:42:12.660So, did someone at OVH screw up when they configured my server for me? Or how can I make it so that any new cPanel accounts I make will go to /home instead of / ??? – mike719 – 2013-04-11T21:09:28.420
>