Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 2004 18:43:03 -0500
From:      "Dan Langille" <dan@langille.org>
To:        freebsd-hackers@FreeBSD.org
Subject:   fsck fails - mark sectors as bad?
Message-ID:  <40671CB7.1003.71EBDCAB@localhost>

next in thread | raw e-mail | index | archive | help
I had a hard drive failure.  I'm trying to get as much data off it as
I can before I restore from backup.  I have mounted the drive in
another box and I'm attempting to salvage what I can.

I thought I might be able to mark the bad sectors as bad, and get the 
file system mounted.

Here is what fsk -y finds:

 # fsck -y /dev/ad2s1a
** /dev/ad2s1a
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes

CANNOT READ: BLK 3168
CONTINUE? yes

THE FOLLOWING DISK SECTORS COULD NOT BE READ: 3187, 3188, 3189, 3190, 
3191, 3192, 3194,
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1649 files, 40205 used, 24290 free (162 frags, 3016 blocks, 0.3% 
fragmentation)

***** FILE SYSTEM STILL DIRTY *****

***** PLEASE RERUN FSCK *****

# fsck -y /dev/ad2s1f
** /dev/ad2s1f
** Last Mounted on /tmp
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
UNREF FILE I=1420  OWNER=1004 MODE=100600
SIZE=7711 MTIME=Mar 27 15:06 2004
CLEAR? yes

UNREF FILE I=1462  OWNER=1004 MODE=100600
SIZE=4873 MTIME=Mar 27 14:10 2004
CLEAR? yes

UNREF FILE I=1463  OWNER=1004 MODE=100600
SIZE=44426 MTIME=Mar 27 14:10 2004
CLEAR? yes

UNREF FILE I=1464  OWNER=1004 MODE=100600
SIZE=1784 MTIME=Mar 27 15:05 2004
CLEAR? yes

UNREF FILE I=1466  OWNER=1004 MODE=100600
SIZE=443 MTIME=Mar 27 14:11 2004
CLEAR? yes

UNREF FILE I=1467  OWNER=1004 MODE=100600
SIZE=4873 MTIME=Mar 27 14:26 2004
CLEAR? yes

UNREF FILE I=1470  OWNER=1004 MODE=100600
SIZE=15571 MTIME=Mar 27 15:05 2004
CLEAR? yes

UNREF FILE I=1472  OWNER=1004 MODE=100600
SIZE=3836 MTIME=Mar 27 15:47 2004
CLEAR? yes

UNREF FILE I=1477  OWNER=1004 MODE=100600
SIZE=58635 MTIME=Mar 27 14:09 2004
CLEAR? yes

UNREF FILE I=1478  OWNER=1004 MODE=100600
SIZE=22808 MTIME=Mar 27 14:09 2004
CLEAR? yes

UNREF FILE I=1479  OWNER=1004 MODE=100600
SIZE=55863 MTIME=Mar 27 14:09 2004
CLEAR? yes

UNREF FILE I=1480  OWNER=1004 MODE=100600
SIZE=2879 MTIME=Mar 27 14:10 2004
CLEAR? yes

UNREF FILE I=1481  OWNER=1004 MODE=100600
SIZE=473 MTIME=Mar 27 14:11 2004
CLEAR? yes

** Phase 5 - Check Cyl groups
FREE BLK COUNT(S) WRONG IN SUPERBLK
SALVAGE? yes

SUMMARY INFORMATION BAD
SALVAGE? yes

BLK(S) MISSING IN BIT MAPS
SALVAGE? yes

2168 files, 3148 used, 125851 free (35 frags, 15727 blocks, 0.0% 
fragmentation)

***** FILE SYSTEM MARKED CLEAN *****

***** FILE SYSTEM WAS MODIFIED *****

