Bad sector in UFS2 journal area

Ivan Voras ivoras at freebsd.org
Thu Oct 20 12:30:25 UTC 2011


On 20/10/2011 05:49, Ross wrote:
> I don't actually have this problem, I'm just curious. What will happen
> if read fails on sector in UFS2 journal area? Sector won't get
> remapped until write, so reads will be failing until then.
> 
> I've had experience with bad sectors with non-journaled filesystems —
> the system was online and working. The only problem was that
> particular file and messages in /var/log/messages until the Current
> Pending Sector counter was cleared and sector was remapped.
> 
> Will it be the same (online system) with bad sector in journal area?
> And will it damage the filesystem?

Well, SUJ is new enough that there's no general disseminated knowledge
about it, but from a quick look at the code:

	1) the journal recovery is only ever done in the fsck_ffs program, so
it's unlikely that the kernel will panic from a bad sector
	2) if the journal cannot be read at any point, the recovery code
*should* offer the user to nuke the journal and perform a normal, full
fsck, which presumably should leave the file system in a usable state
	3) journal writes are done via the normal mechanisms, so it also
shouldn't lead to kernel panics on bad sectors, but the "normal"
cannot-write-to-device kernel error message and continued operation.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20111020/0d2b9da7/signature.pgp


More information about the freebsd-questions mailing list