Author Topic: How to setup user quotas ?  (Read 191118 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Re: How to setup user quotas ?
« Reply #45 on: July 10, 2018, 02:01:19 PM »
For those having the problem setting up the quota on XFS file system, hope the below tips would help you. I finally got this work for my server.

1. Follow the steps on this link.
https://help.directadmin.com/item.php?id=557

(Ignore the step 7,8).

2. Enter the command line "/usr/sbin/repquota /" to make sure the quota is working.

3. Follow the XFS instructions on this post page 1.

Reference sites:
- https://help.directadmin.com/item.php?id=557
- https://help.directadmin.com/item.php?id=42
- https://www.server-world.info/en/note?os=CentOS_7&p=quota
« Last Edit: July 10, 2018, 02:03:19 PM by infinitech07 »

Offline
*
Re: How to setup user quotas ?
« Reply #46 on: August 17, 2018, 11:37:12 AM »
It still doesn't work for KVM with XFS file system.
Its being 2 days i'm struggling to find a solution for this.
Would definitely be very helpful if someone could provide clear instructions for users with no /home partition.


Offline
*
Re: How to setup user quotas ?
« Reply #47 on: September 22, 2018, 04:31:53 PM »
How to make Disk Quota Setup for Google Cloud Virtual Instance - Centos 7? I couldn't make it work

Offline
*
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.


Offline
*
Re: How to setup user quotas ?
« Reply #50 on: March 09, 2019, 12:56:29 PM »
I have managed to fix the quota in CentOS 7 +CWP - xfs formatted.

Code: [Select]
mount | grep ' / '
If the result is: /dev/vda1 on / type xfs (rw,relatime,attr2,inode64,noquota)

Then

Code: [Select]
nano /etc/default/grub

Add to the end of line of GRUB_CMDLINE_LINUX=
Code: [Select]
rootflags=uquota,gquota
Before
Code: [Select]
GRUB_CMDLINE_LINUX="console=tty0 crashkernel=auto console=ttyS0,115200"
After
Code: [Select]
GRUB_CMDLINE_LINUX="console=tty0 crashkernel=auto console=ttyS0,115200 rootflags=uquota,gquota"

Rebuild the grub config:
Code: [Select]
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig
grub2-mkconfig -o /boot/grub2/grub.cfg

Then update the fstab

Code: [Select]
nano /etc/fstab
Change from
Code: [Select]
UUID=5f18...a0a / xfs defaults        0 0To
Code: [Select]
UUID=5f18...a0a / xfs defaults,usrquota,grpquota        0 0
Reboot

Now login to the cwp and update each package and check while saving (Update quota for all users using this package, also disables inode limits !)

Offline
*
Enable quotas to OPENVZ
« Reply #51 on: May 04, 2020, 10:17:32 AM »
If your hosting company uses openvz platform and you use a container the only thing you have to do is the following
1. Ask them to enable second level quotas for your container
2. After it is enabled then go to Users --> User quota. You will ensure that quota is working
3. Finally go to Packages --> Packages and after you select each one of them click "update" having the "update quota" enabled.

You are ready to go and list your accounts and ensure that "Disk usage" is working normally.
You need a reliable hosting company for your website or your eshop?
Need a cheap, reliable, fast and secure hosting?
You want fast support and action to every technical issue?
Freespirits is here for you :) - Don't look any further!

Offline
*
Re: How to setup user quotas ?
« Reply #52 on: July 15, 2020, 06:55:32 PM »

Offline
*
Re: How to setup user quotas ?
« Reply #53 on: July 28, 2020, 01:48:21 PM »
Hello team,

I tried the above-mentioned steps, but the quota is still not working.
Can anyone help me with this.?

I am using the following configuration

CPU Model: Intel(R) Xeon(R) CPU X5650 @ 2.67GHz
CPU Details: 16 Core (2667 MHz)
Distro Name: CentOS Linux release 7.8.2003 (Core)
Kernel Version: 3.10.0-1127.13.1.el7.x86_64
Platform: x86_64 kvm

The file type is .xfs

I am getting issues in both admin and client panels.

In admin panel when I check inside "List accounts" section, it shows 0kb/100kb

In client section, it shows some random size.

In the file explorer, when logged in from the client portal, it shows 0kb / 0kb

Can someone suggest some solution for this?

Regards,
Vikash Mishra,
https://cloudpoko.com/
jtttps://vikashtech.com/
Regards,
Team,
M/s VIKASH TECH
https://vikashtech.com/

Offline
*
Re: How to setup user quotas ?
« Reply #54 on: August 13, 2020, 02:26:43 PM »
new version will have quota setup script to do this automatically for you.

Hi its 2020 sorry to dig up an old post, but is there an auto script for this QUOTA Setup yet?

Regards

Offline
*
Re: How to setup user quotas ?
« Reply #55 on: September 18, 2020, 05:28:06 PM »
how do you make it a hard quota, and stop when it reaches, also, how do you get the email from the root / to /home where the space actually is

Offline
*
Re: How to setup user quotas ?
« Reply #56 on: May 13, 2021, 07:09:41 PM »
Hi everyone.

I'm starting now, and read a few about the problem.

On my a2 Hosting VPS the /etc/fstab is empty

The mount command have the output the following:

Code: [Select]
[root@srv001 etc]# mount
/dev/ploop11654p1 on / type ext4 (rw,relatime,stripe=384,data=ordered,balloon_ino=12)
none on /sys type sysfs (rw,relatime)
none on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio,net_cls)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
proc on /proc type proc (rw,relatime)
none on /dev type devtmpfs (rw,nosuid,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=23,pipe_ino=881813032,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=881813032)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=419432k,mode=700)

Offline
*
Re: How to setup user quotas ?
« Reply #57 on: August 01, 2021, 09:12:30 AM »
Could you please someone guide me on setting up quota for user accounts properly?

I am using A KVM vps (/dev/vda1  is mounted on  /    and home folder is inside /   )

mount
(output)
/dev/vda1 on / type ext4 (rw,relatime,quota,usrquota,grpquota,data=ordered)
------------------------------------------------
 /etc/fstab  file has followings
#
# /etc/fstab
# Created by anaconda on Tue May 18 17:44:59 2021
#
# 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/vda1 / ext4 rw,relatime,quota,usrquota,grpquota,data=ordered 0 0
tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0

/swapfile   none    swap    sw    0   0
proc /proc proc defaults,hidepid=2,gid=nohidproc 0 0


--------------------------------------------
repquota -a output

                        Block limits                         File limits
User            used    soft           hard       grace    used  soft  hard  grace
testuser --  717684 1048576 1048576              26444   0     0

---------------------------------------------

When I go to disk quota setup menu in CWP it says Quota Configuration file /usr/local/cwp/.conf/quota_part.conf Already Exist!

/usr/local/cwp/.conf/quota_part.conf   file has  /


 (My issues is that disk space usage doesn't reflect on users control panel)  it stays at  Usage  0%   0/1024MB
(in CWP admin panel I can see disk space usage properly 700MB/1024MB)  The issue appears to be only in CWP users' panel





Offline
**
Re: How to setup user quotas ?
« Reply #58 on: March 16, 2022, 12:43:55 PM »
Hi

See the 2 images. In list packages (Reseller login), usage is almost correct. In user login there is a different usage story.

Any help?




Offline
**
Re: How to setup user quotas ?
« Reply #59 on: June 13, 2022, 12:13:00 PM »
Note: If you want emails and user home to be under the same quota then /var/vmail and /home need to be on the same partition.

I have my /var/vmail and /home on same partition.

This is not working

Any suggestions?