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 and /home2 on one drive... is it possible?

Discussion in 'General Discussion' started by jmmenef, Aug 27, 2007.

  1. jmmenef

    jmmenef Registered

    Joined:
    Aug 15, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I am moving to another server soon. The old server had 2 hard drives and the new server only has one huge drive. Three of my accounts have problems when I tried to move them to the /home drive (they were on a /home2 drive on the old server). They are running joomla and one of the php scripts is looking for some files or something in a /home2 directory.... that doesnt exist on the new server.

    So, I was thinking about creating a /home2 directory on the new server and moving that way, but I am not certain how to do it outside of whm. I can create a folder using putty commands, but whm doesnt see it.

    Any help on this would be much appreciated.
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    My suggestion would be:

    NOTE: Make sure you create /home2 first. Then 'ls -alt /|grep home' - make sure /home2 has the same permissions as /home and that /home2 is owned by the same user and group as /home. AFTER you have verified that /home2 is created and has the same ownership and permissions as /home, do the following:

    1. Log into WHM
    2. Click on Server Configuration
    3. Select Basic CPanel/WHM Setup
    4. Change Home Directory Prefix to: /home2 and SAVE
    - only do this while you are creating/moving the problematic accounts

    Then when you create new accounts or move/import accounts, they will be placed on /home2.

    AS SOON AS you are finished getting those few accounts moved onto /home2, you will want to repeat #1 through #3, and then in step #4 change Home Directory Prefix back to: /home and SAVE.

    That way your new accounts will continue to be made on /home but Cpanel will create those few problematic accounts on /home2.


    Mike
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Note that Joomla does have 2 configuration settings in which absolute paths are used. These may still be set to the old settings of /home2, you may want to just take the easier solution of changing these 2 entries rather than messing with creating an entirely new partition.
     
  4. gribozavr

    gribozavr Member

    Joined:
    Aug 15, 2007
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    3
    If you are running Linux, try adding this line to /etc/fstab
    /home /home2 none bind 0 0

    And run as root
    mount /home2

    Now all files under /home would be accessible under /home2 as well.

    Works for me.
     
  5. DeepakW

    DeepakW Active Member

    Joined:
    Nov 13, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Creating new home2 is not a good idea instead just check the configuration of the joomla
    and change the settings for it.
     
Loading...

Share This Page