Re: xfs I/O error

Iustin Pop
2008-02-23T22:08:17Z

On Sat, Feb 23, 2008 at 10:46:52PM +0100, Rekrutacja119 wrote:
> hello, is there any way to force XFS to ignore I/O errors? it seems it is
> shutting down the fs when it encounters any error.
> The problem is that i can't mark badsectors, as XFS doesn't support bad
> sector marking, but i also cannot access any correct data on partition,
> because when i try to access damaged sector, the whole fs goes down.
>
> any idea why?
>
> i use xfsprogs 2.9.4, my xfs is array made from 3 HDs, RAID 0, and one of
> them is getting some bad sectors. i cannot replace it currently.
>
> after i run xfs_repair on it, i was able to mount it and access the data,
> but when somebody tries to access bad data, the whole XFS goes down. i don't
> want that, i also dont have place to xfsmetadump the whole array to another
> disks.
>
> i tried scaning whole disk with badblocks (badblocks -c 1 -s -v /dev/sdb),
> and then running dd if=/dev/zero of=/dev/sdb count=1 bs=1
> seek=NUMBER_FROM_BADBLOCKOUTPUT
>
> but every block was written fine! (which is strange i guess), and it didnt
> help.

I'm not really sure, but the above seems wrong. badblocks has a default
block size of 1024 (-c does something else, not set the block size), and
you use that block number as an offset in bytes for dd (because you set
bs=1).

I would recommend to try the dd again, but with bs=1024. And afterwards,
rerun badblocks and check you have no errors.

As for xfs, I don't think if it can do what you want (ignore bad
blocks), if the error is in the metadata sections.

regards,
iustin