검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

5.9.7.2. Enabling Disk Quotas

download PDF

Note

The following sections provide a brief overview of the steps necessary to enable disk quotas under Red Hat Enterprise Linux. For a more in-depth treatment of this subject, see the chapter on disk quotas in the System Administrators Guide.
To use disk quotas, you must first enable them. This process involves several steps:
  1. Modifying /etc/fstab
  2. Remounting the file system(s)
  3. Running quotacheck
  4. Assigning quotas
The /etc/fstab file controls the mounting of file systems under Red Hat Enterprise Linux. Because disk quotas are implemented on a per-file-system basis, there are two options -- usrquota and grpquota -- that must be added to that file to enable disk quotas.
The usrquota option enables user-based disk quotas, while the grpquota option enables group-based quotas. One or both of these options may be enabled by placing them in the options field for the desired file system.
The affected file system(s) then must be unmounted and remounted for the disk quota-related options to take affect.
Next, the quotacheck command is used to create the disk quota files and to collect the current usage information from already existing files. The disk quota files (named aquota.user and aquota.group for user- and group-based quotas) contain the necessary quota-related information and reside in the file system's root directory.
To assign disk quotas, the edquota command is used.
This utility program uses a text editor to display the quota information for the user or group specified as part of the edquota command. Here is an example:
 Disk quotas for user matt (uid 500): Filesystem blocks soft hard inodes soft hard /dev/md3 6618000 0 0 17397 0 0 
This shows that user matt is currently using over 6GB of disk space, and over 17,000 inodes. No quota (soft or hard) has yet been set for either disk blocks or inodes, meaning that there is no limit to the disk space and inodes that this user can currently use..
Using the text editor displaying the disk quota information, the system administrator can then modify the soft and hard limits as desired:
 Disk quotas for user matt (uid 500): Filesystem blocks soft hard inodes soft hard /dev/md3 6618000 6900000 7000000 17397 0 0 
In this example, user matt has been given a soft limit of 6.9GB and a hard limit of 7GB. No soft or hard limit on inodes has been set for this user.

Note

The edquota program can also be used to set the per-file-system grace period by using the -t option.
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.