Date: Sun, 25 Nov 2007 03:25:45 +0300 From: Vladimir Grebenschikov <vova@fbsd.ru> To: fs@freebsd.org Subject: fsck -y failed to cure UFS2 volume with lost '.' entry in one direcotry Message-ID: <1195950345.4014.15.camel@localhost>
next in thread | raw e-mail | index | archive | help
Hi fs I have a trouble with incurable /usr partition. Usual output of background fsck after unclean shutdown is: Nov 24 20:50:58 vbook fsck: /dev/ad0s2d: MISSING '.' I=7113132 OWNER=root MODE=40755 Nov 24 20:50:58 vbook fsck: /dev/ad0s2d: SIZE=512 MTIME=Oct 16 02:11 2007 Nov 24 20:50:58 vbook fsck: /dev/ad0s2d: DIR=/compat/linux/usr/lib/locale/af_ZA Nov 24 20:50:58 vbook fsck: Nov 24 20:50:58 vbook fsck: /dev/ad0s2d: UNEXPECTED SOFT UPDATE INCONSISTENCY; RUN fsck MANUALLY. After that everything works fine until reboot. On reboot it starts foreground fsck and fails. Then, after manual fsck /usr it complains about error, but marks FS as clean. Then, after boot (usual boot without problems) - directory still have no '.' entry: # ls -al /compat/linux/usr/lib/locale/af_ZA total 16 drwxr-xr-x 3 root wheel 6656 Oct 16 02:18 .. # ls -ldi /compat/linux/usr/lib/locale/af_ZA/ 7113132 drwxr-xr-x 1 root wheel 512 Nov 25 02:14 /compat/linux/usr/lib/locale/af_ZA/ # and that directory can't be removed: # rmdir /compat/linux/usr/lib/locale/af_ZA rmdir: /compat/linux/usr/lib/locale/af_ZA: Invalid argument # # fsdb /dev/ad0s2d ** /dev/ad0s2d (NO WRITE) Editing file system `/dev/ad0s2d' Last Mounted on /usr current inode: directory I=2 MODE=40755 SIZE=512 BTIME=May 7 08:50:14 2006 [0 nsec] MTIME=Nov 24 20:41:39 2007 [0 nsec] CTIME=Nov 24 20:41:41 2007 [0 nsec] ATIME=Nov 25 03:01:02 2007 [0 nsec] OWNER=root GRP=wheel LINKCNT=24 FLAGS=0 BLKCNT=4 GEN=13bb592b fsdb (inum: 2)> inode 7113132 current inode: directory I=7113132 MODE=40755 SIZE=512 BTIME=Jun 26 22:58:21 2007 [0 nsec] MTIME=Nov 25 02:14:10 2007 [0 nsec] CTIME=Nov 25 02:14:10 2007 [0 nsec] ATIME=Nov 25 03:14:27 2007 [0 nsec] OWNER=root GRP=wheel LINKCNT=1 FLAGS=0 BLKCNT=4 GEN=98380ba fsdb (inum: 7113132)> ls slot 0 ino 0 reclen 20: regular, `LC_MESSAGES' slot 1 ino 6853672 reclen 492: directory, `..' fsdb (inum: 7113132)> Looks like - a bug in fsck. Any hints, how I can cure such partition ? Looks like I can do 'ln 7113132 .' in fsdb, or just 'clear 7113132' But I am not sure that it is right way to move. Also I think it is better to report bug in fsck. # uname -a FreeBSD vbook.fbsd.ru 7.0-BETA2 FreeBSD 7.0-BETA2 #39: Fri Nov 9 10:17:40 MSK 2007 root@vbook.fbsd.ru:/usr/obj/usr/src/sys/VBOOK i386 # dumpfs /dev/ad0s2d | head -n 20 magic 19540119 (UFS2) time Sun Nov 25 03:20:09 2007 superblock location 65536 id [ 464080f5 d57b82de ] ncg 388 size 36437305 blocks 35288781 bsize 16384 shift 14 mask 0xffffc000 fsize 2048 shift 11 mask 0xfffff800 frag 8 shift 3 fsbtodb 2 minfree 8% optim time symlinklen 120 maxbsize 16384 maxbpg 2048 maxcontig 8 contigsumsize 8 nbfree 473556 ndir 225259 nifree 7740525 nffree 216969 bpg 11761 fpg 94088 ipg 23552 unrefs 0 nindir 2048 inopb 64 maxfilesize 140806241583103 sbsize 2048 cgsize 16384 csaddr 3000 cssize 8192 sblkno 40 cblkno 48 iblkno 56 dblkno 3000 cgrotor 340 fmod 0 ronly 0 clean 0 avgfpdir 64 avgfilesize 16384 flags soft-updates fsmnt /usr volname swuid 0 -- Vladimir B. Grebenschikov vova@fbsd.ru
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1195950345.4014.15.camel>