当前位置: 首页>>技术教程>>正文


fstab中的最后两个字段是什么意思?

,

问题描述

fstab(dump,pass)中每行的最后两个字段是一些数字,通常是0.这些数字是什么意思?

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
UUID=030ccf66-5195-4835-ba3e-f5d7a5403c05 /               ext4    errors=remount-ro 0       1

最佳解决方案

man fstab复制/粘贴:

The fifth field, (fs_freq), is used for these filesystems by the dump(8) command to determine which filesystems need to be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.

The sixth field, (fs_passno), is used by the fsck(8) program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems on different drives will be checked at the same time to utilize parallelism available in the hardware. If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the filesystem does not need to be checked.

次佳解决方案

简单的木头答案是,第一个字段确定是否应该转储,第二个字段确定在启动期间是否应该检查以及以何种顺序进行检查。检查其余的手册!

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/927.html,未经允许,请勿转载。