Unfixable UFS2 corruption
Eugene Grosbein
egrosbein at rdtc.ru
Wed Aug 31 16:13:37 UTC 2011
31.08.2011 23:02, Adam Vande More пишет:
> Long story short: my /usr/local UFS2 filesystem somehow got corrupted
> and "fsck -y" in single user mode does not fix it.
>
> Not sure if this helps or not but on rare occasion I've had to run fsck twice consecutively to fix a FS.
Not this time - fsck does NOT find any problems in this file system.
Now I think fsck_ffs needs a patch:
--- sbin/fsck_ffs/dir.c.orig 2011-08-31 22:54:23.000000000 +0700
+++ sbin/fsck_ffs/dir.c 2011-08-31 22:54:48.000000000 +0700
@@ -225,7 +225,7 @@
type = dp->d_type;
if (dp->d_reclen < size ||
idesc->id_filesize < size ||
- namlen > MAXNAMLEN ||
+ namlen == 0 || namlen > MAXNAMLEN ||
type > 15)
goto bad;
for (cp = dp->d_name, size = 0; size < namlen; size++)
Comments?
Eugene Grosbein
More information about the freebsd-stable
mailing list