Date: Sat, 26 Apr 2003 18:37:04 +0300 From: Alex Popa <razor@ldc.ro> To: freebsd-current@freebsd.org Subject: newfs for UFS2 problems Message-ID: <20030426153704.GA79458@ldc.ro>
next in thread | raw e-mail | index | archive | help
After an installation of 5.0-RELEASE, I have cvsupped to -current and remade the /var filesystem with newfs. After that, I tried to mount the filesystem on the 4.8 system I also have installed. It mounted fine (read-only), which should not have happened. Of course, I got a panic the moment I tried "ls" in /mnt. Also, dumpfs from -stable got a segmentation fault when trying to view that filesystem. It seems the problem is partly caused by newfs on -current, which does not remove the old UFS1 magic when creating an UFS2 superblock at a different location. This leftover magic is seen by the -stable kernel and therefore used. I don't have enough experience in programming for FreeBSD, but I think sbread() from libufs could be used to recognize an old (UFS1) filesystem and then wipe the old magic before creating an UFS2 filesystem. If anyone is willing to help (give me some pointers or suggesions to what else I should pay attention to), I can try and create a patch. Alex PS: The problem does not appear with the -current dumpfs because libufs in -current seems to check for the UFS2 magic first. PPS: If anyone needs them, I still have the vmcore and debug kernel from a crash of -stable, plus several different backtraces, but since the filesystem is severely corrupted (and incorrectly marked as "clean"), I don't think they are relevant. ------------+------------------------------------------------------- Alex Popa, | "Computer science is no more about computers than razor@ldc.ro| astronomy is about telescopes" -- E. W. Dijkstra ------------+------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030426153704.GA79458>