免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4115 | 回复: 8
打印 上一主题 下一主题

我认识的/etc/fstab中的字段 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-03-10 21:37 |只看该作者 |倒序浏览
从左到右有6个字段。
1、Label:要安装的文件系统(如/usr)或分区(如/dev/hda1);
2、Mount Point:要装载的分区或文件系统所在的目录;
3、Format:文件系统的格式类型,如:ext2、ext3、vfat等;
4、Mount Option:默认选项包括rw(读写)、ro(只读)、suid(SUID权限)、dev(终端与磁盘之类的块设备)、exec(二进制文件)、auto(自动选择类型)、nouser(只有根用户可以装载)、async(数据异步读写模式);
5、Dump Value:1表示文件自动写入磁盘;
6、Filesystem Check Option:需要fsck的文件系统,根文件系统为1,本地电脑上的其他文件系统为2,交换、虚拟、光盘、软盘和远程目录为0。

完了,呵呵,错误的地方或者不足的地方请大家指教!

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
2 [报告]
发表于 2005-03-10 22:01 |只看该作者

我认识的/etc/fstab中的字段

  1. man fstab
复制代码


& & & The first field, (fs_spec), &describes &the &block &special &device &or
& & & remote filesystem to be mounted.
& & &
& & & The second field, (fs_file), describes the mount point for the filesys-
& & & tem. &For swap partitions, this field should be specified as `none'. If
& & & the &name &of &the &mount point contains spaces these can be escaped as
& & & `\040'.

& & & The third field, (fs_vfstype), describes the type &of &the &filesystem.
& & & Linux &supports &lots &of filesystem types, such as adfs, affs, autofs,
& & & coda, coherent, cramfs, devpts, efs, ext2, ext3, &hfs, &hpfs, &iso9660,
& & & jfs, &minix, &msdos, &ncpfs, &nfs, &ntfs, &proc, qnx4, reiserfs, romfs,
& & & smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat, xenix, &xfs, &and &possibly
& & & others. &For more details, see mount(8). &For the filesystems currently
& & & supported by the running kernel, see /proc/filesystems. &An entry &swap
& & & denotes a file or partition to be used for swapping, cf. swapon(8). &An
& & & entry ignore causes the line to be ignored. &This &is &useful &to &show
& & & disk partitions which are currently unused.

& & & The &fourth &field, (fs_mntops), describes the mount options associated
& & & with the filesystem.

& & & It is formatted as a comma separated list of options. &It &contains &at
& & & least &the type of mount plus any additional options appropriate to the
& & & filesystem type. &For documentation on the available options &for &non-
& & & nfs &file systems, see mount(8). &For documentation on all nfs-specific
& & & options have a look at nfs(5). &Common for all types of file system are
& & & the options ``noauto'' (do not mount when "mount -a" is given, e.g., at
& & & boot time), ``user'' (allow a user &to &mount), &and &``owner'' &(allow
& & & device &owner to mount), and ``_netdev'' (device requires network to be
& & & available). &The ``owner'' and ``_netdev'' options are &Linux-specific.
& & & For more details, see mount(8).

& & & 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 &deter-
& & & mine 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.

& & & The proper way to read records from fstab is to use the routines getmn-
& & & tent(3).

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
3 [报告]
发表于 2005-03-10 22:11 |只看该作者

我认识的/etc/fstab中的字段

第五域表示的是文件系统的备份频率,1表示每1天一次备份
,2表示每2天备份一次,...,0表示不备份
第六域(最右边)的表示系统重启时被fsck检查文件系统完整性的次序,数值越小就越先得到检查,通常/被设置为1,其他的文件系统一般设置为2,0表示在文件在系统重启时不接受完整性检查

论坛徽章:
0
4 [报告]
发表于 2005-03-11 12:27 |只看该作者

我认识的/etc/fstab中的字段

后面三项可以不填,比如mount NFS的时候,不过不知道不填默认是多少

论坛徽章:
0
5 [报告]
发表于 2005-03-12 10:48 |只看该作者

我认识的/etc/fstab中的字段

不错不错 学习学习

论坛徽章:
2
综合交流区版块每日发帖之星
日期:2015-08-06 06:20:00每日论坛发贴之星
日期:2015-08-06 06:20:00
6 [报告]
发表于 2005-03-12 11:02 |只看该作者

我认识的/etc/fstab中的字段

刚明白这个文件中段的含义。以前真没仔细看过。谢谢各位。

论坛徽章:
0
7 [报告]
发表于 2005-03-12 21:26 |只看该作者

我认识的/etc/fstab中的字段

受教了

论坛徽章:
0
8 [报告]
发表于 2005-03-18 14:58 |只看该作者

我认识的/etc/fstab中的字段

good

论坛徽章:
0
9 [报告]
发表于 2006-10-06 13:44 |只看该作者
原帖由 寂寞烈火 于 2005-3-10 22:11 发表
第五域表示的是文件系统的备份频率,1表示每1天一次备份
,2表示每2天备份一次,...,0表示不备份
第六域(最右边)的表示系统重启时被fsck检查文件系统完整性的次序,数值越小就越先得到检查,通常/被设置为1,其他的文 ...

请教一下火哥,第五域既然是表示备份的频率,这个备份是怎样实现的?能否给解释一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP