fsck.gfs2 fails with the error: bad read: Invalid argument from find_shortest_rgdist:148: block 8050395648 (0x1dfd74a00) count: 1 size: 4096 ret: 0
Issue
The fsck.gfs2 command failed with error when trying to fix a gfs2 filesystem:
[root@node42 ~]# fsck.gfs2 -a /dev/vg_data/lv_data
Initializing fsck
Validating resource group index.
Level 1 resource group check: Checking if all rgrp and rindex values are good.
(level 1 failed: Some damage was found; we need to take remedial measures)
Level 2 resource group check: Checking if rindex values may be easily repaired.
The rindex file does not meet our expectations.
(level 2 failed at block 0 (0x0): rindex is unevenly spaced: either gfs1-style or corrupt)
Level 3 resource group check: Calculating where the rgrps should be if evenly spaced.
[....]
New resource groups:
L3: number of rgs in the index = 121886.
L3: number of rgs expected = 121886.
Level 3 didn't work. Too many discrepancies.
121886 out of 121886 rgrps (100 percent) did not match what was expected.
(level 3 failed at block 0 (0x0): rindex calculations don't match: uneven rgrp boundaries)
Level 4 resource group check: Trying to rebuild rindex assuming evenly spaced rgrps.
bad read: Invalid argument from find_shortest_rgdist:148: block 8050395648 (0x1dfd74a00) count: 1 size: 4096 ret: 0
Environment
- Red Hat Enterprise Linux Server 7 (with the High Availability Add On and Resilient Storage Add Ons)
- A Global Filesystem 2(
gfs2)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.