FreeBSD 8.1: fsck_ufs runs in wdrain then reboots.

Hi Guys,


My server (FreeBSD 8.1 amd64) has been running smoothly for months, I have not made any changes recently. But today I came home to find it had rebooted. After rebooting I found that everything was running very slowly. top showed me that fsck_ufs is running in wdrain mode, that looked suspicious so I googled it and came up with the article below, am I on the right track?

http://www.freebsd.org/cgi/query-pr.cgi?pr=154228


This is a test to show how slowly it is writing:

Code:
$ dd if=/dev/zero of=/usr/test bs=1048576 count=100 
100+0 records in 
100+0 records out 
104857600 bytes transferred in 18.672175 secs (6578245 bytes/sec)
 
It's possible you're hitting the same bug. Looking at the date of the fix it doesn't look like it made it into 8.2-RELEASE so you would have to update to 8-STABLE or wait until 8.3 is released.

Or you could try the patch on your 8.1-RELEASE.
 
Thanks for the quick help :)

I've never patched before, but I'll give it a go, do you have any good links for a how to?

If that doesn't work I'll update to 8-STABLE :)

Thanks again
 
You can do this by hand, it's only one line :e

Keep in mind that the patch in the PR is for HEAD, the first bit of the path is a little different but the rest should be in the same place.
 
Just to confirm, If I may

In /usr/src/sys/geom/journal/g_journal.c

I simply change this:

Code:
        mp = arg;
        for (;;) {
                g_journal_switcher_wokenup = 0;
                error = tsleep(&g_journal_switcher_state, PRIBIO, "jsw:wait",

To this:

Code:
        mp = arg;
                [b]curthread->td_pflags |= TDP_NORUNNINGBUF;[/b]
        for (;;) {
                g_journal_switcher_wokenup = 0;
                error = tsleep(&g_journal_switcher_state, PRIBIO, "jsw:wait",
 
My /usr/src is empty. If I try to install the tree through sysinstall the OS crashes before it can finish.

I am going to try copying /usr/src/ from another 8.1 installation, are there any tricks I should know about?
 
You can get the source with csup(1) too.

Just copy /usr/share/examples/cvsup/standard-supfile. Change the host and set the tag to RELENG_8_1 to get the source for 8.1-RELEASE.

# csup standard-supfile will then get the sources.
 
I have copied the /usr/src from another installation and applied the patch but it doesn;t seem to have fixed it :(

top shows fsck_ufs starts off switching between nanslp biord snaprd and drainv before settling on wdrain. Then it shuts down.

I'll try csup now.

I'm trying to avoid updating if I can lol


What would be the best log to look at?
 
SirDice said:
If you already have the source, there's no need for csup(1).

... damm

Ok.

Thanks for your help. :)


It looks like I have no choice but to update :( It's very bad practice of me to be so behind I guess, but there are a few programs that I am loath to touch again lol
 
Back
Top