We had some trouble with our FreeBSD systems over the holiday shutdown a few weeks ago. Our backup generator didn’t kick in during an extended power outage, and our UPS’s didn’t provide enough runtime to see us through. Result: all our systems crashed. (Before anybody mentions it… Yes, I know I should have installed NUT and configured our network to shutdown in such cases.)
When I got to the office and started powering systems back up, I noticed the expected messages about the filesystems not being dismounted properly. After all the systems were up, I went back around and started logging in to survey the damage. Here’s an example of what happened when I tried to run fsck on one of our filesystems:
# fsck -y /tmp ** /dev/twed0s1e (NO WRITE) ** Last Mounted on /tmp ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity . . .
I had never seen “(NO WRITE)” show up on fsck before. A little searching turned up this post which explains that (NO WRITE) means the filesystem is mounted, thus fsck cannot write to it. I went back and rebooted each system into single-user mode. Then I was able to fsck all the local filesystems and reboot cleanly.
# init 1 # fsck -y -t ufs # reboot