/home and /home2 on one drive... is it possible?

jmmenef

Registered
Aug 15, 2005
2
0
151
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.
 

mtindor

Well-Known Member
Sep 14, 2004
1,394
72
178
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
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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.
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.
 

gribozavr

Member
Aug 15, 2007
23
1
53
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.
 

DeepakW

Active Member
Nov 13, 2005
33
0
156
Creating new home2 is not a good idea instead just check the configuration of the joomla
and change the settings for it.