Ce contenu n'est pas disponible dans la langue sélectionnée.
9.10.3. Configuring Disk Quotas
/etc/openshift/resource_limits.conf file. Modify these values to suit your requirements.
| Option | Description |
|---|---|
quota_files | The number of files the gear is allowed to own. |
quota_blocks | The amount of space the gear is allowed to consume in blocks (1 block = 1024 bytes). |
Important
quota_blocks parameter is 1 GB.
Procedure 9.7. To Enable Disk Quotas:
- Consult the
/etc/fstabfile to determine which device is mounted as/var/lib/openshift. In a simple setup, it is the root partition, but in a production system, it is more likely a RAID or NAS mount at/var/lib/openshift. The following steps in this procedure use the root partition as the example mount point. Adjust these to suit your system requirements. - Add a
usrquotaoption for that mount point entry in the/etc/fstabfile.Example 9.7. Example Entry in the
/etc/fstabfileUUID=4f182963-5e00-4bfc-85ed-9f14149cbc79 / ext4 defaults,usrquota 1 1
UUID=4f182963-5e00-4bfc-85ed-9f14149cbc79 / ext4 defaults,usrquota 1 1Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Reboot the node host or remount the mount point:
mount -o remount /
# mount -o remount /Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Generate user quota information for the mount point:
quotacheck -cmug /
# quotacheck -cmug /Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Fix the SELinux permissions on the
aquota.userfile located in the top directory of the mount point:restorecon /aquota.user
# restorecon /aquota.userCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Re-enable quotas on the mount point:
quotaon /
# quotaon /Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Create an application and then run the following command to verify that your disk quota is correct:
repquota -a | grep gear-uuid
# repquota -a | grep gear-uuid