Applicable to:
- Plesk for Linux
Symptoms
-
The Hard quota on disk space is not available for editing at Domains > example.com > Web Hosting Access page:
CONFIG_TEXT: Unlimited. Hard disk quota is not supported due to the configuration of the server file system
-
Migration of a subscription that uses hard disk quota fails:
PLESK_INFO: Failed to synchronize subscription with plan
Migration tools tried to perform operation in 3 attempts: Plesk error [1023]: quota - Description: hard disk quota is not supported due to configuration of server file system. Requested: 1073741824. Allowed: 0 -
Subscription cannot be synchronized with the corresponding service plan due to the following error:
PLESK_INFO: Syncing the subscription with its service plan failed because some of the services or resources defined in the plan cannot be actually provisioned with the subscription.
PLESK_INFO: "Information: Properties of the subscription example.com were set to correspond with the actual system state, they are still unsynced with the plan"
Available value indicates the actual state of a resource or a service in the system.
Clicking OK will initiate setting the subscription values according to the available values.OR:
PLESK_ERROR: ERR [panel] Unable to apply plan changes to domain. Error: The plan was not applied because of problems with the following functionality: hard disk quota is not supported due to configuration of server file system
Cause
Unconfigured disk quota on operating system level.
Resolution
Warning: configuring of the disk quota on the operating system is an administrative task and is not supported by Plesk.
All actions below are the common steps and performed at own risk.
Note: hard disk quota setup depends on the filesystem. In the example below, the steps are performed for ext4
and xfs
filesystems, while on another filesystem actions will differ.
For ext4
filesystem:
-
Connect to the server via SSH.
-
Make sure that the quota is supported by the kernel. It should be compiled into the kernel or loaded as a module.
To check if the quota is configured properly use this command:
# /usr/local/psa/admin/sbin/usermng --isquotable
Normally, it should return the "0" value.
If the utility returns the following error message:
CONFIG_TEXT: usermng: Unable to turn on user quota. User quota not supported on device '/dev/sda1'
System error 3: No such processOR
CONFIG_TEXT: usermng: Userquota is not enabled on device: /dev/mapper/centos-root
then enable quota in the
/etc/fstab
file for the partitions on which Plesk stores data on, e.g. as follows:CONFIG_TEXT: /dev/hda1 / ext4 defaults,usrquota 1 1
-
Remount the partition:
# mount -o remount /
-
Enable quota (use actual partition name, /dev/sda1 is an example):
# sudo tune2fs -O quota /dev/sda1
-
Create, check and repair quota files (if utility is missing, install it):
# /sbin/quotacheck -cfmvF vfsv0 /
Note: If the command is unknown, install
quota
package. -
Update the user quota with this command line:
# quotaon /dev/hda1
-
Make sure that the
aquota
format is used.There should be an
aquota.user
file in the root of every partition where the quota is enabled.If there is the
quota.user
file remove it and create correct one:Note: change the "/dev/sda1" device in commands below to the correct one.
# rm -f quota.user
# touch aquota.user
# /sbin/quotacheck -fmv /dev/sda1 -
Go to the Plesk > Tools & Settings > Server Components page and click the Refresh button to update information about quota.
Note: A separate component will not appear, but Plesk components cache will be updated to include new information and isHardQuotaEnabled will be true in psa database:
# plesk db "select * from ServiceNodeEnvironment where name='isHardQuotaEnabled'"
+---------------+---------+--------------------+-------+
| serviceNodeId | section | name | value |
+---------------+---------+--------------------+-------+
| 1 | os | isHardQuotaEnabled | true |
+---------------+---------+--------------------+-------+
For xfs
filesystem:
- Connect to the server via SSH
- Make sure the package quota is installed:
# rpm -qa | grep quota
If it is not, install it:
# yum install quota -y
- Open
/etc/default/grub
file using any text editor, find the line beginning with GRUB_CMDLINE_LINUX, and append therootflags
value, separated from others by a space:CONFIG_TEXT: GRUB_CMDLINE_LINUX="<...> <...> rootflags=usrquota,grpquota"
- Make a backup of the GRUB config file:
# cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig
- Create a new GRUB config file:
# grub2-mkconfig -o /boot/grub2/grub.cfg
- Modify
/etc/fstab
file, adding the usrquota and grpquota mount options:CONFIG_TEXT: /dev/mapper/centos/srv1-root / xfs defaults,uquota,gquota 0 0
Note: if
/var
is mounted on another partition better addusrquota
andgrpquota
there too - Reset currently saved quota state in Plesk database:
# plesk sbin packagemng -sdf
- Re-log in to Plesk or go to the Tools & Settings > Server Components page and click the Refresh button to update information about quota.
- Verify if disk quota is enabled in Plesk:
# plesk db "select * from ServiceNodeEnvironment where name='isHardQuotaEnabled'"
or:
# /usr/local/psa/admin/sbin/usermng --isquotable
- Connect to the server via SSH
- Make sure the package quota is installed:
# rpm -qa | grep quota
If it is not, install it:
# yum install quota -y
- Open
/etc/default/grub
file using any text editor, find the line beginning with GRUB_CMDLINE_LINUX, and append therootflags
value, separated from others by a space:CONFIG_TEXT: GRUB_CMDLINE_LINUX="<...> <...> rootflags=usrquota,grpquota"
- Apply kernel boot parameters:
# grubby --update-kernel=ALL --args="rootflags=uquota,pquota"
- Reboot:
# shutdown -r now
- Log back in to the server and check the quota:
# mount | grep ' / '
/dev/mapper/centos/srv1-root on / type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,sunit=8,swidth=8,usrquota,prjquota)
-
Make sure that the
quotaugidlimit
parameter is not set to zero and that it is greater than the number of users and groups in the CT. This limit can be adjusted from the Hardware Node with the following:# vzctl set CTID --quotaugidlimit 500 --save
# vzctl stop CTID
# vzctl start CTIDWhere CTID is the ID of the Virtuozzo container with Plesk.
-
Execute the
packagemng
utility to recreate the backend cache in Plesk:# /usr/local/psa/admin/sbin/packagemng --set-dirty-flag
OR
Go to the Plesk > Tools & Settings > Server Components page and click the Refresh button to update information about quota.Note: A separate component will not appear, but Plesk components cache will be updated to include new information and isHardQuotaEnabled will be true in psa database:
# plesk db "select * from ServiceNodeEnvironment where name='isHardQuotaEnabled'"
+---------------+---------+--------------------+-------+
| serviceNodeId | section | name | value |
+---------------+---------+--------------------+-------+
| 1 | os | isHardQuotaEnabled | true |
+---------------+---------+--------------------+-------+
Comments
1 comment
Not working on Ubuntu 24.04 LTS:
https://talk.plesk.com/threads/disk-quota-is-not-supported-for-ext4.374601/
Please sign in to leave a comment.