xfs
[Top] [All Lists]

Re: Fwd: xfs - fixing wrong xfs size

To: johahoff <jh@xxxxxxxxxxxxxxx>
Subject: Re: Fwd: xfs - fixing wrong xfs size
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Mon, 15 Nov 2010 10:26:33 -0600
Cc: xfs@xxxxxxxxxxx
In-reply-to: <30211747.post@xxxxxxxxxxxxxxx>
References: <dbd747120904130713t7388971axf75ee779b5b1e1f2@xxxxxxxxxxxxxx> <49E353FD.5060207@xxxxxxxxxxx> <dbd747120904130933i6ae66aedt7912a47b7e561f76@xxxxxxxxxxxxxx> <4BE1EF9D.2030901@xxxxxxxxxxx> <30211747.post@xxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6
On 11/14/10 5:16 AM, johahoff wrote:
> 
>> You can use xfs_db to set it; or you could comment out the kernel
>> check... and mount readonly, and copy off the data you can get to?
> 
> I have got the same problem after recovering a xfs volume using ddrescue. It
> seems that the new 1 TB drive I dd'ed to is a few blocks short ...
> 
> I had a look at the xfs_db man page, but wasn't able to figure out which
> command would allow me to set the block count of the fs. Can you please give
> the appropriate commands? I think I'll be able to figure out the correct
> counts on my own.
> 
> Thanks a lot!
> 
> -Johannes

# xfs_db -w /dev/blah
xfs_db> sb 0
xfs_db> p
...
magicnum = 0x58465342
blocksize = 4096
dblocks = XXXXXX
...
xfs_db> w dblocks <NEW VALUE>
xfs_db> quit

You may have to do it for each of the superblocks but I think the first
should suffice.

If files reference the blocks past the device then of course you'll hit
errors trying to read them as well ...

-Eric

<Prev in Thread] Current Thread [Next in Thread>