linux tune2fs命令详解
来源:互联网 发布:centos shell脚本编程 编辑:程序博客网 时间:2024/05/16 06:59
From: http://blog.chinaunix.net/uid-7530389-id-2050094.html
一.简介:
tune2fs是调整和查看ext2/ext3文件系统的文件系统参数,Windows下面如果出现意外断电死机情况,下次开机一般都会出现系统自检。Linux系统下面也有文件系统自检,而且是可以通过tune2fs命令,自行定义自检周期及方式。
二.用法:
tune2fs [ -l ] [ -c max-mount-counts ] [ -e errors-behavior ] [ -f ] [ -i interval-between-checks ] [ -j ] [ -J journal-options ] [ -m
reserved-blocks-percentage ] [ -o [^]mount-options[,...] ] [ -r reserved-blocks-count ] [ -s sparse-super-flag ] [ -u user ] [ -g
group ] [ -C mount-count ] [ -L volume-name ] [ -M last-mounted-directory ] [ -O [^]feature[,...] ] [ -T time-last-checked ] [ -U
UUID ] device
常用选项说明:
-l 查看文件系统信息
-c max-mount-counts 设置强制自检的挂载次数,如果开启,每挂载一次mount conut就会加1,超过次数就会强制自检
-i interval-between-checks[d|m|w] 设置强制自检的时间间隔[d天m月w周]
-m reserved-blocks-percentage 保留块的百分比
-j 将ext2文件系统转换为ext3类型的文件系统
-L volume-label 类似e2label的功能,可以修改文件系统的标签
-r reserved-blocks-count 调整系统保留空间
-o [^]mount-option[,...] Set or clear the indicated default mount options in the filesystem. 设置或清除默认挂载的文件系统选项
三.例如:
tune2fs -c 30 /dev/hda1 设置强制检查前文件系统可以挂载的次数
tune2fs -c -l /dev/hda1 关闭强制检查挂载次数限制。
tune2fs -i 10 /dev/hda1 10天后检查
tune2fs -i 1d /dev/hda1 1天后检查
tune2fs -i 3w /dev/hda1 3周后检查
tune2fs -i 6m /dev/hda1 半年后检查
tune2fs -i 0 /dev/hda1 禁用时间检查
tune2fs -j /dev/hda1 添加日志功能,将ext2转换成ext3文件系统
tune2fs -r 40000 /dev/hda1 调整/dev/hda1分区的保留空间为40000个磁盘块
tune2fs -o acl,user_xattr /dev/hda1 设置/dev/hda1挂载选项,启用Posix Access Control Lists和用户指定的扩展属性
开机取消自检:
tune2fs -l /dev/sdb1 | grep -E ‘Maximum mount count:|Check interval’
tune2fs -i 0 -c 0 /dev/sdb1
- linux tune2fs命令详解
- linux tune2fs命令详解
- linux tune2fs命令详解
- linux tune2fs命令详解
- linux tune2fs命令详解
- linux tune2fs命令详解
- linux tune2fs命令详解
- linux tune2fs命令详解
- Linux tune2fs 命令
- linux mkfs tune2fs fsck命令
- tune2fs 命令
- linux的mkfs和tune2fs命令
- linux tune2fs
- 使用tune2fs命令获得Linux操作系统的安装时间
- tune2fs
- tune2fs自定义Linux系统文件系统自检
- Linux 开机自检的设置(tune2fs和fsck/e2fsck)
- e2label、tune2fs
- android camera(二):摄像头工作原理、s5PV310 摄像头接口(CAMIF)
- oracle日期相关
- android睡眠唤醒调试
- 【网站安全】网站通常面临的几种安全威胁及应对方式
- Debian Stable(squeeze6.0.7) 升级到最新的stable(Wheezy7.0),tzdata broken,重新安装N显卡驱动
- linux tune2fs命令详解
- 华为软件编程规范学习(九)--质量保证
- open函数的流程
- System::String *,char*,string 等的类型转换
- Source Insight的简单使用
- 设计随想--脚本语言
- 删除thunderbird的邮件账户
- C# 生成随机数
- DEVMODE