Re: Filesystem corruption on OpenBSD routers after power outage?

2020-03-15 Thread Maurice McCarthy
There is a discussion about sofdeps here http://openbsd-archive.7691.n7.nabble.com/What-are-the-disadvantages-of-soft-updates-td264283.html

Re: Filesystem corruption on OpenBSD routers after power outage?

2020-03-15 Thread jeanfrancois
Good day, I have few questions, why are soft updates not on by default, and does they help consistency in case of failure,  are  they  recom‐ mended  to  be  turned on only in specific case ?  Except my mis‐ take, they help keeping drive consistent, avoid the need for fsck for  most  hard

Sidenote: Filesystem corruption on OpenBSD routers after power outage?

2019-06-18 Thread Kevin Chadwick
> Even after many tries, I have not yet been able to corrupt the > filesystem so fsck cannot repair it without manual intervention. Another less severe corner fail case I have found is that on a couple of buggy 386 laptops (that will be replaced soon anyway) with temperamental over temp

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-17 Thread Theo de Raadt
Ted Unangst wrote: > Theo de Raadt wrote: > > How does sync() fix this? Please explain this. Look at the source > > code. > > > > sync() is an asyncronous call requesting syncronization, and once > > it has marked the blocks that should be pushed, it returns before > > the work has been done.

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-17 Thread Ted Unangst
Theo de Raadt wrote: > How does sync() fix this? Please explain this. Look at the source > code. > > sync() is an asyncronous call requesting syncronization, and once > it has marked the blocks that should be pushed, it returns before > the work has been done. Ah, indeed. > > 2. cp could do

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-17 Thread Theo de Raadt
Ted Unangst wrote: > Mogens Jensen wrote: > > Even after many tries, I have not yet been able to corrupt the > > filesystem so fsck cannot repair it without manual intervention. > > However, if power is removed while the 'reorder_kernel' script runs, > > the system will become completely

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-17 Thread Ted Unangst
Mogens Jensen wrote: > Even after many tries, I have not yet been able to corrupt the > filesystem so fsck cannot repair it without manual intervention. > However, if power is removed while the 'reorder_kernel' script runs, > the system will become completely unbootable. I could do this multiple

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-17 Thread Mogens Jensen
Since posting this question I have been trying to intentionally corrupt the router filesystem, by simulating power outages while writing files and various other things. Even after many tries, I have not yet been able to corrupt the filesystem so fsck cannot repair it without manual intervention.

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-07 Thread Consus
On 19:30 Tue 04 Jun, Mogens Jensen wrote: > I'm going to build a router for use in a remote location, and I have > chosen OpenBSD 6.5 for the task. Unfortunately, it's not possible to > protect the router with an UPS, so it will have to be resilient enough > to survive sudden power outages and

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-06 Thread Tom Smyth
Yeah Marko, this blog did help me when I was resarching the issue ... Cheers, On Thu, 6 Jun 2019 at 10:07, Marko Cupać wrote: > On Tue, 04 Jun 2019 19:30:08 + > Mogens Jensen wrote: > > > Can anyone with experience running OpenBSD routers without UPS, tell > > if filesystem corruption is

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-06 Thread Marko Cupać
On Tue, 04 Jun 2019 19:30:08 + Mogens Jensen wrote: > Can anyone with experience running OpenBSD routers without UPS, tell > if filesystem corruption is going to be a problem after power > outages, or if there are any officially supported ways to make the > system resilient enough to not

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-05 Thread Jan Stary
On Jun 04 19:30:08, mogens-jen...@protonmail.com wrote: > Can anyone with experience running OpenBSD routers without UPS, tell if > filesystem corruption is going to be a problem after power outages I have been using various ALIXes with a CF card as storage, and in the 10+ years, I had to do a

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-05 Thread Kenneth Gober
On Tue, Jun 4, 2019 at 3:34 PM Mogens Jensen wrote: > Can anyone with experience running OpenBSD routers without UPS, tell if > filesystem corruption is going to be a problem after power outages, or > if there are any officially supported ways to make the system resilient > enough to not break

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-05 Thread Federico Giannici
Is there any way to tell the boot script to use the "-y" flag in fsck? If something goes wrong with simple fsck, I always simply do a "fsck -y". There is no other option for me. So, it would be VERY useful if this could be done automatically instead of interrupting the router startup.

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-05 Thread Marc Espie
On Wed, Jun 05, 2019 at 05:12:20AM +, Roderick wrote: > > "-o union" was last in 3.7, disappeared in 3.8. Was there a reason? > > https://man.openbsd.org/OpenBSD-3.7/mount Yes, the developers felt we couldn't make it work without bugs in a sane way. Locks over locks is insanely hard to get

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-04 Thread Otto Moerbeek
On Wed, Jun 05, 2019 at 05:12:20AM +, Roderick wrote: > > "-o union" was last in 3.7, disappeared in 3.8. Was there a reason? It was broken and complicated the filesystem code beyond measure. -Otto > > https://man.openbsd.org/OpenBSD-3.7/mount > > Rodrigo > > > What also would

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-04 Thread Roderick
"-o union" was last in 3.7, disappeared in 3.8. Was there a reason? https://man.openbsd.org/OpenBSD-3.7/mount Rodrigo What also would be practical is a "mount -o union" like in FreeBSD, but unfortunately I do not see it in OpenBSD. Then one could mount a mfs system over a normal one, only

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-04 Thread Roderick
What also would be practical is a "mount -o union" like in FreeBSD, but unfortunately I do not see it in OpenBSD. Then one could mount a mfs system over a normal one, only to be read. Rodrigo

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-04 Thread Roderick
Look at -P option in mount_mfs. Rodrigo

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-04 Thread gwes
On 6/4/19 3:30 PM, Mogens Jensen wrote: I'm going to build a router for use in a remote location, and I have chosen OpenBSD 6.5 for the task. Unfortunately, it's not possible to protect the router with an UPS, so it will have to be resilient enough to survive sudden power outages and still

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-04 Thread Nick Holland
On 6/4/19 1:29 PM, Mogens Jensen wrote: > I'm going to build a router for use in a remote location, and I have > chosen OpenBSD 6.5 for the task. Unfortunately, it's not possible to > protect the router with an UPS, so it will have to be resilient enough > to survive sudden power outages and still

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-04 Thread Tom Smyth
there is also an option for setting fsck to approve fixes without a prompt .. but I cant think of it off the top of my head... and this would be useful to set on your routers also On Tue, 4 Jun 2019 at 21:05, Tom Smyth wrote: > Hi Mogens, > > there are a number of threads on this if you

Re: Filesystem corruption on OpenBSD routers after power outage?

2019-06-04 Thread Tom Smyth
Hi Mogens, there are a number of threads on this if you search the misc archives on marc.info, but setting softdep,noatime mount options on /etc/fstab is advisable for routers I tend to use mfs for partitions that tend to get written to alot the following entries (/etc/fstab) show How I use

Filesystem corruption on OpenBSD routers after power outage?

2019-06-04 Thread Mogens Jensen
I'm going to build a router for use in a remote location, and I have chosen OpenBSD 6.5 for the task. Unfortunately, it's not possible to protect the router with an UPS, so it will have to be resilient enough to survive sudden power outages and still boot without manual intervention. In the past