Create New Account Puts directory on backup hard drive?

BlackRain

Well-Known Member
May 28, 2003
51
0
156
USA
cPanel Access Level
Root Administrator
Today, I used WHM to create a new account for new domain name.

The only problem is that the WHM/CPanel software is building the new account on the backup hard drive and not the primary where all the other domain directorys are?

Anyone know how to correct this?

Homeroot: /home2

Should be

Homeroot: /home
 
Last edited:

BlackRain

Well-Known Member
May 28, 2003
51
0
156
USA
cPanel Access Level
Root Administrator
I confirmed my default "Default Home Directory" is /home in Main >> Server Configuration >> Basic cPanel/WHM Setup.

However, each time a create a new account it gets put in /home2

Is there any way to change this?

:confused:
 

BlackRain

Well-Known Member
May 28, 2003
51
0
156
USA
cPanel Access Level
Root Administrator
Upon further reading it looks like the reason Cpanel/WHM is forcing the new account to the backup harddrive is this:

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.
There has to be a way around this as I have plenty of room on the original drive.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,216
13
313
Houston, TX
cPanel Access Level
Root Administrator
Today, I used WHM to create a new account for new domain name.

The only problem is that the WHM/CPanel software is building the new account on the backup hard drive and not the primary where all the other domain directorys are?

Anyone know how to correct this?

Homeroot: /home2

Should be

Homeroot: /home
I'm confused. What's the reasoning behind creating a /home2 on your drive that should only be used for backups?
 

PlatinumServerM

Well-Known Member
PartnerNOC
Jul 10, 2005
400
3
168
New Jersey, USA
cPanel Access Level
Root Administrator
If home2 is just being used for backups, you should name it /backup

This will avoid the conflict with the auto drive balancing and will also avoid quota conflicts.
 

H2Hosting.com

Well-Known Member
Sep 4, 2001
192
0
316
I'm confused. What's the reasoning behind creating a /home2 on your drive that should only be used for backups?
The same problem. I want to create new accounts on /home, not in /home2!!! Why when I set default to /home but get new accounts in /home2 ???
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
The same problem. I want to create new accounts on /home, not in /home2!!! Why when I set default to /home but get new accounts in /home2 ???
To enforce a specific path, please use the following feature in WHM and customize both options specified below:

WHM: Main >> Server Configuration >> Basic cPanel/WHM Setup
* Default Home Directory
* Home Directory Prefix

For example, the following should work to enforce new accounts being created in a path of "/home" and not a different path such as "/home2":
1.) Set the option "Default Home Directory" to "/home"
2.) Unset the option "Home Directory Prefix" so that it is blank or empty (i.e., not defined).

Related Documentation: Basic cPanel/WHM Setup
 

H2Hosting.com

Well-Known Member
Sep 4, 2001
192
0
316
To enforce a specific path, please use the following feature in WHM and customize both options specified below:

WHM: Main >> Server Configuration >> Basic cPanel/WHM Setup
* Default Home Directory
* Home Directory Prefix
Thank you. It works fine.
 

l00ph0le

Member
Aug 16, 2007
23
0
51
I have the same problem...what would be the proper way to move these accounts back over to the proper /home directory..I would have to delete the symbolic link as well i take it .
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I have the same problem...what would be the proper way to move these accounts back over to the proper /home directory..I would have to delete the symbolic link as well i take it .
Rearranging accounts between partitions may be performed using WHM via the following menu path:
WHM: Main >> Account Functions >> Rearrange an Account
Documentation: Rearrange Accounts
 

l00ph0le

Member
Aug 16, 2007
23
0
51
Thanks for that tip..I actually deleted the symbolic link, and did a cp -rp from the one drive to another..everything seems to be ok..I figured since the system was viewing a symbolic link that cpanel would not notice the difference between the 2.

Now I realize that I am not sure which directory cpanel is dumping mail and other data into...Cpanel assums the account is in home2 when I manually moved everything back over to home via copy..What to do now?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Thanks for that tip..I actually deleted the symbolic link, and did a cp -rp from the one drive to another..everything seems to be ok..I figured since the system was viewing a symbolic link that cpanel would not notice the difference between the 2.

Now I realize that I am not sure which directory cpanel is dumping mail and other data into...Cpanel assums the account is in home2 when I manually moved everything back over to home via copy..What to do now?
So that a more accurate diagnoses can be formed please let us know the following:
1.) Are any related errors or symptoms presently being experienced?
2.) Was the original home directory removed from the /home2 partition, or was it just renamed?
3.) If the directory was removed or renamed, was a new symlink created in its place?
4.) Were any configurations manually edited to use the new home directory path?
5.) Please let us know the output of the following two commands, where "username" should be replaced by that of the affected user account:
Code:
# stat /home/username
# stat /home2/username
If needing to create a new symlink, here is a basic example that can be used, where "newpath" and "oldpath" represent the new and old home partitions:
Code:
# ln -insv /newpath/username /oldpath/username
 

l00ph0le

Member
Aug 16, 2007
23
0
51
Don,

Thanks for the tips..
Cpanel was still dumping e-mail and user information into the old directories on /home2, since i had not deleted the old directory while i made sure everything was working.. If i deleted a directory cpanel was throwing out an error.

So basically I deleted the directories on /home(as I had copied them there), used whm to reassign the user account and everything seems to be ok at this point.

Why does cpanel create a symlink on /home2 after moving the directories with reassign account?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
Don,

Thanks for the tips..
Cpanel was still dumping e-mail and user information into the old directories on /home2, since i had not deleted the old directory while i made sure everything was working.. If i deleted a directory cpanel was throwing out an error.

So basically I deleted the directories on /home(as I had copied them there), used whm to reassign the user account and everything seems to be ok at this point.

Why does cpanel create a symlink on /home2 after moving the directories with reassign account?
The symlink is useful as a precautionary measure; for example, a user may have custom scripts that define a full path, and by utilizing a symlink such issues should be negated while allowing time for the custom scripts to be manually updated by a system administrator or by the user.