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 to use second hard drive ?

Discussion in 'General Discussion' started by calvinphanctt, Mar 21, 2008.

  1. calvinphanctt

    calvinphanctt Active Member

    Joined:
    Mar 27, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Hello all,

    My server has 2 hard drives: the 1st is 122 GB and 2nd is 459 GB

    According to the WHM in the "Show Current Disk Usage" :
    - The 1st hard drive 129 GB is mounted as /dev/hda8 and is set as /home
    - The 2nd hard drive 459 GB is mounted as /dev/sda1 and is set as /home2

    And now in the "Server Configuration" and in "Basic cPanel/WHM Setup" and at the line : "Default Home Directory" it is set as /home

    However, when I create new accounts, all the new accounts go into the second hard drive of 459 GB (/home2) but not /home !

    So, what should I do so that if I create new accounts then all the new accounts go to /home instead of /home2 ?

    Thank you for your help!

    Regards,
    Calvin
     
  2. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    It goes to /home2 cause /home2 has more free space than /home

    Secondary hard drives could be used for anything you like, really, and it's a nice way to keep on server backups. The advantage is that if the primary HDD fails, you still have the data and it can quickly be restored the moment your primary HDD is active again.

    You could also use the secondary drive for VPS if you want to, but since the 2ND HDD is bigger, I suppose your host wants you to use that for domains, since client accounts will fill up your HDD much quicker than cPanel or Linux scripts will
     
  3. calvinphanctt

    calvinphanctt Active Member

    Joined:
    Mar 27, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    How to use the small hard drive for back up?

    Hi SoftDux,

    Thank you for your reply. Alright, then how do I use the small hard drive for backup then ?

    Is there anyway that if I want to create new account and it goes to small hard drive?

    Regards,
    Calvin
     
  4. mitgib

    mitgib Well-Known Member
    PartnerNOC

    Joined:
    Apr 9, 2006
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    I think a better solution for that type of drive layout would be get everything into /home2 then make a dir /home2/home and move everything left in /home to it. Now you have an empty partition for /home and can unmount it and create an LVM partition on it.

    Once that is all setup, move /home2/home back to the newly created LVM /home and used the cpanel rearange accounts to put all the accounts into /home.

    Now you should have an empty /home2 and can delete that partition and add it to the LVM volume group. You can grow /home some, and/or create another logical volume to store backups. If you have 100gb of user data stored in /home you'd probably want to reserve about 400gb for backups if you retain daily/weekly/monthly

    Personally I would want a remote server to store backups, as that is the point of having them, for a catastrophic failure of your machine and a recovery path. So I'd just grow /home to span the entire LVM partition myself. I actually do it a little different on my machines, since I use 2 drives in all my servers, mainly to get /var/lib/mysql onto it's own drive/partition as I prefer to use xfs or reiserfs for mysql so I build a server with 10gb / 2x ram for swap, 512mb for /tmp and the rest of the 1st drive for /home, then create a 20gb partition on the 2nd drive for /var/lib/mysql and format it xfs as the hosting I do is very mysql intensive and storage need in /home is very low before I've maxed a server.
     
  5. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    That's a lot of extra work. cPanel will automatically use /home or /home2, whichever has the most space open. If you want to spread the accounts over both drives, then just stick with using /home & /home2 - if it's really a problem, then make /home on the second HDD, and /home2 on the smaller one.

    Either way, you'll have a bit of a performance increase if your user files (websites, email, etc) is on a different drive from the main OS drive.


    If you really want to use the smaller drive as backup (if you use daily, weekly & monthly backup, it will fill up quicker than the bigger HDD, then create a folder /backup on the first HDD (mkdir /backup) and use that in the backup configuration
     
  6. calvinphanctt

    calvinphanctt Active Member

    Joined:
    Mar 27, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Thank you for your help !

    Hi SoftDux and mitgib,

    Thank you you 2 for your help!

    Best regards,
    Calvin
     
Loading...

Share This Page