Today, while looking at the disk quota Quotacheck command for CentOS 6.5, the partition has been mounted to the/home directory, executing the command and then encountering the error prompt, finally finding the cause and resolving the problem.
Explanation: Aquota.group and Aqouta.user are both groups and the configuration files required for user disk quotas. If you do not have these two files, disk quotas will not take effect.
Execute command
# quotacheck-augv123456789101112 [Root@root ~]# QUOTACHECK-AUGV
Quotacheck:your kernel probably supports journaled quota but you to are not using it. Consider switching to journaled quota to avoid running and Quotacheck after a unclean.
Quotacheck:scanning/dev/sda6 [/home] Done
Quotacheck:cannot stat old user quota file/home/aquota.user:no such file or directory. Usage won't be substracted.
Quotacheck:cannot stat Old group quota file/home/aquota.group:no such file or directory. Usage won't be substracted.
Quotacheck:cannot stat old user quota file/home/aquota.user:no such file or directory. Usage won't be substracted.
Quotacheck:cannot stat Old group quota file/home/aquota.group:no such file or directory. Usage won't be substracted.
Quotacheck:checked 4 directories and 6 files
Quotacheck:cannot Create new Quotafile/home/aquota.user.new:permission denied
Quotacheck:cannot Initialize IO on new quotafile:permission denied
Quotacheck:cannot Create new Quotafile/home/aquota.group.new:permission denied
Quotacheck:cannot Initialize IO on new quotafile:permission denied
[Root@root ~]# ll/home/
Total 24
DRWX------. 2 root root 16384 Nov 16:07 lost+found
DRWX------. 2 test1 test 4096 Nov 17:20 test1
DRWX------. 2 513 513 4096 Nov 17:21 test2
The above error prompts you not to create/home/aquota.user/home/aquota.group these 2 files, without this file, without permission to operate. The 2 files were not found in the home directory either.
The reason is found, you need to close the SELinux, and then you can execute. The command to close SELinux is #setenforce 0.
Re-execute #quotacheck-auvg on it, there will also be error prompts, do not care about him, after the/home directory has a configuration file.
[Root@root ~]# Quotacheck-avug
Quotacheck:your kernel probably supports journaled quota but you to are not using it. Consider switching to journaled quota to avoid running and Quotacheck after a unclean.
Quotacheck:scanning/dev/sda6 [/home] Done
Quotacheck:cannot stat old user quota file/home/aquota.user:no such file or directory. Usage won't be substracted.
Quotacheck:cannot stat Old group quota file/home/aquota.group:no such file or directory. Usage won't be substracted.
Quotacheck:cannot stat old user quota file/home/aquota.user:no such file or directory. Usage won't be substracted.
Quotacheck:cannot stat Old group quota file/home/aquota.group:no such file or directory. Usage won't be substracted.
Quotacheck:checked 4 directories and 6 files
Quotacheck:old file not found.
Quotacheck:old file not found.
[Root@root ~]# ll/home/
Total 40
-RW-------. 1 root root 8192 Nov 17:42 aquota.group
-RW-------. 1 root root 7168 Nov 17:42 aquota.user
DRWX------. 2 root root 16384 Nov 16:07 lost+found
DRWX------. 2 test1 test 4096 Nov 17:20 test1
DRWX------. 2 513 513 4096 Nov 17:21 test2