Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Mar 2010 17:18:45 +0100
From:      Miroslav Lachman <000.fbsd@quip.cz>
To:        gary.jennejohn@freenet.de
Cc:        freebsd-current@freebsd.org
Subject:   Re: A tool for remapping bad sectors in CURRENT?
Message-ID:  <4B9D0C65.7000809@quip.cz>
In-Reply-To: <20100314123859.47664ace@ernst.jennejohn.org>
References:  <20100308102918.GA5485@localhost>	<4B94DDC8.5080008@quip.cz>	<20100308115052.GA31896@office.redwerk.com>	<4B94FBA6.5090107@quip.cz>	<861vfq995i.fsf@ds4.des.no>	<4B9BF957.4060507@quip.cz>	<86eijn3of2.fsf@ds4.des.no>	<4B9CB287.9080205@quip.cz> <20100314123859.47664ace@ernst.jennejohn.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Gary Jennejohn wrote:
> On Sun, 14 Mar 2010 10:55:19 +0100
> Miroslav Lachman<000.fbsd@quip.cz>  wrote:
>
> [big snip]
>> fsdb (inum: 3)>  blocks
>> Blocks for inode 3:
>> Direct blocks:
>> 3001 (1 frag)
>>
>> fsdb (inum: 3)>  findblk 3001
>> fsdb (inum: 3)>
>>
>>                  ^^^^^^^^ findblk did not returned inode 3!
>>
>
> This is almost guaranteed to be a file system block and not
> a disk block.

Do you mean the number 3001?
I am sorry for my ignorance, but it is not clear to me from fsdb manpage 
what "blocks" means FS block and what disk block.

And how can I use (calculate with) this numbers?

How can I get the right number to pass to findlbk command (in the 
example above) to give me back the inode 3?

If FS block is 16384 bytes, then it means 16384/512 = 32 disk blocks per 
FS block.

If 3001 is FS block, then it means 3001*32 = 96032 disk block number. Am 
I right?

fsdb (inum: 3)> findblk 96032
fsdb (inum: 3)>

Again - findblk did not returned inode 3.

So what is the exact formula to get the right findblk number and then 
right inode number as result of findblk command?

I am still lost in terms (words) and numbers :(

Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B9D0C65.7000809>