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.

How Will WHM Use Two Disks?

Discussion in 'Data Protection' started by jonwatson, May 16, 2007.

  1. jonwatson

    jonwatson Well-Known Member

    Joined:
    Apr 1, 2007
    Messages:
    101
    Likes Received:
    1
    Trophy Points:
    16
    Hello,

    I just received my first mult-disk WHM server. I've added the second disk using the facility within WHM, but I'm unclear on how WHM will use it. Will it fill up the first disk and then move to the second or will it round-robin them with accounts? Or do I have to tell it what to do somewhere?

    Any pointers to manual or web pages (or direct answers!) would be appreciated.

    Thanks!

    Jon
     
  2. 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
    Your answers lay in the "Basic cPanel/WHM Setup" (WHM -> Server Configuration -> Basic cPanel/WHM Setup).

    What you can do (assuming your "Home Directory Prefix" is set to home) is create a /home2 directory on your second disk. This will let WHM know it can use that directory for creating new accounts (the home directories of these accounts). WHM will check both your old home directory and this secondary one, and whichever one has more free disk space will be the one that is used.
     
  3. jonwatson

    jonwatson Well-Known Member

    Joined:
    Apr 1, 2007
    Messages:
    101
    Likes Received:
    1
    Trophy Points:
    16
    Ah, I see. Very cool.

    OK, so I didn't know about the 'same name thing' and mounted my second disk as '/data'. Can I therefore put '/data' into the Home Directory Prefix text box?

    Thanks!
     
  4. 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
    You could always create a directory called "home" in /data (resulting in /data/home/) and WHM will recognize that.
     
    #4 cPanelDavidG, May 16, 2007
    Last edited: May 16, 2007
  5. jonwatson

    jonwatson Well-Known Member

    Joined:
    Apr 1, 2007
    Messages:
    101
    Likes Received:
    1
    Trophy Points:
    16
    Ah, OK. That sounds easier.

    So...how does it know not to use a 'home' folder that a user may have created in their public_html directory or something?
     
  6. 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
    While I am not familiar with the coding that goes into this functionality, I would assume there's a simple check to ensure there's no recursive home directories. After all, someone may innocently create a "homepage" directory in their public_html. Having done that myself on many cPanel/WHM servers and never having a problem (or getting yelled at by SysAdmins), I assume there are rather well designed safeguards to prevent such a thing from happening.
     
  7. jonwatson

    jonwatson Well-Known Member

    Joined:
    Apr 1, 2007
    Messages:
    101
    Likes Received:
    1
    Trophy Points:
    16
    Yes, I'm sure you're right. That would be a pretty glaring oversight if it wasn't taken into account.

    As usual, the WHM answer is blindingly simple.

    Thanks!
     
  8. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    If you dont need your second disk for /home usage at the moment, you could use it for your phpcache and /tmp directories to help improve performance a bit. Two heads are better than one.
     
  9. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The Home Directory Prefix will only use mount points at the root level. Thus /home34absdfds353dfg and /home4 but not /data/home or /users/joe/home The value stipulated in Home Directory Prefix is used in a regular expression to find the match, again at the root level (repetition for emphasis).
     
  10. 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
    Umm, that's not what it says in WHM ;)

     
  11. mohit

    mohit Well-Known Member

    Joined:
    Jul 12, 2005
    Messages:
    553
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sticky On Internet
    hi,
    so how do we solve such a scenario.
    My "/home" is 84% used and i've another drive which is "/backup" and is only 20% used with weekly backups, how do i create home2 here and move my bulky accounts to this drive.

    also will cpbackup script automatically remember to backup the accounts under home2 ?

    regards,
    mohit
     
  12. 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
    cPanel Backup Scripts will automatically backup accounts stored under /home2.
     
  13. mohit

    mohit Well-Known Member

    Joined:
    Jul 12, 2005
    Messages:
    553
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sticky On Internet
    but how do i use the drive which is mounted as "/backup" for "home2"
    cpanelkenneth states your suggestion about having a folder "home2" inside "/backup" will not be picked up.

    Edit : will this kind of folder work "/backup/home2/" where "/backup" is 2nd drive mounted .

    this is confusing, please help.

    regards,
    mohit
     
  14. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    My post above is incorrect. The HOMEMATCH value (called Home Directory Prefix in the Basic WHM setup page), will match any mount point with that value as the last part of the string. Examples:

    /home
    /home34
    /usr/home
    /usr/usr/usr/usr/usr/usr/usr/home
    /usr/placehomehere

    As long as the above are mount points, the particular partition will be used to hold accounts. However, a directory within a non-matching mountpoint will not be used. Thus, if /backup is the mount point, and it contains a directory named home2, accounts will not be created in /backup/home2 because that path is not a mount point.

    My apologies regarding the confusion.
     
Loading...

Share This Page