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.

Links that are causing the files to be created under /home and /home2 ?

Discussion in 'Workarounds and Optimization' started by calvinphanctt, Sep 28, 2012.

  1. calvinphanctt

    calvinphanctt Active Member

    Joined:
    Mar 27, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Sorry, I don't know where should I ask this question, so I ask it in here, if it's wrong place, please feel free to move it, but don't delete! Thank you
    ==================================

    Hi everyone,

    My server has 2 hard drives: the primary with Cpanel on is /home and the second hard drive slave is /home2 . Now my server has a problem is that: I notice that in /home2 there are several accounts which are duplicated from /home , and if I remove it that account from /home2 , the accounts on /home will be affected! What is the problem ?

    And I notice that when I create a new account, it go directly to /home2 , and if I tried to "Rearrange" it from WHM, the WHM said that it moved the account from /home2 to /home successfully, but in fact, that account still shows from the /home2 (not removed). Why ? Something is wrong here!

    I make a trouble ticket to the web hosting company, and the web hosting support technician told me that my server has links that are causing the files to be created under home and home2 , and he lists:


    drwx--x--x. 20 root root 4096 Sep 28 13:23 ./
    dr-xr-xr-x. 23 root root 4096 Sep 28 12:43 ../
    drwxr-xr-x 5 root root 4096 Sep 27 01:28 .cpan/
    drwxr-xr-x 3 root root 4096 Sep 28 02:48 .cpanm/
    drwx------ 4 root root 4096 Sep 27 01:18 .cpcpan/
    drwx------ 3 root root 4096 Sep 27 01:36 cpeasyapache/
    drwx--x--x 9 useracct1 useracct1 4096 Sep 27 06:57 useracct1/
    drwx--x--x 9 useracct2 useracct2 4096 Sep 27 21:51 useracct2/
    drwx--x--x 9 useracct3 useracct3 4096 Sep 27 22:05 useracct3/
    drwx--x--x 9 useracct4 useracct4 4096 Sep 27 09:09 useracct4/
    drwx--x--x 9 useracct5 useracct5 4096 Sep 27 22:23 useracct5/
    drwx--x--x 9 useracct6 useracct6 4096 Sep 27 09:29 useracct6/
    drwx--x--x 9 useracct7 useracct7 4096 Sep 27 07:14 useracct7/
    drwx--x--x 10 useracct8 useracct8 4096 Sep 27 09:20 useracct8/
    drwx------. 2 root root 16384 Sep 26 19:57 lost+found/
    -rw------- 1 root root 8192 Sep 28 16:46 quota.user
    lrwxrwxrwx 1 root root 14 Sep 27 08:23 useracct16 -> /home2/useracct16/
    drwx--x--x 9 useracct9 useracct9 4096 Sep 27 21:49 useracct9/
    drwx--x--x 9 useracct10 useracct10 4096 Sep 27 10:50 useracct10/
    drwx--x--x 9 useracct11 useracct11 4096 Sep 27 13:23 useracct11/
    drwx--x--x 9 useracct12 useracct12 4096 Sep 28 13:34 useracct12/
    drwx--x--x 9 useracct13 useracct13 4096 Sep 27 22:01 useracct13/
    root@useracct16 [/home]# ls -l /home2
    total 48
    drwx--x--x. 7 root root 4096 Sep 28 13:23 ./
    dr-xr-xr-x. 23 root root 4096 Sep 28 12:43 ../
    lrwxrwxrwx 1 root root 12 May 5 03:13 useracct2 -> /home/useracct2/
    drwx--x--x 11 519 useracct7 4096 Apr 20 11:52 useracct14/
    lrwxrwxrwx 1 root root 14 Apr 15 01:01 useracct3 -> /home/useracct3/
    lrwxrwxrwx 1 root root 14 Apr 15 00:42 useracct6 -> /home/useracct6/
    lrwxrwxrwx 1 root root 14 Aug 16 16:36 useracct7 -> /home/useracct7/
    lrwxrwxrwx 1 root root 14 Apr 15 01:08 useracct8 -> /home/useracct8/
    drwx--x--x 9 useracct15 useracct15 4096 Sep 27 20:20 useracct15/
    drwx------. 2 root root 16384 Apr 13 17:13 lost+found/
    -rw------- 1 root root 8192 Sep 28 16:05 quota.user
    lrwxrwxrwx 1 root root 13 Apr 15 22:24 server1 -> /home/server1
    drwx--x--x 9 useracct16 useracct16 4096 Sep 27 08:38 useracct16/
    drwx--x--x 9 515 514 4096 May 9 23:41 useracct162/
    lrwxrwxrwx 1 root root 14 Sep 27 20:22 useracct9 -> /home/useracct9/
    lrwxrwxrwx 1 root root 14 Sep 27 10:54 useracct10 -> /home/useracct10/
    lrwxrwxrwx 1 root root 14 Sep 27 13:11 useracct11 -> /home/useracct11/
    lrwxrwxrwx 1 root root 14 Sep 28 13:23 useracct12 -> /home/useracct12/
    lrwxrwxrwx 1 root root 14 Sep 27 22:02 useracct13 -> /home/useracct13/


    So he asks me : If you do not wish for the files to be created under both paths then remove the links.

    I don't know how to remove the links !

    Could you please help me how to remove the links ?

    Thank you very much.

    Sincerely,
    Calvin
     
  2. 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
    Hello Calvin,

    If you select to rearrange an account, it will create a symlink from the old partition to the new one, so any account in /home2 that's moved to /home will have a symlink in /home2 to /home because the original user's directory in /etc/passwd is set at the time of user creation. I am uncertain why this would need to be changed in any way.

    As for why /home2 is having accounts created, it would be due to WHM > Basic cPanel & WHM Basic Setup area. The following field determines whether additional partitions named /home will be used for accounts:

    If you do not want /home2 to be used for accounts, remove home (default) and set it to blank.
     
  3. calvinphanctt

    calvinphanctt Active Member

    Joined:
    Mar 27, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Hi Tristan,

    Thank you for replying. Because both hard drives are 1 TB each, the first primary drive doesn't have many accounts yet, and the space is still big, no need to use the 2nd drive yet! But I don't know why every time I create account it go to /home2 instead of /home.

    So, in this case, if I upload stuffs for accounts in /home , will the same account in /home2 be uploaded and take spaces of /home2 hard drive too ? (What I mean is I don't want both hard drives get the same contents !)

    Please help ! Thank you very much!

    Sincerely,
    Calvin
     
  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
    Hello Calvin,

    The decision on which drive to use is based on accounts and space. If you have 4 accounts, 2 will be placed into /home and 2 into /home2 under that setting where you have home set for the additional home directories option. It doesn't have to do with /home having plenty of space. It has to do with the setting trying to equal out the /home and /home2 disk space usage.

    As for taking up space, symlinks do not take up space. They are a pointer and aren't using space on the system. You should not remove any of the symlinks.

    Thanks!
     

Share This Page