From owner-freebsd-questions@FreeBSD.ORG Sun Feb 27 18:07:25 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE56216A4D0 for ; Sun, 27 Feb 2005 18:07:25 +0000 (GMT) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1ED2243D66 for ; Sun, 27 Feb 2005 18:07:25 +0000 (GMT) (envelope-from cpghost@cordula.ws) Received: from bsdbox.farid-hajji.net (bsdbox [192.168.254.3]) by fw.farid-hajji.net (Postfix) with ESMTP id 2B7C64ACF1; Sun, 27 Feb 2005 19:07:24 +0100 (CET) Date: Sun, 27 Feb 2005 19:07:30 +0100 From: cpghost@cordula.ws To: freebsd-questions@freebsd.org Message-ID: <20050227180730.GA80686@bsdbox.farid-hajji.net> References: <1561762673.20050227155330@wanadoo.fr> <20050227155344.GA78232@bsdbox.farid-hajji.net> <704894374.20050227171932@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <704894374.20050227171932@wanadoo.fr> User-Agent: Mutt/1.5.6i Subject: Re: WRITE_DMA errors on SATA drive under 5.3-RELEASE X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Feb 2005 18:07:25 -0000 On Sun, Feb 27, 2005 at 05:19:32PM +0100, Anthony Atkielski wrote: > cpghost@cordula.ws writes: > > > Theoretically, one could use 'fsdb -r' in a scripted manner, to > > generate a mapping of file names to blocks (relative to the partition > > of the file system you are mapping). Once you have the blocks, you'll > > need to do so artithmetics to map those blocks to LBA address ranges > > (perhaps via GEOM or using data in disklabels). Finally, you'll have > > to locate the range for a particular LBA address and work backwards > > up to the inode #, and then to the filename(s) that link to that inode. > > Sounds complicated. Surely I'm not the first person to wish for such a > utility ... in UNIXland, there seems to be a command for just about > every conceivable purpose (?). Or you could write the missing ones :-). Actually, it's not that hard. You need three mappings: 1. (lba address, (filesystem, block #)) 2. ((filesystem, block #), (filesystem, inode #)) 3. ((filesystem, inode #), (list of filenames linking to inode #)) Each of those mappings could be done and displayed by a single utility. Combining all three into a lba2filenames program would then be trivial. > > Perhaps there's already a system utility or port for this? It would be > > really useful! > > I'm mainly worried about exactly what the system was trying to write at > the time. It's not clear from the message whether the write succeeded > or not. Yes, that's exactly my concern too. > -- > Anthony -cpghost. -- Cordula's Web. http://www.cordula.ws/