1:命令简介

Linux下的文件检测命令,且可以自行定义自检周期

2:用法

[root@uyhd000225 ~]# tune2fs --helptune2fs 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 UUIDFilesystem UUID:          913a5c64-d788-4bfb-aed8-9e0e13d1087e[root@uyhd000225 ~]#

查看磁盘与uuid的映射

[root@pacteralinux ~]# ls -l /dev/disk/by-uuidtotal 0lrwxrwxrwx. 1 root root 10 Dec  2 14:20 10901315-74d0-499d-92af-b7490a11e93e -> ../../sdc2lrwxrwxrwx. 1 root root 10 Nov 26 08:36 9246707a-30ab-47be-b78f-bb7b24a459a8 -> ../../sda1lrwxrwxrwx. 1 root root 10 Nov 26 08:36 da9facaf-d64f-42af-9bb7-a44f863cfc4c -> ../../sdb1lrwxrwxrwx. 1 root root 10 Nov 26 08:36 eb29745a-6bb6-4468-9478-601a6bc7d9e5 -> ../../sda2lrwxrwxrwx. 1 root root 10 Dec  2 14:11 f01332c8-8490-42f3-bcf4-3a6800016df8 -> ../../sdc1[root@pacteralinux ~]#

给磁盘生成新的uuid

tune2fs -U random 磁盘名称