# fsck -y /dev/ad2s1e
** /dev/ad2s1e
** Last Mounted on /var
** Phase 1 - Check Blocks and Sizes
INCORRECT BLOCK COUNT I=2044 (36 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2050 (4 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2111 (28 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2211 (4 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2236 (4 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2238 (64 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2240 (60 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2252 (4 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2257 (4 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2267 (4 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2283 (28 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2284 (28 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2287 (4 should be 0)
CORRECT? yes

INCORRECT BLOCK COUNT I=2389 (4 should be 0)
CORRECT? yes


^C^C^C^C

this froze up and I found this in /var/log/messages:

Mar 28 17:11:31 tmp /kernel: ad2s1a: hard error reading fsbn 6399 of 
3168-3295 (ad2s1 bn 6399; cn 0 tn 101 sn 36) trying PIO mode
Mar 28 17:11:31 tmp /kernel: ad2: DMA problem fallback to PIO mode
Mar 28 17:11:36 tmp /kernel: ad2s1a: hard error reading fsbn 6415 of 
3168-3295 (ad2s1 bn 6415; cn 0 tn 101 sn 52) status=59 error=4
0
Mar 28 17:11:41 tmp /kernel: ad2s1a: hard error reading fsbn 3187 
(ad2s1 bn 3187; cn 0 tn 50 sn 37) status=59 error=40
Mar 28 17:11:46 tmp /kernel: ad2s1a: hard error reading fsbn 3188 
(ad2s1 bn 3188; cn 0 tn 50 sn 38) status=59 error=40
Mar 28 17:11:51 tmp /kernel: ad2s1a: hard error reading fsbn 3189 
(ad2s1 bn 3189; cn 0 tn 50 sn 39) status=59 error=40
Mar 28 17:11:56 tmp /kernel: ad2s1a: hard error reading fsbn 3190 
(ad2s1 bn 3190; cn 0 tn 50 sn 40) status=59 error=40
Mar 28 17:12:01 tmp /kernel: ad2s1a: hard error reading fsbn 3191 
(ad2s1 bn 3191; cn 0 tn 50 sn 41) status=59 error=40
Mar 28 17:12:06 tmp /kernel: ad2s1a: hard error reading fsbn 3192 
(ad2s1 bn 3192; cn 0 tn 50 sn 42) status=59 error=40
Mar 28 17:12:11 tmp /kernel: ad2s1a: hard error reading fsbn 3194 
(ad2s1 bn 3194; cn 0 tn 50 sn 44) status=59 error=40
Mar 28 17:13:24 tmp /kernel: ad2: READ command timeout tag=0 serv=0 - 
resetting
Mar 28 17:13:24 tmp /kernel: ata1: resetting devices .. ata1-slave: 
ATA identify retries exceeded
Mar 28 17:13:24 tmp /kernel: done


# fsck -y /dev/ad2s1g
** /dev/ad2s1g
** Last Mounted on /usr
** Phase 1 - Check Blocks and Sizes

CANNOT READ: BLK 40829792
UNEXPECTED SOFT UPDATE INCONSISTENCY

CONTINUE? yes

^C

And I found this in /var/log/messsages
Mar 28 18:35:16 tmp /kernel: ad2s1g: hard error reading fsbn 83986495 
of 40829792-40829919 (ad2s1 bn 83986495; cn 5227 tn 233 sn 61
) trying PIO mode
Mar 28 18:35:16 tmp /kernel: ad2: DMA problem fallback to PIO mode
Mar 28 18:35:16 tmp last message repeated 5 times
Mar 28 18:35:21 tmp /kernel: ad2s1g: hard error reading fsbn 83986591 
of 40829792-40829919 (ad2s1 bn 83986591; cn 5227 tn 235 sn 31
) status=59 error=40
Mar 28 18:35:37 tmp /kernel: ad2s1g: hard error reading fsbn 40829897 
(ad2s1 bn 40829897; cn 2541 tn 138 sn 38) status=59 error=40
Mar 28 18:35:47 tmp /kernel: ad2s1g: hard error reading fsbn 40829900 
(ad2s1 bn 40829900; cn 2541 tn 138 sn 41) status=59 error=40
-- 
Dan Langille : http://www.langille.org/
BSDCan - http://www.bsdcan.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40671CB7.1003.71EBDCAB>