tune2fs命令允许系统管理员在Linux ext2、ext3或ext4文件系统上调整、设置、查看文件系统参数。tune2fs -l 只会显示 superblock 上的内容。有时候使用tune2fs命令遇到类似Couldn't find valid filesystem superblock这样的错误,这个可能是因为你对该命令的一些细节或参数没有注意的缘故。

 

1:tune2fs -l /dev/xxx  tune2fs -l要跟具体的分区,而不是整个硬盘。否则会出现下面错误:

 

[root@mylnx1 ~]# df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
              ext3    41518344  29366024  10009296  75% /
/dev/sda1     ext3      101086     23532     72335  25% /boot
/dev/mapper/VolGroup02-LogVol00
              ext3    82537136  42421272  35923200  55% /u01
/dev/mapper/VolGroup01-LogVol00
              ext3   165107052 140918868  15801216  90% /u02
/dev/mapper/VolGroup03-LogVol00
              ext3   185749492 130321240  45992708  74% /u03
/dev/mapper/VolGroup04-LogVol00
              ext3   123822052  98380964  19151272  84% /u04
/dev/sdg1     ext4   104238720  74221532  24722168  76% /u05
tmpfs        tmpfs     2026460         0   2026460   0% /dev/shm
[root@mylnx1 ~]# tune2fs -l /dev/sda
tune2fs 1.39 (29-May-2006)
tune2fs: Bad magic number in super-block while trying to open /dev/sda
Couldn't find valid filesystem superblock.
[root@mylnx1 ~]# tune2fs -l /dev/sda1  #参数是磁盘分区,而不是对应的磁盘
tune2fs 1.39 (29-May-2006)
Filesystem volume name:   /boot
Last mounted on:          <not available>
Filesystem UUID:          2c1864be-127a-4cf5-98aa-a45affaaee72
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              26104
Block count:              104388
Reserved block count:     5219
Free blocks:              77538
Free inodes:              26064
First block:              1
Block size:               1024
Fragment size:            1024
Reserved GDT blocks:      256
Blocks per group:         8192
Fragments per group:      8192
Inodes per group:         2008
Inode blocks per group:   251
Filesystem created:       Fri May  8 21:55:36 2015
Last mount time:          Sat Apr 25 14:03:18 2020
Last write time:          Sat Apr 25 14:03:18 2020
Mount count:              21
Maximum mount count:      -1
Last checked:             Sun Apr 30 12:55:19 2017
Check interval:           0 (<none>)
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Journal inode:            8
Default directory hash:   tea
Directory Hash Seed:      3505f19e-b37f-48d2-be11-0cdb80f8fb93
Journal backup:           inode blocks

相关文章:

  • 2021-09-15
  • 2021-04-11
  • 2021-07-24
  • 2021-06-09
  • 2021-10-09
猜你喜欢
  • 2022-12-23
  • 2022-02-28
  • 2021-09-07
  • 2021-04-15
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案