How to setup user quotas ?

Started by Administrator, September 09, 2014, 09:59:48 PM

Previous topic - Next topic

worldbus

I using centos web panel on dedicated server.
quota enabled on server, but control panel user data is not synced.

for example "repquota -a -s"
[root@static ~]# repquota -a -s
*** Report for user quotas on device /dev/md3
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --  86967M       0       0          75704     0     0
daemon    --       8       0       0              3     0     0
lp        --       8       0       0              2     0     0
nobody    --   51492       0       0           4237     0     0
rpc       --      12       0       0              4     0     0
abrt      --      24       0       0              4     0     0
rpcuser   --      16       0       0              5     0     0
haldaemon --       8       0       0              2     0     0
ntp       --       8       0       0              2     0     0
postfix   --      76       0       0             49     0     0
mysql     --   22000       0       0            155     0     0
dovecot   --       4       0       0              3     0     0
named     --      64       0       0              9     0     0
apache    --       8       0       0              2     0     0
vmail     --      16       0       0              8     0     0
vacation  --       4       0       0              2     0     0
nginx     --     196       0       0              2     0     0
masiup1   --   45280    500G    500G           3571     0     0
short     --    134M    500G    500G          16294     0     0
#507      --   19592       0       0             26     0     0
#1000     --   11860       0       0            887     0     0
#119      --    8420       0       0            345     0     0


CWP data after login for "masiup1":
System Stats

Disk Space: 44MB / 512000MB ( 0%)
Inode Usage: 3571 / 0 ( 0% ) Info


Whats wrong and how can resolve this issue?

alband

Quote from: worldbus on February 13, 2016, 12:47:46 PM
I using centos web panel on dedicated server.
quota enabled on server, but control panel user data is not synced.

for example "repquota -a -s"
[root@static ~]# repquota -a -s
*** Report for user quotas on device /dev/md3
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --  86967M       0       0          75704     0     0
daemon    --       8       0       0              3     0     0
lp        --       8       0       0              2     0     0
nobody    --   51492       0       0           4237     0     0
rpc       --      12       0       0              4     0     0
abrt      --      24       0       0              4     0     0
rpcuser   --      16       0       0              5     0     0
haldaemon --       8       0       0              2     0     0
ntp       --       8       0       0              2     0     0
postfix   --      76       0       0             49     0     0
mysql     --   22000       0       0            155     0     0
dovecot   --       4       0       0              3     0     0
named     --      64       0       0              9     0     0
apache    --       8       0       0              2     0     0
vmail     --      16       0       0              8     0     0
vacation  --       4       0       0              2     0     0
nginx     --     196       0       0              2     0     0
masiup1   --   45280    500G    500G           3571     0     0
short     --    134M    500G    500G          16294     0     0
#507      --   19592       0       0             26     0     0
#1000     --   11860       0       0            887     0     0
#119      --    8420       0       0            345     0     0


CWP data after login for "masiup1":
System Stats

Disk Space: 44MB / 512000MB ( 0%)
Inode Usage: 3571 / 0 ( 0% ) Info


Whats wrong and how can resolve this issue?


You can change the user quota creating a package, then edit the user and assign package.

tshetumd

#32
Quotas for most of the users are not showing,  I have many users  tough. Please find the out of repquota -a -s and advise me .

*** Report for user quotas on device /dev/mapper/vg_yonphula-LogVol01_Root
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --   1805M       0       0          47239     0     0       
daemon    --       8       0       0              3     0     0       
nobody    --   51472       0       0           4232     0     0       
postfix   --      76       0       0             49     0     0       
tdhendup  --   88084       0       0           6628     0     0       
tshetum   --    134M       0       0          16299     0     0       
slhamo    --    137M       0       0          16488     0     0       
mysql     --   22004       0       0            155     0     0       
dovecot   --       4       0       0              3     0     0       
named     --      36       0       0              9     0     0       
vmail     --      16       0       0              8     0     0       
vacation  --       4       0       0              2     0     0       
rapagovb  --      32       0       0              9     0     0       
yellowbh  --   19592   1024M   1024M             26     0     0       
#1000     --   25596       0       0           1869     0     0       
#119      --    8420       0       0            345     0     0       

PS: we are using KVM
Thanks

pixelpadre

I clicked on setup quotas and received this message:
Quota Configuration file /usr/local/cwp/.conf/quota_part.conf Already Exist!

