Matt Smith
2012-Aug-27 09:06 UTC
9.1 RELENG_9 Unable to cleanly dismount root partition on shutdown
I posted on this mailing list two weeks ago and never received any replies so I decided to raise a PR via the web form. But I think I submitted it under the wrong category and it's marked as low priority as well. But I think this is something that is a potential serious problem if I end up getting a corrupted filesystem so I'm posting here again in the hope somebody can help this time. The PR is amd64/170646. I'm now running the latest RELENG_9 code as of 25th August as I've done a new buildworld/kernel. I still get the same problem. When I reboot it I get WARNING: / was not properly dismounted and it rebuilds from journal. On shutdown I get the messages pasted below. I'm running amd64 with GPT partitioning, UFS2 with softupdates and softupdates journalling enabled. I have a custom kernel but I don't think I took anything important out of it. Syncing disks, vnodes remaining...7 7 2 0 0 done All buffers synced. fsync: giving up on dirty 0xfffffe0007102780: tag devfs, type VCHR usecount 1, writecount 0, refcount 2292 mountedhere 0xfffffe000000729ca00 flags (VI(0x200)) v_object 0xfffffe0005101910 ref 0 pages 23509 lock type devfs: EXCL by thread 0xfffffe00018fe08e0 (pid 1) dev label/root umount of / failed (35) Then when the box comes back up again it detects that / was not unmounted cleanly and recovers from journal before marking it clean once more. My uname: FreeBSD tao.xtaz.co.uk 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Sat Aug 25 12:34:52 BST 2012 root@tao.xtaz.co.uk:/usr/obj/usr/src/sys/TAO amd64 My glabel status: Name Status Components gpt/gptboot N/A ada0p1 gptid/bfe99d62-e00f-11e1-8623-00012e475ffb N/A ada0p1 label/root N/A ada0p2 label/swap N/A ada0p3 My fstab: /dev/label/root / ufs rw 1 1 /dev/label/swap none swap sw 0 0 My gpart: => 34 1250263661 ada0 GPT (596G) 34 1024 1 freebsd-boot (512k) 1058 990 - free - (495k) 2048 1228931072 2 freebsd-ufs (586G) 1228933120 21330575 3 freebsd-swap (10G)
Stefan Bethke
2012-Aug-27 09:28 UTC
9.1 RELENG_9 Unable to cleanly dismount root partition on shutdown
Am 27.08.2012 um 11:06 schrieb Matt Smith:> I posted on this mailing list two weeks ago and never received any replies so I decided to raise a PR via the web form. But I think I submitted it under the wrong category and it's marked as low priority as well. But I think this is something that is a potential serious problem if I end up getting a corrupted filesystem so I'm posting here again in the hope somebody can help this time. The PR is amd64/170646. > > I'm now running the latest RELENG_9 code as of 25th August as I've done a new buildworld/kernel. I still get the same problem. When I reboot it I get WARNING: / was not properly dismounted and it rebuilds from journal. On shutdown I get the messages pasted below. I'm running amd64 with GPT partitioning, UFS2 with softupdates and softupdates journalling enabled. I have a custom kernel but I don't think I took anything important out of it. > > Syncing disks, vnodes remaining...7 7 2 0 0 done > All buffers synced. > fsync: giving up on dirty > 0xfffffe0007102780: tag devfs, type VCHR > usecount 1, writecount 0, refcount 2292 mountedhere 0xfffffe000000729ca00 > flags (VI(0x200)) > v_object 0xfffffe0005101910 ref 0 pages 23509 > lock type devfs: EXCL by thread 0xfffffe00018fe08e0 (pid 1) > dev label/root > umount of / failed (35) > > Then when the box comes back up again it detects that / was not unmounted > cleanly and recovers from journal before marking it clean once more.> My fstab: > /dev/label/root / ufs rw 1 1 > /dev/label/swap none swap sw 0 0Is there a particular reason you've decided to glabel your partitions instead of using GPT labels? Which device did you do the newfs on, the GPT partition or the glabel device? My hunch is that the label metadata sector at the end of the GPT partition is interfering with the filesystem. I'd try labelling my partitions (gpart modify -i 2 -l root ada0; gpart modify -i 3 -l swap), then change fstab to reference the gpt labels (dev(gpt/root) instead of the glabel ones. Stefan -- Stefan Bethke <stb@lassitu.de> Fon +49 151 14070811
clay@milos.co.za
2012-Aug-27 09:30 UTC
9.1 RELENG_9 Unable to cleanly dismount root partition on shutdown
On 27.08.2012 10:06, Matt Smith wrote:> I posted on this mailing list two weeks ago and never received any > replies so I decided to raise a PR via the web form. But I think I > submitted it under the wrong category and it's marked as low priority > as well. But I think this is something that is a potential serious > problem if I end up getting a corrupted filesystem so I'm posting > here > again in the hope somebody can help this time. The PR is > amd64/170646. > > I'm now running the latest RELENG_9 code as of 25th August as I've > done a new buildworld/kernel. I still get the same problem. When I > reboot it I get WARNING: / was not properly dismounted and it > rebuilds > from journal. On shutdown I get the messages pasted below. I'm > running > amd64 with GPT partitioning, UFS2 with softupdates and softupdates > journalling enabled. I have a custom kernel but I don't think I took > anything important out of it. > > Syncing disks, vnodes remaining...7 7 2 0 0 done > All buffers synced. > fsync: giving up on dirty > 0xfffffe0007102780: tag devfs, type VCHR > usecount 1, writecount 0, refcount 2292 mountedhere > 0xfffffe000000729ca00 > flags (VI(0x200)) > v_object 0xfffffe0005101910 ref 0 pages 23509 > lock type devfs: EXCL by thread 0xfffffe00018fe08e0 (pid 1) > dev label/root > umount of / failed (35) > > Then when the box comes back up again it detects that / was not > unmounted > cleanly and recovers from journal before marking it clean once more. > > My uname: > FreeBSD tao.xtaz.co.uk 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0: Sat > Aug 25 12:34:52 BST 2012 > root@tao.xtaz.co.uk:/usr/obj/usr/src/sys/TAO amd64 > > My glabel status: > Name Status Components > gpt/gptboot N/A ada0p1 > gptid/bfe99d62-e00f-11e1-8623-00012e475ffb N/A ada0p1 > label/root N/A ada0p2 > label/swap N/A ada0p3 > > My fstab: > /dev/label/root / ufs rw 1 1 > /dev/label/swap none swap sw 0 0 > > My gpart: > => 34 1250263661 ada0 GPT (596G) > 34 1024 1 freebsd-boot (512k) > 1058 990 - free - (495k) > 2048 1228931072 2 freebsd-ufs (586G) > 1228933120 21330575 3 freebsd-swap (10G) >Hi Matt I'm far from anything near an expert on file systems but I'd suggest you remove softupdates and leave journaling on. tunefs -n disable There's no need to have both on and although I agree that both SHOULD work together there's no reason to have them on together. It will only slow down writes to the file system. Effectively soft updates was a go-between before journalin was introduced. //Clay _______________________________________________> freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to > "freebsd-stable-unsubscribe@freebsd.org"