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.

users in dir other than /home

Discussion in 'General Discussion' started by mgdoyle, Jul 24, 2005.

  1. mgdoyle

    mgdoyle Member
    PartnerNOC

    Joined:
    Apr 24, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Hi all,

    The /home directory on my server is 88%. I want to configure cPanel so that new users are added to a directory on a second hard drive I have installed in the box. Is this possible? I would like to leave /home on the primary drive and all the currnet users in it, and use the new drive for new users.

    TIA.
     
  2. RavenSoul_

    RavenSoul_ Well-Known Member

    Joined:
    Nov 2, 2004
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Belgium
    In WHM:
    Server Configuration > Basic cPanel/WHM Setup > Default Home Directory
     
  3. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    I have done this. Everything has been working just fine.

    The only problem I am having now is disk usage is not being calculated in cPanel for my users.

    Where do I change where cPanel is calculating disk usage for clients?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Make sure that you have disk quotas enabled for the partition that you are using, both in /etc/fstab and using quota. /scripts/initquota and /scripts/fixquotas are a good place to start too.
     
  5. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Edit fstab to this?

    Code:
    /dev/hdc1               /backup                 ext3    defaults,usrquota        1 1
    I'm not sure about quotas. This is what WHM says to me.

    I can't get /scripts/initquota to run and already tried /scripts/fixquotas with no change.

    Thanks!
     
  6. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Any ideas?
     
  7. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Once you have edited fstab you need to remount that partition or reboot the server (whichever is simplest for you) then run initquotas.
     
  8. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    All the users are located in /backup/home now.

    Do I need to edit fstab to match?
     
  9. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    I have also noticed that WHM shows the wrong partition for the accounts I had created prior to the new drive being installed.

    I did the reboot and I still can't run /scripts/initquotas.

    Code:
    -bash: /scripts/initquota: No such file or directory
     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You've missed the s off the end of the script name which you correctly spelled in the line before ;)

    /scripts/initquotas
     
  11. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    :eek:

    Serious newbishness going on here.

    The script, of course, is running now.
     
  12. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    When you say 'and using quota" what exactly do you mean.

    I've done everything so far. I wonder if WHM needs to update for everyone's cPanel to reflect how much space they have used?
     
  13. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    initquotas should take care of that, if not, run /scripts/fixquotas afterwards. Basically, you should see two files at the top of the partition that holds accounts:

    aquota.user
    quota.user

    These are the files that contain the data for the linux quota system.
     
  14. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Ok, well, for some reason the changes I made to fstab didn't save. I must have done something wrong. I'll try this again.

    I do see those files. I bet that if I fix fstab, and save it right, everything will work.


    Thank you so much for your assistance!
     
  15. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    fstab isn't keeping my changes after I run those who scripts. It was after the reboot, I think.
     
  16. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Yeah, /scripts/initquotas messes up my fstab changes.

    Code:
    root@bigjohn [~]# /scripts/initquotas
    Quotas are now on
    /dev/hdc1 (remove)
    Updating Quota Files......
            quotacheck: Scanning /dev/sda3 [/] done
            quotacheck: Checked 15095 directories and 218166 files
            quotacheck: Scanning /dev/hdc1 [/backup] done
            quotacheck: Checked 10988 directories and 112451 files
    
    
            quotacheck: Scanning /dev/sda3 [/] done
            quotacheck: Checked 15095 directories and 218166 files
            quotacheck: Scanning /dev/hdc1 [/backup] done
            quotacheck: Checked 10988 directories and 112452 files
    
    ....Done
    Here is fstab after running the script.

    Code:
    LABEL=/                 /                       ext3    defaults,usrquota        1 1
    LABEL=/boot             /boot                   ext3    defaults        1 2
    none                    /dev/pts                devpts  gid=5,mode=620  0 0
    none                    /proc                   proc    defaults        0 0
    none                    /dev/shm                tmpfs   defaults        0 0
    /dev/sda2               swap                    swap    defaults        0 0
    /dev/hdc1               /backup                 ext3    defaults        1 1
    /dev/cdrom              /mnt/cdrom              udf,iso9660 noauto,owner,kudzu,ro 0 0
    /dev/fd0                /mnt/floppy             auto    noauto,owner,kudzu 0 0
    My new drive with the users in it is /dev/hdc1.

    Help me, you're my only hope.
     
  17. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That's because you've called your second disk /backup and init scripts is removing the quotas which it does automatically I believe.
     
  18. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    So am I SOL?

    Can't we fix the script?
     
  19. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    I think I'm gonna rename that drive to something more appropriate.

    One thing I have noticed is that in WHM some of my accounts show the wrong partition. They show the old partition.

    Does that need to be updated to show the correct drive?
     
  20. jdibben

    jdibben Active Member

    Joined:
    Mar 5, 2005
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    I had my Linux guru re-mount this second drive as /home and all is well now.

    I am curious where WHM gets its 'partition' information from. I would like for it to reflect the real partition everything is on.

    How would I go about updating WHM to show the correct partition? (from list accounts)
     
Loading...

Share This Page