Gentoo Archives: gentoo-user

From: Wol <antlists@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: e2fsck -c when bad blocks are in existing file?
Date: Wed, 09 Nov 2022 23:54:51
Message-Id: f367466f-3272-2c09-3a85-9949d267306f@youngman.org.uk
In Reply to: [gentoo-user] Re: e2fsck -c when bad blocks are in existing file? by Grant Edwards
1 On 09/11/2022 23:31, Grant Edwards wrote:
2 >> If I recall correctly, it will add any unreadable blocks to its
3 >> internal list of bad sectors, which it will then refuse to allocate
4 >> in the future.
5
6 I doubt you recall correctly. You should ONLY EVER conclude a block is
7 bad if you can't write to it. Remember what I said - if I read my 8TB
8 drive from end-to-end twice, then I should *expect* a read error ...
9
10 > I'm asking what happens to the file containing the bad block. Perphaps
11 > nothing. The man page says the block is added to the "bad block
12 > inode". If that block was already allocated, is the bad block is now
13 > allocated to two different inodes?
14 >
15 If a read fails, you SHOULD NOT do anything. If a write fails, you move
16 the block and mark the failed block as bad. But seeing as you've moved
17 the block, the bad block is no longer allocated to any file ...
18
19 Cheers,
20 Wol

Replies

Subject Author
[gentoo-user] Re: e2fsck -c when bad blocks are in existing file? Grant Edwards <grant.b.edwards@×××××.com>