From owner-freebsd-current@FreeBSD.ORG Wed May 12 01:46:57 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2895D1065670 for ; Wed, 12 May 2010 01:46:57 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id A8C4D8FC13 for ; Wed, 12 May 2010 01:46:56 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id o4C1ksxD019779 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 12 May 2010 03:46:54 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.3/8.14.3) with ESMTP id o4C1kpnL004704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 12 May 2010 03:46:51 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id o4C1kpsT077659; Wed, 12 May 2010 03:46:51 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id o4C1kpjx077658; Wed, 12 May 2010 03:46:51 +0200 (CEST) (envelope-from ticso) Date: Wed, 12 May 2010 03:46:51 +0200 From: Bernd Walter To: Alexander Best Message-ID: <20100512014651.GN73283@cicely7.cicely.de> References: <3a142e751003291708nc3e110bjca1789cc807f61a2@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: freebsd-current@freebsd.org Subject: Re: fsck unable to read disk sectors X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 May 2010 01:46:57 -0000 On Tue, May 11, 2010 at 10:15:13PM +0200, Alexander Best wrote: > i've posted a log here which is pretty self explanatory: > > http://pastebin.com/tn3NiDDW > > On Tue, May 11, 2010 at 10:13 PM, Alexander Best > wrote: > > the problem is getting more awkward. > > > > if i do `fsck /dev/label/rootfs` fsck complains that it cannot read a > > specific sector of my hdd as i mentioned before. if i run fsck on the > > device node directly using `fsck /dev/ada0p3` however, fsck succeeds. So this is not hardware it is bad partitioning. > > what i did was to boot into single user mode with / being mounted read > > only. for some reason however fsck will check /dev/label/rootfs in > > write mode, but if i want fsck to check ada0p3 it will only do so in > > read mode. > > > > this looks like something is really broken. right now the only way to > > get the clean flag set on my hdd is to boot from a livefs cd and then > > run `fsck /dev/ada0p3` (again: `fsck /dev/label/rootfs` will NOT > > succeed). One of the typical problems users have is that they forget that adding a label takes one sector, so the labeled device is smaller. This is no problem if you create the filesystem on the labeled drive, but often enough people add the label after creating the filesystem. Everything seems to work fine until the FS decides to use that special sector. I wouldn't add a label for ufs anyway, since UFS has labeling itself, which is also handled by glabel module and doesn't require extra space. Just setup the ufs label with tunefs -L and use the resulting /dev/ufs/... device. You only need extra label for swap, but this is not problem, since it has no persistent ondisk structures. > > this is the output of `glabel status` btw: > > > >                                     Name  Status  Components > >                               label/boot     N/A  ada0p1 > > gptid/e52df583-e446-11de-bb92-000fb58207c8     N/A  ada0p1 > >                               label/swap     N/A  ada0p2 > >                             label/rootfs     N/A  ada0p3 > > > > cheers. > > > > On Tue, Mar 30, 2010 at 2:08 AM, Paul B Mahol wrote: > >> On 3/29/10, Alexander Best wrote: > >>> hi there, > >>> > >>> when doing fsck on my / fs i get this error: > >>> > >>> "Cannot Read BLK. 471617640" and "The Following Disk Sectors could not be > >>> read: 471617643". after this message the partition gets marked dirty. > >>> > >>> i performed the following steps to verify the problem: > >>> > >>> 1) dd if=/dev/ada0 of=/dev/null bs=1m > >>> 2) fsck / under freebsd 7 > >>> 3) mount -u -o snapshot /.snap/snapshot1 / && fsck_ffs /.snap/snapshot1 > >>> > >>> all three steps showed no problem with that harddrive whatsoever. also > >>> smartd > >>> doesn't complain about anything. > >>> > >>> i'm running HEAD (r205860) on amd64. > >>> > >>> this is the output of `dmesg -a|grep ada0`: > >>> > >>> ada0 at ahcich2 bus 0 scbus3 target 0 lun 0 > >>> ada0: ATA-7 SATA 2.x device > >>> ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) > >>> ada0: Command Queueing enabled > >>> ada0: 238474MB (488395055 512 byte sectors: 16H 63S/T 16383C) > >> > >> Last time I tried ahci on dead disk it did not complained at all > >> (usually I get dead LBA listed on console). -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.