Date: Mon, 12 Jul 2010 00:00:07 +0000 From: Dmitry Lunts <eingorn777@gmail.com> To: freebsd-fs@freebsd.org Subject: fsdb&smartctl&/var/log/messages Message-ID: <AANLkTinbWD0LUVig1OsaREeTtnfwukceIxzdzijRqeKy@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello,all! The question is as follows. 1).When I try to upgrade some port or merely execute the command pkgdb -uF I get the error: Input/output error - /var/db/pkg/kdeutils-3.5.10_5/+CONTENTS 2)$sudo cat /var/log/messages|grep DMA|tail -2 gives: Jul 12 03:07:06 dim007 kernel: ad6: FAILURE - READ_DMA status=3D51<READY,DSC,ERROR> error=3D40<UNCORRECTABLE> LBA=3D4007967 Jul 12 03:07:09 dim007 kernel: ad6: FAILURE - READ_DMA status=3D51<READY,DSC,ERROR> error=3D40<UNCORRECTABLE> LBA=3D4007967 3)From the output of $cat /etc/fstab and $sudo bsdlabel ad6s1: # size offset fstype [fsize bsize bps/cpg] a: 1048576 0 4.2BSD 2048 16384 8 b: 1048576 1048576 swap c: 100663227 0 unused 0 0 # "raw" part, don'= t edit d: 2097152 2097152 4.2BSD 2048 16384 28552 e: 655360 4194304 4.2BSD 2048 16384 40968 f: 37748736 4849664 4.2BSD 2048 16384 28552 g: 58064827 42598400 4.2BSD 2048 16384 28552 I can conclude that LBA=3D4007967 falls into /dev/ad6s1d partition mounted = as /var Next: 4) $sudo fsdb -r /dev/ad6s1d ** /dev/ad6s1d (NO WRITE) Examining file system `/dev/ad6s1d' Last Mounted on /var current inode: directory I=3D2 MODE=3D40755 SIZE=3D512 BTIME=3DJan 1 15:07:34 2009 [0 nsec] MTIME=3DJul 12 03:03:19 2010 [0 nsec] CTIME=3DJul 12 03:03:19 2010 [0 nsec] ATIME=3DJul 10 01:09:22 2010 [0 nsec] OWNER=3Droot GRP=3Dwheel LINKCNT=3D27 FLAGS=3D0 BLKCNT=3D4 GEN=3D5e655284 Offset of bad LBA sector within /dev/ad6s1d (i.e., /var) partition is: (bad LBA sector-63-offset of /dev/ad6s1d=3D4007967-63-2097152=3D1910752 (se= e the output of bsdlabel above) 5) Searching for inode: fsdb (inum: 2)>findblk 1910752 1910752: data block of inode 117934 6)Searching for file: $sudo find /var -inum 117934 /var/db/pkg/kdeutils-3.5.10_5/+CONTENTS which exactly corresponds to error message from pkgdb -uF (see item 1) above) On the other hand, the following script executes without errors: $export i=3D4007967 $ while [ $i -lt 4007976 ] / #checking 10 sectors > do echo $i > dd if=3D/dev/ad6 of=3D/dev/null bs=3D512 count=3D1 skip=3D$i > let i+=3D1 > done 4007967 1+0 records in 1+0 records out 512 bytes transferred in 0.008722 secs (58702 bytes/sec) 4007968 <SKIPPED> So, no errors. 7)Moreover, following commands give quite another number of bad LBA secror: $sudo smartctl -t long /dev/ad6 $sudo smartctl -l selftest /dev/ad6 smartctl 5.39.1 2010-01-28 r3054 [FreeBSD 7.3-RELEASE-p1 i386] (local build= ) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net =3D=3D=3D START OF READ SMART DATA SECTION =3D=3D=3D SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Extended offline Completed: read failure 90% 7376 4007996 <SKIPPED> 8) In this case LBA_of_first_error=3D4007996 (not 4007967!) is different from bad sector number previousely discovered from /var/log/messages 9) again, trying to read bad sectors: $ export i=3D4007996 $ while [ $i -lt 4008006 ] #again checking 10 sectors > do echo $i > dd if=3D/dev/ad6 of=3D/dev/null bs=3D512 count=3D1 skip=3D$i > let i+=3D1 > done 4007996 dd: /dev/ad6: Input/output error 0+0 records in 0+0 records out 0 bytes transferred in 2.704641 secs (0 bytes/sec) 4007997 <SKIPPED> 10) And what's more: offset of LBA_of_first_error within /dev/ad6s1d is 4007996-63-2097152=3D1910781 fsdb->findblk returns nothing: fsdb (inum: 2)> findblk 1910781 fsdb (inum: 2)> So, the puzzle is: from one hand, pkgdb -uF, /var/log/messages, fsdb point to the same bad sector (4007967) and filename this sector belongs to (and even cat /var/db/pkg/kdeutils-3.5.10_5/+CONTENTS returns Input/Output error), but low level reading of bad sector returns without a sign of error. >From the other hand, smartctl long test performed immediately after low level read test with dd gives quite another number of bad sector (4007996) which in turn doesn't belong to any file. And what makes me completely lost is that the tests in items 1)-10) were repeated two times and gave the same results! So where are 29 (4007996-4007967) sectors lost? Could anyone give me a hint where I'm wrong? TIA, Dmitry --=20 =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=94=D0=BC= =D0=B8=D1=82=D1=80=D0=B8=D0=B9 Best regards, Dmitry email: eingorn777@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTinbWD0LUVig1OsaREeTtnfwukceIxzdzijRqeKy>