Articles in this section

Unable to setup the Hard Disk quota for a domain: field is greyed-out, hard disk quota is not supported due to configuration of server file system

Plesk for Linux kb: technical ABT: Group B

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:

  1. Connect to the server via SSH.

  2. 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 process

    OR

    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

  3. Remount the partition:

    # mount -o remount /

  4. Enable quota (use actual partition name, /dev/sda1 is an example):

    # sudo tune2fs -O quota /dev/sda1

  5. 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.

  6. Update the user quota with this command line:

    # quotaon /dev/hda1

  7. 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

  8. 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:

  1. Connect to the server via SSH
  2. Make sure the package quota is installed:

    # rpm -qa | grep quota

    If it is not, install it:

    # yum install quota -y

  3. Open /etc/default/grub file using any text editor, find the line beginning with GRUB_CMDLINE_LINUX, and append the rootflags value, separated from others by a space:

    CONFIG_TEXT: GRUB_CMDLINE_LINUX="<...> <...> rootflags=usrquota,grpquota"

  4. Make a backup of the GRUB config file:

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

  5. Create a new GRUB config file:

    # grub2-mkconfig -o /boot/grub2/grub.cfg

  6. 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 add usrquota and grpquota there too

  7. Reset currently saved quota state in Plesk database:

    # plesk sbin packagemng -sdf

  8. Re-log in to Plesk or go to the Tools & Settings > Server Components page and click the Refresh button to update information about quota.
  9. Verify if disk quota is enabled in Plesk:

    # plesk db "select * from ServiceNodeEnvironment where name='isHardQuotaEnabled'"

    or:

    # /usr/local/psa/admin/sbin/usermng --isquotable

For Almalinux 9 on xfs
  1. Connect to the server via SSH
  2. Make sure the package quota is installed:

    # rpm -qa | grep quota

    If it is not, install it:

    # yum install quota -y

  3. Open /etc/default/grub file using any text editor, find the line beginning with GRUB_CMDLINE_LINUX, and append the rootflags value, separated from others by a space:

    CONFIG_TEXT: GRUB_CMDLINE_LINUX="<...> <...> rootflags=usrquota,grpquota"

  4. Apply kernel boot parameters:

    # grubby --update-kernel=ALL --args="rootflags=uquota,pquota"

  5. Reboot:

    # shutdown -r now

  6. 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)

For Debian 12 on ext4
  1. Connect to the server via SSH
  2. Make sure the package quota is installed:

    # dpkg -l | grep quota

    If it is not, install it:

    # apt install quota -y

  3. Open /etc/fstab file using any text editor and add quota parameter to partition where hosting content resides (by default, it is root as below)

    Before

    CONFIG_TEXT: PARTUUID=8e60be7f-268a-4acd-b92f-610b28c96262 / ext4 rw,discard,errors=remount-ro,x-systemd.growfs 0 1

    After

    CONFIG_TEXT: PARTUUID=8e60be7f-268a-4acd-b92f-610b28c96262 / ext4 rw,discard,errors=remount-ro,x-systemd.growfs,usrquota 0 1

  4. Apply system configuration changes:

    # systemctl daemon-reload

  5. Remount the specified partition:

    # mount -o remount /

  6. Create quota files:

    # /sbin/quotacheck -cfmvF vfsv0 /

  7. Update quota:

    # quotaon /

  8. Confirm that quota is enabled ("0" should be returned):

    # /usr/local/psa/admin/sbin/usermng --isquotable

  9. Update Plesk server information:

    # plesk sbin packagemng -sdf

For a Virtuozzo Container
  1. 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 CTID

    Where CTID is the ID of the Virtuozzo container with Plesk.

  2. 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 |
    +---------------+---------+--------------------+-------+

Was this article helpful?

Comments

1 comment
Date Votes

Please sign in to leave a comment.