The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Home Directory on Second Hard Drive

Discussion in 'General Discussion' started by markb14391, May 21, 2012.

  1. markb14391

    markb14391 Well-Known Member

    Joined:
    Jun 9, 2008
    Messages:
    305
    Likes Received:
    2
    Trophy Points:
    18
    Hi,

    We're using a server configuration with two separate drives, and we aren't going RAID. So we need to make sure that cPanel uses both drives for creating accounts.

    By default, the second drive is /disk2.

    I've read the instructions for having cPanel automatically add accounts to the drive (or partition) with the most free space, however I'm not clear on some points:

    1. If I leave the default settings, does the drive have to be mounted with "home" in the name? Or can we leave it "disk2" and simply create a directory with "home" in the name?
    2. If we can just create a directory, does it have to have a unique name (e.g., "home2")? Or can it be "home" (even though there is a "home" directory on the first disk)?
    3. Does cPanel put all user data in the user's home directory? Or will it still put users' databases on the main drive?

    Thanks,

    Mark
     
  2. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    If you mounted your new hard drive as /home2, then you can specify this home directory while the creation of the account in WHM itself.

    Thank you.
     
  3. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    387
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Hello,

    To get the answers for your questions, you just have to look at the "Basic cPanel & WHM Setup" in your WHM. Read the below portions over there..

    =========
    Enter the location where you wish for new users’ home directories to be created. By default all directories matching the "Home Directory Prefix" are checked for available disk space and the directory with the most free space will be used.

    Example: /home

    /home default

    Additional home directories matching the following value will also be used for new home directory creations. (Leaving this value blank disables the feature.) This option only takes one value.

    Examples: “home” matches /home, /home2, /newhome, /usr/home, /anythingwith/homeinit
    =========

    The databases are stored in mysql data directory ( /var/lib/mysql by default ).

    Thank you,
    Nibin
     
    #3 NixTree, May 22, 2012
    Last edited: May 22, 2012
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    To answer your specific questions, you would want to mount second drive as home2 if possible. For the name, it does need to be home2 rather than home, since it would be incredibly confusing to use two mounts with home in them. Finally, if you have both /home and /home2, then cPanel will check during account creation which has the most disk space percentage available and use the one with the most free space. This means some accounts will go into /home and some will go into /home2
     
Loading...

Share This Page