Skip to content

Commit

Permalink
Update quotacheck.md
Browse files Browse the repository at this point in the history
1. 添加了使用 journaled quota 的步骤
2. 添加了扫描指定filesystem的样例
  • Loading branch information
dulltackle authored and jaywcjlove committed Apr 25, 2021
1 parent 8cecf72 commit 4a830e0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion command/quotacheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ quotacheck

**quotacheck命令** 通过扫描指定的文件系统,获取磁盘的使用情况,创建、检查和修复磁盘配额(quota)文件。执行quotacheck指令,扫描挂入系统的分区,并在各分区的文件系统根目录下产生quota.user和quota.group文件,设置用户和群组的磁盘空间限制。

如果在执行quotacheck命令时出现了以下信息:

```shell
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.
```

可以考虑将之前在文件系统的配置文件中添加的quota相关字段修改为:`usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv1`,然后重新挂载文件系统:`mount -vo remount 挂载目录`(注意,如果这一步操作出现了任何问题,千万不要试图通过重启解决!将配置文件恢复原状是一个好的选择)

### 语法

```shell
Expand All @@ -17,6 +25,7 @@ quotacheck(选项)(参数)

```shell
-a:扫描在/etc/fstab文件里,有加入quota设置的分区;
-c:对目标文件系统进行一次新的扫描,并创建新的quota文件;
-d:详细显示指令执行过程,便于排错或了解程序执行的情形;
-g:扫描磁盘空间时,计算每个群组识别码所占用的目录和文件数目;
-R:排除根目录所在的分区;
Expand Down Expand Up @@ -44,5 +53,11 @@ quotacheck: Checked 3 directories and 4 files
[root@linux ~]# quotacheck -avug -m
```

扫描指定的filesystem:

```shell
[root@linux ~]# quotacheck -cvug /disk2
```


<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->
<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->

0 comments on commit 4a830e0

Please sign in to comment.