pixelpadre

Quote from: pixelpadre on June 13, 2016, 03:39:03 PM
I clicked on setup quotas and received this message:
Quota Configuration file /usr/local/cwp/.conf/quota_part.conf Already Exist!

fstab


#
# /etc/fstab
# Created by anaconda on Sun Mar  9 13:40:48 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/sda       /               ext4    noatime,errors=remount-ro,usrjquota=quota.user,jqfmt=vfsv0       0 1
/dev/sdb       none            swap    sw                              0 0
tmpfs                   /dev/shm                tmpfs   nodev,nosuid,noexec,mode=1777        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
/proc                    /proc                   proc    defaults        0 0

pixelpadre

I am using Linode vps.  there is no /dev/root so how can I fix this?

pixelpadre

#36
First you have to make a link to the missing root directory

In my case my main directory is /dev/sda  ...so shell command is ln -s /dev/sda /dev/root
Then I had to modify /etc/fstab file to show the user group addition string 
/dev/sda       /               ext4    noatime,errors=remount-ro,usrjquota=quota.user,jqfmt=vfsv0
Then I had to remount the hard drive
mount -o remount /dev/sda
then I had to login to cwp panel and click on users list.  Select your user to edit and immediately save with no changes.  That will implement quota for that user.

That should do it.  Its possible that the link will have to be recreated every time you reboot the server.  There is a work around here  https://forum.linode.com/viewtopic.php?t=8294#p64363 "xvda" would be changed to your hard drive location.

erk1n

#37
Hi CWP folks! It's a very good panel, only minor bugs and lack of reseller panel. Million thanks to the developers. I will upgrade it to Pro version and donate regularly as my project grows. I'm not a coder. At least, I would like to reports bugs to the developer team for contribution.

I just installed quota.
Then edited /etc/fstab file as below


/dev/mapper/cos-root /                   xfs   usrjquota=quota.user,jqfmt=vfsv0,noatime        0 0
UUID=05216e1d-8bc7-487c-8bbb-cecadd24010c /boot                   ext2   defaults,noatime        1 0


Then typed mount -o remount /
After typed quotacheck -avugm
Got this error message quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.
Typed quotaon -avug
No response!

Checked if quota works by typing
Quoterepquota -a
No response!!

Tried many times but no, it doesn't work!

Maybe it's because of xfs file system? Any solution?

Thanks a lot.

System: VPS (KVM), Distro: CentOS 7.3

erk1n


erk1n


nuffsaid

Quote from: Administrator on February 04, 2015, 02:20:12 AM
new version will have quota setup script to do this automatically for you.

The script is not working in mine, it just loads and refreshes the page ,nothing happens

shakensoul

Disk Quota is not working. It only shows disk quota for root

Output of repquota -a


*** Report for user quotas on device /dev/vda1
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
User            used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
root      --  101018       0       0            340     0     0       


All user accounts show this message


Disk quotas for user xxxx (uid 1006): none


What could be the problem?

kikloo

Hi,

I changed the /home line as suggested in the first post and then rebooted the server, now my server is offline and not coming back up,

I changed :

/dev/mapper/centos-home /home                   xfs     defaults        0 0

to

/dev/mapper/centos-home /home                   xfs     usrjquota=quota.user,jqfmt=vfsv0        0 0

And saved the file and did a reboot and now server is down.

What I have done wrong ?? Why CWP is not taking care of this automatically ???

Thanks.

swarupggolui

Hello Sir
Sir I have quota Problem On My CWP Panel,
Show This Msg On CWP Panel
(setquota: Mountpoint (or device) / not found or has no quota enabled. setquota: Not all specified mountpoints are using quota. setquota: Mountpoint (or device) / not found or has no quota enabled. setquota: Not all specified mountpoints are using quota.)

I Am Using AWS And This IS My fstab File
---------------------------------------------------------------------------------------------

#
# /etc/fstab
# Created by anaconda on Mon May  1 18:59:01 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=29342a0b-e20f-4676-9ecf-dfdf02ef6683 /                       xfs     defaults        0 0
/swapfile   none    swap    defaults  0   0
-------------------------------------------------------------------------------------------------------------------
Can You Help Me Please?
Thanks..
Modify message

kikloo

Quotas don't work properly in CWP. Wait for next version.