Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Changing value of datadir on a cpanel production box

Discussion in 'General Discussion' started by hariskhan, Apr 15, 2006.

  1. hariskhan

    hariskhan Well-Known Member

    Joined:
    Apr 15, 2004
    Messages:
    146
    Likes Received:
    0
    Trophy Points:
    166
    Hello,

    This is a fbsd 5.4 box with cpanel's latest edition, recently installed.

    I have my servers setup like the following;

    /usr has about 20 GB, /var has about 8 GB space, /home has about 160 GB of space

    To my knowledge, cpanel runs /scripts/upcp every 7 hours (it was once every 24 hrs in the old days)

    I need to store all the mysql databases on /home, so there wouldn't be a limitation of space, if the databases for the portals I host grow further up.

    I have so far no custom settings mentioned in /etc/my.cnf on cpanel boxes.

    My question are;

    - If I make a change like datadir=/home/db (or some folder under /home) and restart mysql daemon, will it be over-written by cpanel when /scripts/upcp runs? (Does cpanel take into account the changes I'v made in /etc/my.cnf or over-write them to its factory defaults)

    or

    would those changes stay ...

    - In what event would those changes be over-written? (as a precaution)
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    cPanel doesn't touch /etc/my.cnf so you can make those changes there. The alternative is to move /var/lib/mysql to /home/mysql (remove /var/lib/mysql) and create a symlink to it:

    ln -s /home/mysql /var/lib/mysql

    This avoids configuration file changes.

    /scripts/upcp should only be running every 24 hours. If it is running more frequently you need to check the root cron job.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. eger

    eger Well-Known Member

    Joined:
    Feb 28, 2003
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    166
    I ran into a similar issue on a FBSD cPanel box where I ran out of /var space for mysql. I backup up my db dir then moved it to the /home partition and created a symlink just as Chirpy suggested and it worked just fine.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice