Check disk usage and limits
quotacheck command obtains disk usage by scanning the specified file system, and creates, checks, and repairs disk quota (quota) files. Execute the quotacheck command to scan the partitions mounted on the system, generate quota.user and quota.group files in the file system root directory of each partition, and set disk space limits for users and groups.
If the following information appears when executing the quotacheck command:
quotacheck: Your kernel probably supports journaled quota but you are not using it. Consider switching to journaled quota to avoid running quotacheck after an unclean shutdown.
You can consider modifying the quota-related fields previously added in the file system configuration file to: usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv1
, and then remount the file system: mount -vo remount Download directory
(Note, if there are any problems in this step, do not try to solve it by restarting! Restoring the configuration file to its original state is a good choice)
quotacheck(option)(parameter)
-a: Scan the /etc/fstab file for partitions with quota settings;
-c: Perform a new scan of the target file system and create a new quota file;
-d: Display the instruction execution process in detail, which is convenient for troubleshooting or understanding the program execution situation;
-g: When scanning disk space, calculate the number of directories and files occupied by each group identification code;
-R: exclude the partition where the root directory is located;
-u: When scanning disk space, calculate the number of directories and files occupied by each user ID;
-v: Display the instruction execution process.
File system: Specify the file system to scan.
Scan all partitions in /etc/mtab
that contain quota support:
[root@linux ~]# quotacheck -avug
quotacheck: Scanning /dev/hdb1 [/disk2] done
quotacheck: Checked 3 directories and 4 files
Force scanning of mounted filesystem:
[root@linux ~]# quotacheck -avug -m
Scan the specified filesystem:
[root@linux ~]# quotacheck -cvug /disk2