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.

Create Hosting Package different disk array

Discussion in 'General Discussion' started by waddy, Feb 1, 2009.

  1. waddy

    waddy Member

    Joined:
    Aug 26, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    One server, I have two Raid arrays, one with 15K drives (home1) and one with 7200K drives (home2). I would like to set it up so that when a customer signs with the cheaper account (starter package) to use the slower drives (array) for their home/www etc and the larger sites use the fast array?

    This would then save space on the more expensive drives.

    I have looked and cannot see how i can do this in WHM? Any help..
     
  2. Voltar

    Voltar Well-Known Member

    Joined:
    Apr 30, 2007
    Messages:
    269
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Bakersfield, California
    I don't believe that you can do natively with cPanel. When you set a home directory prefix (home, which would use /home, /home2, etc), the new accounts are created on the drive/array/mount that has the most free space.
     
  3. waddy

    waddy Member

    Joined:
    Aug 26, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I saw the same thing in the WHM, although i am sure it can be done. Hope someone from cpanel can help maybe.. Ill send a ticket in a few days i guess...
     
  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
    I previously investigated this for another customer. Currently, accounts will default to the bigger (not slower) drive. However, you can migrate accounts from 1 partition to another via WHM. While it makes things less painful, it doesn't fully automate what you intend to do. We currently don't have anything in our APIs where you can dictate a specific partition to use for a new account.

    Another thing to keep in mind in case you're not already aware, cPanel/WHM stores databases on /var and Mailman data is stored on /usr. So while the vast majority of user data will typically be on /home, it is important to keep these additional paths in mind when provisioning your server in this manner.
     
  5. waddy

    waddy Member

    Joined:
    Aug 26, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Posted as a Festure request, SAN/ISCSI are so popular now, nice to simply point certain packages to certain storage
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Right now a little trick I use on some servers is to move the user's home
    path "/home/username" to the new drive "/newdrv/username" and then
    create a folder symlink to the new location back in /home with the username.

    It's cheap and dirty and has to be setup manually one time each for
    each account that you intend to do that with but it works.

    For kernels that support it (most now), an alternative approach is to
    allocate the new drive as additional space for /home and data will
    rollover to the new drive. The only downside to this approach is if
    you were to have a problem and lose either physical drive then both
    drives would be toast as far as your files are concerned so the former
    manual setup symlink option still remains the safer bet for doing that.
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Since the original poster wanted this functionality tied to a certain package, what Spiral suggests should be doable with a postwwwacct script. Have the script compare the provided package versus a list of packages that can use the faster array. If the package matches, postwwwacct could move the home directory to the faster array and create the symlink.

    Documentation on postwwwacct is found at ScriptHooks < AllDocumentation < TWiki
     
Loading...

Share This Page