public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Carsten Aulbert <carsten.aulbert@aei.mpg.de>
To: Michal Soltys <nozo@drutsystem.com>
Cc: xfs@oss.sgi.com
Subject: Re: Map a disk LBA to filename?
Date: Mon, 27 Oct 2008 14:54:35 +0100	[thread overview]
Message-ID: <4905C81B.50103@aei.mpg.de> (raw)
In-Reply-To: <4905BC13.3030402@drutsystem.com>

Hi Michal

Michal Soltys wrote:
> 
> Wouldn't something like (under xfs_db) :
> 
> getblock -b #block -n
> ncheck -i #inode
> 
> where required #inode is reported by getblock
> 
> do the thing ?
> 

Sounds nice, but my (ancient? 2.8.11) version of xfs_db does not know
getblock (only blockget) since that also matches the command line and
the usage looks about to be right, I'm currently trying that one, e.g.

smartctl reports a bad LBA at 36922326. fdisk tells me the partition
starts at 31069773, hence the block under question is 5852553.

xfs_info tells be a bsize of 4096 which I take as the block size, thus
the xfs block to look at should be 731569, right?

xfs_db> blockget -b 731569 -n
setting block 0/731569 to free1
setting block 0/731569 to free2
xfs_db>

hmm, no inode number. Does that mean this block is not used by any file
currently - which might be perfectly fine since this partition is only
31% full.

Everything right so far?

Cheers

Carsten

  reply	other threads:[~2008-10-27 14:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27 11:20 Map a disk LBA to filename? Carsten Aulbert
2008-10-27 11:49 ` Dave Chinner
2008-10-27 12:31   ` Carsten Aulbert
2008-10-27 13:03     ` Michal Soltys
2008-10-27 13:54       ` Carsten Aulbert [this message]
2008-10-27 15:56         ` Michal Soltys
2008-10-27 23:35       ` Dave Chinner
2008-10-28  7:11         ` Carsten Aulbert
2008-10-28  7:21           ` Dave Chinner
2008-10-28  7:38             ` Carsten Aulbert
2008-10-28  7:52               ` KELEMEN Peter
2008-10-28  9:14               ` Carsten Aulbert
2008-10-28  9:38                 ` KELEMEN Peter
2008-10-28  9:52                   ` Justin Piszcz
2008-10-30  5:23                   ` Dave Chinner
2008-10-28  9:51                 ` Michal Soltys

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4905C81B.50103@aei.mpg.de \
    --to=carsten.aulbert@aei.mpg.de \
    --cc=nozo@drutsystem.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox