Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
stylenone

Overview

Include Page
LIB:_Cent7XFSQuotaWarning
LIB:_Cent7XFSQuotaWarning

This document describes how to confirm whether you properly configured the disk space quotas on your system's devices.

  • You must enable quotas for any device on which cPanel accounts exist.

The solution

  • cPanel & WHM versions 76 and later enable quotas by default on new installations.

Fix quotas

To verify whether your devices use quotas, perform the following actions:

Warning
titleImportant:

You must log in as the root user via SSH on your system before you perform these actions.

Run the mount command

Run the mount command to obtain basic information about currently-mounted file systems.

When you run this command without any arguments, the system displays information for all of its mounted file systems.

Note
titleNote:

Entries that contain the usrquota variable are quota-enabled.

The following example confirms that the /dev/mapper/VolGroup00-LogVol00 device uses quotas:

Code Block
languagebash
linenumberstrue
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw,usrquota)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/usr/tmpDSK on /tmp type ext3 (rw,noexec,nosuid,loop=/dev/loop0)
/tmp on /var/tmp type none (rw,noexec,nosuid,bind)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)


Note
titleNote:

For more information about the mount command, visit the mount command documentation.

Examine the fstab file contents

The file system table (fstab) file maps devices to their respective mount points within a system.

The contents of the fstab file will resemble the following example:

Tip
titleRemember:

Entries that contain the usrquota variable are quota-enabled.


Code Block
languagetext
linenumberstrue
/dev/sda5 				/backup 				ext3 	defaults,noexec 0 0
LABEL=/boot             /boot                   ext3    defaults,usrquota  1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/sda5 				/swap                   swap    defaults        0 0
/usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0

The fstab system configuration file displays configuration options in six columns. These options determine the purpose of each file system and how it should mount.

ColumnDescriptionExample
DeviceThe physical device that contains the data./dev/sda5
MountpointThe filepath to the device's data storage location./backup
FStypeThe type of file system.ext3
OptionsThe mount options for the file system. These options include whether quotas are enabled and whether the system or users can execute programs on the device.defaults,noexec
Dump

The dump option. The dump backup utility uses this option.

0
Pass

The fsck option. The fsck file checking utility uses this option.

0


Note
titleNotes:

How to enable quotas

After you verify which devices do not use quotas, perform the following steps to enable quotas for the desired devices.

Specify quotas in the fstab file

To enable quotas on a device, open the /etc/fstab file with a text editor and add the usrquota string to the Options column. Use spaces and tabs to create blank spaces between entries, for example:

Code Block
languagetext
LABEL=/boot             /boot                   ext3    defaults,usrquota  1 2


After you edit the fstab file, run the mount and remount commands to remount the file system.

For example, to remount the /dev/mapper/VolGroup00-LogVol00 device, run the following command:

Code Block
languagebash
mount -o remount /boot


Note
titleNote:

The -o argument passes an option to the mount utility.

Verify that you enabled quota files

After you edit the /etc/fstab file, confirm that the quota files exist in the root directory (/) and that each file is greater than 0 bytes.

Use the ls command with a wildcard character. For example:

Code Block
languagebash
linenumberstrue
root@host [/]# ls -l /*.user
-rwxr--r-- 1 root root 13312 Apr 26 16:39 /aquota.user*
-rwxr--r-- 1 root root    32 Apr 19 16:26 /quota.user* 

Note
titleNote:

The example above uses the ls command to list the contents of the root directory (/). The -l flag causes ls output to display in long listing format. This format displays the following information:

  • The file's permissions.
  • Which user owns the file.
  • Which group owns the file.
  • The size of the file in bytes.
  • The file's last modification date.

If these files do not exist, run the /scripts/initquotas script to create the files.

If these files do exist but quotas do not function, delete these files and then run the /scripts/initquotas or /scripts/fixquotas scripts.

Ensure quotas report on the system

Run the following command to confirm that you successfully enabled quotas on the device:

Code Block
languagebash
repquota -a

This command prints all of the file systems that exist in the /etc/mtab filem with read and write privileges and quota options enabled.

What if my quotas still do not function?

If you experience further problems, perform one of the following actions:

  • Disable the Cache disk quota information option in the System section of WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).
  • Set the disablequotacache parameter to 0 in the /var/cpanel/cpanel.config file.

If you still experience problems with quotas, open a support ticket.

A note about Virtuozzo®

If you use Virtuozzo, you must perform the following actions:

  1. Enable second-level (per-user) quotas in addition to first-level (per-container) quotas.
  2. Enable second-level quotas from the parent node.

For more information, visit our Enable Quotas on a Virtuozzo VPS documentation.

Additional documentation

Localtab Group


Localtab
activetrue
titleSuggested documentation

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "quotas" and label = "whm" and space = currentSpace()


Localtab
titleFor cPanel users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "quotas" and label = "cpanel" and space = currentSpace()


Localtab
titleFor WHM users

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "quotas" and label = "whm" and space = currentSpace()


Localtab
titleFor developers

Content by Label
showLabelsfalse
max5
showSpacefalse
cqllabel = "quotas" and space = "DD"