Re: Fwd: xfs - fixing wrong xfs size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux