2021-05-12 14:32:11
quotacheck命令不能建立aquota.user和aquota.group檔案解決方法
在學習CentOS 6.5 磁碟配額quotacheck命令這裡,已經掛載分割區到/home目錄下,執行命令然後遇到錯誤提示,最後找到了原因,解決了問題。
解釋:aquota.group與aqouta.user分別是組以及使用者磁碟配額需要的組態檔。如果沒有這兩個檔案,則磁碟配額是不會生效的。
執行命令
# quotacheck -augv123456789101112 [root@root ~]# quotacheck -augv
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.
quotacheck: Scanning /dev/sda6 [/home] done
quotacheck: Cannot stat old user quota file /home/aquota.user: No such file or directory. Usage will not be substracted.
quotacheck: Cannot stat old group quota file /home/aquota.group: No such file or directory. Usage will not be substracted.
quotacheck: Cannot stat old user quota file /home/aquota.user: No such file or directory. Usage will not be substracted.
quotacheck: Cannot stat old group quota file /home/aquota.group: No such file or directory. Usage will not 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 25 16:07 lost+found
drwx------. 2 test1 test 4096 Nov 25 17:20 test1
drwx------. 2 513 513 4096 Nov 25 17:21 test2
出現上面的錯誤,提示不能建立/home/aquota.user /home/aquota.group 這2個檔案,沒有這個檔案,沒有許可權操作。在home目錄也沒有發現這2個檔案。
原因找到了,需要關閉selinux,然後就可以執行了。關閉selinux的命令是#setenforce 0
重新執行#quotacheck -auvg 就可以了,同樣也會有錯誤提示,不用管他,之後在/home目錄就有組態檔了。
[root@root ~]# quotacheck -avug
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.
quotacheck: Scanning /dev/sda6 [/home] done
quotacheck: Cannot stat old user quota file /home/aquota.user: No such file or directory. Usage will not be substracted.
quotacheck: Cannot stat old group quota file /home/aquota.group: No such file or directory. Usage will not be substracted.
quotacheck: Cannot stat old user quota file /home/aquota.user: No such file or directory. Usage will not be substracted.
quotacheck: Cannot stat old group quota file /home/aquota.group: No such file or directory. Usage will not 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 25 17:42 aquota.group
-rw-------. 1 root root 7168 Nov 25 17:42 aquota.user
drwx------. 2 root root 16384 Nov 25 16:07 lost+found
drwx------. 2 test1 test 4096 Nov 25 17:20 test1
drwx------. 2 513 513 4096 Nov 25 17:21 test2
本文永久更新連結地址:http://www.linuxidc.com/Linux/2015-03/114978.htm
相關文章