dumpe2fsでデバイスのスーパーブロックの情報のみを確認する方法をご紹介します。
dumpe2fsコマンドを「-h」オプションでデバイスを指定して実行します。
1 |
dumpe2fs -h デバイスパス |
実際に確認してみます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# dumpe2fs -h /dev/vda2 dumpe2fs 1.42.9 (28-Dec-2013) Filesystem volume name: rootfs Last mounted on: / Filesystem UUID: fc197a21-4502-4f6c-acd1-fd60a6ade417 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize Filesystem flags: signed_directory_hash Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue Filesystem OS type: Linux Inode count: 3276800 Block count: 13106427 Reserved block count: 576626 Free blocks: 11806041 Free inodes: 3223595 First block: 0 Block size: 4096 Fragment size: 4096 Group descriptor size: 64 Reserved GDT blocks: 1020 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 8192 Inode blocks per group: 512 Flex block group size: 16 Filesystem created: Thu Sep 19 10:10:39 2019 Last mount time: Sun Jun 21 16:48:13 2020 Last write time: Sun Jun 21 16:48:13 2020 Mount count: 11 Maximum mount count: -1 Last checked: Thu Sep 19 10:10:39 2019 Check interval: 0 (<none>) Lifetime writes: 11 GB Reserved blocks uid: 0 (user root) Reserved blocks gid: 0 (group root) First inode: 11 Inode size: 256 Required extra isize: 28 Desired extra isize: 28 Journal inode: 8 Default directory hash: half_md4 Directory Hash Seed: df18875e-4726-46a4-9c32-d27d6a9a8254 Journal backup: inode blocks Journal features: journal_incompat_revoke journal_64bit Journal size: 128M Journal length: 32768 Journal sequence: 0x0007d190 Journal start: 5015 # |
なお、スーパーブロックがない場合は以下のようになります。
1 2 3 4 5 |
# dumpe2fs -h /dev/vda1 dumpe2fs 1.42.9 (28-Dec-2013) dumpe2fs: Bad magic number in super-block while trying to open /dev/vda1 Couldn't find valid filesystem superblock. # |