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

0 Members and 1 Guest are viewing this topic.

Offline
***
Re: How to setup user quotas ?
« Reply #60 on: July 18, 2022, 02:45:36 AM »
new version will have quota setup script to do this automatically for you.
https://forum.centos-webpanel.com/index.php?topic=12175.msg41970;topicseen#msg41970

any idea how to solved it ?

Offline
*
Re: How to setup user quotas ?
« Reply #61 on: November 10, 2022, 10:02:29 PM »
How to make Disk Quota Setup for AWS Amazon on Centos 7.9?, please help me

Offline
*
Re: How to setup user quotas ?
« Reply #62 on: March 19, 2023, 07:51:13 PM »
[root@srv ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs         16G     0   16G   0% /dev
tmpfs            16G     0   16G   0% /dev/shm
tmpfs            16G   17M   16G   1% /run
tmpfs            16G     0   16G   0% /sys/fs/cgroup
/dev/md1        893G  3.5G  890G   1% /
tmpfs           3.2G     0  3.2G   0% /run/user/0
[root@srv ~]# cat /etc/fstab
/dev/md1 / xfs rw,relatime,attr2,inode64,sunit=1024,swidth=2048,noquota 0 0
/dev/md1 / xfs rw,relatime,attr2,inode64,sunit=1024,swidth=2048,noquota 0 0
/dev/md1 / xfs rw,relatime,attr2,inode64,sunit=1024,swidth=2048,noquota 0 0


What should I do?

Offline
**
Re: How to setup user quotas ?
« Reply #63 on: September 21, 2024, 11:25:09 AM »
User panel shows account using 38GB (With -855MB in file system) while admin panel shows 18GB usage



Offline
***
Re: How to setup user quotas ?
« Reply #64 on: September 29, 2024, 11:05:54 AM »
Did you check real disk usage using "du", repquota, etc ? Are there some files located outside of the account and owned by your user ?

Offline
**
Re: How to setup user quotas ?
« Reply #65 on: January 11, 2025, 06:17:08 AM »
my /etc/fstab/ contains

Code: [Select]
#
# /etc/fstab
# Created by anaconda on Mon Aug 19 17:42:13 2024
#
# 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.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/sda4 / xfs rw,seclabel,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 0
UUID=37e38df4-28dc-4d9c-acb5-1a2fd7e6130b /boot                   xfs     defaults        0 0
UUID=3F31-DBA5          /boot/efi               vfat    defaults,uid=0,gid=0,umask=077,shortname=winnt 0 2
/swap swap swap sw 0 0

quota not working. What should be done?


Offline
*****
Re: How to setup user quotas ?
« Reply #66 on: January 11, 2025, 06:01:51 PM »
curious about:
Code: [Select]
du -sh /var/vmail/*

Offline
**
Re: How to setup user quotas ?
« Reply #67 on: August 09, 2025, 11:02:39 AM »
XFS: In some cases, you would also need to modify grub conf if the above fails

Code: [Select]
# mount | grep ' / '
/dev/mapper/cl-root on / type xfs (rw,relatime,attr2,inode64,noquota)


 If you see "noquota" in the xfs mount options for the / partition then you would need to modify file: /etc/default/grub
Find the line with the variable "GRUB_CMDLINE_LINUX" and at end of the line add: "rootflags=uquota,pquota"

Example:
Code: [Select]
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet rootflags=uquota,pquota"
Make backup and create grub config for boot
Code: [Select]
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig
grub2-mkconfig -o /boot/grub2/grub.cfg
echo xfs > /usr/local/cwp/.conf/quota_type.conf

now reboot the server
Code: [Select]
reboot
after reboot run API to set quota for all users
Code: [Select]
/scripts/cwp_api account update_diskquota_all

cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig

I am getting the error

Quote
cp: cannot stat '/boot/grub2/grub.cfg': No such file or directory

Offline
*****
Re: How to setup user quotas ?
« Reply #68 on: August 09, 2025, 11:52:23 AM »
UEFI?
Code: [Select]
sudo grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg

Offline
**
Re: How to setup user quotas ?
« Reply #69 on: August 11, 2025, 07:35:52 AM »
Got this error

Quote
# sudo grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg
/usr/bin/grub2-editenv: error: cannot open `/boot/grub2/grubenv.new': No such file or directory.
/sbin/grub2-mkconfig: line 274: /boot/efi/EFI/almalinux/grub.cfg.new: No such file or directory

The boot folder has only 'EFI' subfolder and nothing else
« Last Edit: August 11, 2025, 08:32:50 AM by anandmys »

Offline
*****
Re: How to setup user quotas ?
« Reply #70 on: August 12, 2025, 06:17:47 PM »
Are you indeed running on UEFI and not a standard, old BIOS? You may need to "prime the pump":
Code: [Select]
mkdir -p /boot/efi/EFI/almalinux/

Offline
**
Re: How to setup user quotas ?
« Reply #71 on: Today at 05:14:11 AM »
Ran this.

and tried

# sudo grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg
/usr/bin/grub2-editenv: error: cannot open `/boot/grub2/grubenv.new': No such file or directory.
Generating grub configuration file ...
done

Offline
*****
Re: How to setup user quotas ?
« Reply #72 on: Today at 01:34:26 PM »
You seem to have a unique error to your system. Check / etc / fstab and try again:
https://www.reddit.com/r/Fedora/comments/142abt9/my_bootloader_is_very_broken/