Bug 169340 - gfs_fsck segfault when trying to scan a erroneous filesystem
gfs_fsck segfault when trying to scan a erroneous filesystem
Status: CLOSED ERRATA
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: gfs (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Chris Feist
GFS Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-27 04:11 EDT by Mario Abajo
Modified: 2010-01-11 22:07 EST (History)
0 users

See Also:
Fixed In Version: RHBA-2006-0171
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-06 15:29:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to check read return value in rgrp code. (734 bytes, patch)
2005-10-14 18:12 EDT, Chris Feist
no flags Details | Diff

  None (edit)
Description Mario Abajo 2005-09-27 04:11:26 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.12) Gecko/20050921 Red Hat/1.0.7-1.4.1 Firefox/1.0.7

Description of problem:
I was experimenting with gfs and LVM in a testing disk when i shrink the logical volume a few mb, i assume that the gfs_fsck tool will give me some errors when it would try to recover the filesystem but i got this instead: (the volume was unmounted)

[root@test ~]# gfs_fsck /dev/datos/lvol0
Initializing fsck
Unable to seek to position 14302035968 (3491708 * 4096) on storage device.
Violaci�n de segmento

I know that shrink an umounted logical volume without shrinking the filesystem (it would be very beautiful to see this option present someday) is a big problem, but if this happend, i don't have the opportunity to recover it.


Version-Release number of selected component (if applicable):
GFS-6.1.0-0 GFS-kernel-smp-2.6.9-35.5 kernel-smp-2.6.9-11.EL

How reproducible:
Didn't try

Steps to Reproduce:
1. create a logical volume (in my case, it were of 3472 PE)
2. resize it with lvresize (lvresize -l 3400 /dev/datos/lvol0)
3. run gfs_fsck /dev/datos/lvol0
  

Actual Results:  # gfs_fsck /dev/datos/lvol0
Initializing fsck
Unable to seek to position 14302035968 (3491708 * 4096) on storage device.
Violaci�n de segmento

Expected Results:  Initializing fsck
Unable to seek to position 14302035968 (3491708 * 4096) on storage device.
A lot of errors, insult the idiot who resize the logical volume without asking the filesystem :), print that the physical size of the filesystem is not the same as the filesystem say it have, and do something to make the filesystem goes back to the normal state, also, it would be very valuable to see who are the files affected/erased/etc for this data lost.

Additional info:

the partition used for the test, /dev/sdb1
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               datos
  PV Size               13,57 GB / not usable 0
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              3473
  Free PE               73
  Allocated PE          3400
  PV UUID               KplOHP-9my7-gTnu-g36r-oqDu-jd6S-MVfr48

is realy a SAN connected via fibre channel with this card
02:02.0 Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)
and where automaticaly configured by kudzu
Comment 1 Mario Abajo 2005-09-27 04:36:51 EDT
I missed one important step
1. create a logical volume (in my case, it were of 3472 PE)
2. create the filesystem: mkfs.gfs -j 2 -p look_dlm -t redhat_cluster:san_gfs
/dev/datos/lvol0
3. resize it with lvresize (lvresize -l 3400 /dev/datos/lvol0)
4. run gfs_fsck /dev/datos/lvol0
Comment 2 Chris Feist 2005-10-14 18:12:20 EDT
Created attachment 120006 [details]
Patch to check read return value in rgrp code.

This bug was caused because the return value of a read function was not
checked.  It as been fixed with the attached patch.  (And should be in the next
version of GFS for RHEL4).
Comment 6 Red Hat Bugzilla 2006-01-06 15:29:36 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2006-0171.html

Note You need to log in before you can comment on or make changes to this bug.