您的位置:首页 > 运维架构 > Linux

linux tune2fs简解(每日一令之五)

2013-12-06 17:18 459 查看
1:命令简介
Linux下的文件检测命令,且可以自行定义自检周期
2:用法
[root@uyhd000225 ~]# tune2fs --help
tune2fs 1.39 (29-May-2006)
tune2fs:无效选项 -- -
Usage: tune2fs [-c max_mounts_count] [-e errors_behavior] [-g group]
[-i interval[d|m|w]] [-j] [-J journal_options]
[-l] [-s sparse_flag] [-m reserved_blocks_percent]
[-o [^]mount_options[,...]] [-r reserved_blocks_count]
[-u user] [-C mount_count] [-L volume_label] [-M last_mounted_dir]
[-O [^]feature[,...]] [-T last_check_time] [-U UUID] device
[root@uyhd000225 ~]#
3:事例
查看磁盘的uuid
[root@uyhd000225 ~]# tune2fs -l /dev/hda1|grep UUID
Filesystem UUID:          913a5c64-d788-4bfb-aed8-9e0e13d1087e
[root@uyhd000225 ~]#
查看磁盘与uuid的映射

[root@pacteralinux ~]# ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx. 1 root root 10 Dec  2 14:20 10901315-74d0-499d-92af-b7490a11e93e -> ../../sdc2
lrwxrwxrwx. 1 root root 10 Nov 26 08:36 9246707a-30ab-47be-b78f-bb7b24a459a8 -> ../../sda1
lrwxrwxrwx. 1 root root 10 Nov 26 08:36 da9facaf-d64f-42af-9bb7-a44f863cfc4c -> ../../sdb1
lrwxrwxrwx. 1 root root 10 Nov 26 08:36 eb29745a-6bb6-4468-9478-601a6bc7d9e5 -> ../../sda2
lrwxrwxrwx. 1 root root 10 Dec  2 14:11 f01332c8-8490-42f3-bcf4-3a6800016df8 -> ../../sdc1
[root@pacteralinux ~]#
给磁盘生成新的uuid

tune2fs -U random 磁盘名称


本文出自 “从运维到ETL” 博客,请务必保留此出处http://fuwenchao.blog.51cto.com/6008712/1337581
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: