Skip to main content

Persistent Noquota Option Preventing Quota Activation

Answered

Comments

3 comments

  • cPRex Jurassic Moderator

    Hey there!  I suppose that could work, but these quote issues represent a problem at a deeper level than the cPanel software.  cPanel just reads the quota tools directly from the OS.  It may be best to speak with your host or datacenter to see if they've run into similar quota issues with your particular environment in the past.

    0
  • dcusimano

    I succeeded in getting quotas to work. For anyone else reading this post who has the same issue, here's the follow-up.

    Note: As indicated above, I had already edited /etc/fstab to include the defaults,usrquota,grpquota flags.

    My host datacenter told me to run the following command:

    sudo grubby --args="rootflags=uquota,gquota" --update-kernel=ALL

    Note: Before running the above grubby command to set rootflags=uquota,gquota, first check if any existing rootflags flags are set:

    sudo grubby --info=ALL | grep rootflags

    If rootflags already includes some existing flags, you would update it like in the following command to ensure that any existing flags are preserved while adding the quota flags:

    sudo grubby --args="rootflags=EXISTING_FLAGS,uquota,gquota" --update-kernel=ALL

    My server did not have any existing flags, so I used the grubby command that my host datacenter provided.

    Then after running grubby, I did the following additional steps:

    1. Reboot the Server: Graceful reboot of the server via cPanel/WHM.

    2. Create Quota Files: Create the quota files aquota.user and aquota.group:

    sudo touch /aquota.user /aquota.group
    sudo chmod 600 /aquota.user /aquota.group

    3. Run cPanel/WHM Initial Quota Setup: In cPanel/WHM, go to WHM > Server Configuration > Initial Quota Setup and follow the prompts to initialize the quota system. Reboot the server.

    4. Turn Quotas On: Enable quotas for users and groups:

    sudo quotaon -avug

    5. Verify Quota Status: Check the status of quotas using xfs_quota:

    sudo xfs_quota -x -c 'state -v' / | head

    The output of the command should be something like:

    User quota state on / (/dev/sda2)
      Accounting: ON
      Enforcement: ON
      Inode: #1153065 (7 blocks, 7 extents)
    Blocks grace time: [7 days]
    Blocks max warnings: 0
    Inodes grace time: [7 days]
    Inodes max warnings: 0
    Realtime Blocks grace time: [7 days]
    Group quota state on / (/dev/sda2)

    If quotas are enabled, then "Accounting: ON" and "Enforcement: ON" should both be on rather than off.

    If quotas were not enabled, the necessary corrective action would involve ensuring that quota options are added to /etc/fstab, the filesystem is remounted with quota options (by rebooting the server or manually remounting via mount), and the quotaon command is executed to enable quotas. Running the Initial Quota Setup in cPanel/WHM would also be necessary to initialize the quota system properly.

    6. Generate Quota Report: Generate a quota report using xfs_quota:

    sudo xfs_quota -x -c 'report -h' /

    The output of the command should be something like:
    (sample report truncated)

    User quota on / (/dev/sda2)
                            Blocks
    User ID      Used   Soft   Hard Warn/Grace
    ---------- ---------------------------------
    root        10.0G      0      0  00 [------]
    bin         90.4M      0      0  00 [------]
    named        176K      0      0  00 [------]

    7. View Disk Usage and Set Individual Quota Limits in cPanel/WHM: In cPanel/WHM, go to WHM > Account Information > List Accounts to view current disk usage for each account. To set individual quota limits, navigate to WHM > Account Functions > Quota Modification, select the desired account, and set the appropriate disk space limits.

    Thanks, David.

    0
  • cPRex Jurassic Moderator

    Thanks for sharing those details here!

    0

Please sign in to leave a comment.