Results 1 to 8 of 8

Thread: Is there a way to add space to a partition?

  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    614

    Post Is there a way to add space to a partition?

    Please forgive my ignorance in this question, i know already I probably am going to sound like a retard for asking it.

    HOwever, is there a way to add space to an existing partition without losing all of the files?

    For example, i ordered a server, and the datacenter only put a 6GB partiion on my /var/. Now, i have like 5gb worth of databases in /var/lib/mysql and the partition is full.

    If not, what are my options here?

    Could I move all of the databases to another location and create a sym-link for msyql directory to point there? Or is there a better option?

  2. #2
    Member
    Join Date
    Oct 2003
    Posts
    87

    Default

    I moved mine to /home/mysql and have a symlink from /var/lib/mysql.

  3. #3
    Member
    Join Date
    Mar 2003
    Posts
    614

    Default

    Quote Originally Posted by vwiley1 View Post
    I moved mine to /home/mysql and have a symlink from /var/lib/mysql.

    I tried that, but then I had a problem with the mysql.sock file for some reason. I would create the file, then restart mysql and it would be gone, and mysql wouldn't start?

    Did you have to do anything special for that?

  4. #4
    Member
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    1,052

    Default

    Hi,

    Specify the path to mysql.sock file in /etc/my.cnf file and restart mysql. Below is the entry for example:

    socket = /var/lib/mysql/mysql.sock

    This should fix the problem for you.

    Thanks.

  5. #5
    Member TechBrein's Avatar
    Join Date
    Jul 2006
    Posts
    17

    Default

    noimad1,

    Remove the unwanted files, if any, from /var first. You may safely remove the mysql binary logs inside /var/lib/mysql. They usually consume very large space. Moving /var/lib/mysql to another location and creating a symlink to /var/lib/ should work. How did you move the mysql databases? Did you create a directory, say in /home, and then moved the dirs under /var/lib/mysql over there? If so, make sure that the directory that contains the mysql DBs has got the permission of 751 and the ownership of mysql:mysql.

  6. #6
    Member
    Join Date
    Mar 2003
    Posts
    614

    Default

    Quote Originally Posted by TechBrein View Post
    noimad1,

    Remove the unwanted files, if any, from /var first. You may safely remove the mysql binary logs inside /var/lib/mysql. They usually consume very large space. Moving /var/lib/mysql to another location and creating a symlink to /var/lib/ should work. How did you move the mysql databases? Did you create a directory, say in /home, and then moved the dirs under /var/lib/mysql over there? If so, make sure that the directory that contains the mysql DBs has got the permission of 751 and the ownership of mysql:mysql.

    Yes, I did create a folder under the home directory, set the permissions to 751 and the ownership to mysql:mysql. I then created the symlink, and the mysql.sock file just kept disapearing each time I would restart mysql.

    Now here is the scary part. I move all of the files back (just using the mv command) and all uf a sudden my mysql folder went from 4.0GB to 1.2gb.....i don't know what is missing, and it makes me very nervous. I didn't delete anything, just 'mv' it. I haven't had any customer say their databases are gone or anything like that......

    Anyone ever seen that happen?

  7. #7
    Member TechBrein's Avatar
    Join Date
    Jul 2006
    Posts
    17

    Default

    Did you remove any files, mysql binary logs, in particular?
    Last edited by TechBrein; 06-14-2007 at 05:41 AM.
    || Get Your Servers Truly Managed <= TECHBREIN => Provide Excellent Support to your Customers
    || Server Management :: 24x7 Technical Support :: Web App Development

  8. #8
    Member
    Join Date
    Mar 2003
    Posts
    614

    Default

    Quote Originally Posted by TechBrein View Post
    Did you remove any files, mysql binary logs, in particular?
    No, that's what has me kind of freaked out. I didn't remvoe anything, just used the "mv command"

Similar Threads

  1. add MySQL Disk Space in user quota space
    By activa in forum E-mail Discussions
    Replies: 139
    Last Post: 10-07-2010, 10:16 AM
  2. / partition is 70% full.How to allocate more space?
    By filth80 in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 08-02-2010, 12:11 PM
  3. / partition running out of space
    By Novisoft in forum cPanel & WHM Discussions
    Replies: 7
    Last Post: 11-24-2009, 03:46 AM
  4. How to reduce space in /usr partition?
    By tedy in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 10-28-2009, 03:03 AM
  5. add mailman's disk space in user quota space
    By fleksi in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 05-02-2007, 01:08 AM