FreeBSD on USB Flash: root remount from RW to RO takes 3 minutes

Hello, everybody!

I've installed freebsd FreeBSD on a USB stick, root partition mounted as read-only, /var and /tmp are mounted as md. Sometimes I need to mount root for writing, and then, when I call [CMD=""]mount -o ro /[/CMD] the server hangs for three minutes: sshd, named, and other network services are not responding, commands in other consoles are frozen too.

I've tried turning off softupdates, forcing mount with the -f option, single user mode - nothing helps.

[CMD=""]fstat[/CMD] doesnt show any read-write opened files on the root partition.

Does anyone knows how to fix it or what else I can try or check? I have FreeBSD 8.3.
 
Hi,

there are two ways:
1, easy - downgrade to 8.2-RELEASE
2, apply this patch - it's for pfsense distro and I have not yet tried it on FreeBSD, but I believe it will work.

On the second harder way you will have to change sysctl(8) variable 'vfs.forcesync'. I think.
 
and then, when I call
mount -o ro /
1. When do you call this?
2. You of course mean
# mount -o [FILE][b]rw[/b][/FILE] /
3. Try temporarily changing the entry in /etc/fstab to rw and see what happens.
 
Beeblebrox said:
1. When do you call this?
2. You of course mean
# mount -o [FILE][b]rw[/b][/FILE] /
3. Try temporarily changing the entry in /etc/fstab to rw and see what happens.


I think you get it wrong. Egor meant this:
When you open read only file system to write, write something, and close it back to read only...
# mount -o rw /
# echo "test" >/some_file_in_root_fs
# mount -o ro /

The last step is processing long time (circa 30 - 600 seconds - according to used medium). And every services what need reading from disk don't work. This problem has appeared in FreeBSD 8.3-RELEASE.
 
kpa said:
Does this have something to with UFS SU+J? Or is not available on 8.3?

I am not sure if I understand your questions, despite this I will try to answer.

1, No, this thread isn't about a SoftUpdate or/and a Journal.
2, Also I think the problem (topic of this thread) doesn't have solving in the SoftUpdate or in the Journal.
3, The SoftUpdate and the Journal are available on the 8.3-RELEASE, but it isn't the subject of this topic.
4, The problem was come with the 8.3-RELEASE, In the 8.2-RELEASE is working the remounting all right.
 
SirDice said:
Bad advice. FreeBSD 8.2 is end-of-life. It's not supported anymore.

But just only one useful. 8.3-RELEASE-p8 still has same problem and uncommented "patch" looks little bit dangerous.

The problem isn't only time. It brings next worse problems: Some service doesn't answer (SSH, OpenVPN, MySQL) during a system making remount to 'ro'; When you manage the system on very long distance you could feel weak heart attack while you waiting to done it.
 
This is a 5 year old thread. The PR refers to now out of date versions.
 
Back
Top