Re: Automatic "fsck -y" at Boot

2011-12-19 Thread Stuart Henderson
On 2011-12-19, Rudolf Leitgeb  wrote:
> Am Montag, 19. Dezember 2011, 13:52:40 schrieb Henning Brauer:
>> gotta compromise for crippled systems. solvable with a little shell
>> script run from cron and rc.shutdown.
>
> Wait: your solution would be to periodically remount some volume
> read/write, merge the changes and then drop back to ro ? You aren't
> serious, are you?

mount -uw /, edit edit edit, mount -ur /. I do this all sorts of places,
have done for 10+ years, it works well.

I still setup serial console wherever I can possibly get it though -
if I have a crashing kernel I want to be able to reach ddb. If I break
routing/IP addressing or miss a necessary syntax change, I want to be
able to fix it.

>> I don't buy the "countless" at all, we're really only talking embedded
>> here, and for embedded style use cases you'll have to adopt. that is
>> the "special" case and not the norm.
>
> Embedded systems with configurable settings are a "special case"? 
> Where were you during the last 10 years?

Embedded is a special case for a general-purpose OS.

How many manufacturers of these devices would even consider using
standard system startup scripts?



Re: Automatic "fsck -y" at Boot

2011-12-19 Thread Christiano F. Haesbaert
On 19 December 2011 11:39, Rudolf Leitgeb  wrote:
> Am Montag, 19. Dezember 2011, 13:52:40 schrieb Henning Brauer:
>> gotta compromise for crippled systems. solvable with a little shell
>> script run from cron and rc.shutdown.
>
> Wait: your solution would be to periodically remount some volume
> read/write, merge the changes and then drop back to ro ? You aren't
> serious, are you?
>

This is *exactly* what these devices do (I'm not guessing).
You don't want a cheap NAND flash with JFS2 mounted rw.

>> for the scenario i had in mind - servers in some data center - that is
>> the one solution.
>
> Agreed. Many posts ago, BTW, so why do you still bring it up? I specifically
> differentiated between devices that "store" and devices that "do".
> Data center servers which have baby sitters in an office nearby don't
> need automagic thingies.
>
>> I don't buy the "countless" at all, we're really only talking embedded
>> here, and for embedded style use cases you'll have to adopt. that is
>> the "special" case and not the norm.
>
> Embedded systems with configurable settings are a "special case"?
> Where were you during the last 10 years?
>
>> while i was mostly talking about a console and not fsck -y, i do
>> believe that an automagic fsck -y is pretty damn stupid.
>
> Guess what your home router does, and what (if you have one)
> your cell phone does? Also your car and your TV set? None of these
> drop you into a console after the 3rd power outage and people
> would laugh you out the door if you tried to sell such a product.
>
>> while we're really good in that and fsck almost always succeeds and
>> fixes things up i have seen different.
>
> And most likely the problems were not caused by fsck but by faulty
> hardware creating the mess to begin with. No serial console can fix
> faulty RAM chips, itchy power supplies or loose SATA cables, so it
> wouldn't help the proud owner of a "do" device one bit.
>
> As I have written before: I don't care whether the default install of OBSD
> comes with "fsck -p" or "fsck -y", but calling people who suggest "fsck -y"
> in certain situations cheapskates and stupid shows blatant ignorance.



Re: Automatic "fsck -y" at Boot

2011-12-19 Thread Henning Brauer
* Rudolf Leitgeb  [2011-12-19 14:40]:
> Am Montag, 19. Dezember 2011, 13:52:40 schrieb Henning Brauer:
> > gotta compromise for crippled systems. solvable with a little shell
> > script run from cron and rc.shutdown.
> Wait: your solution would be to periodically remount some volume
> read/write, merge the changes and then drop back to ro ? You aren't
> serious, are you?

sure I am.

that is how many if not most of these devices work - giant ramdisk,
config data is written back to permanent storage on request or
scheduled. ever wondered why you need to do a "write config" on your
switch? 

> > for the scenario i had in mind - servers in some data center - that is
> > the one solution.
> Agreed. Many posts ago, BTW, so why do you still bring it up? I specifically
> differentiated between devices that "store" and devices that "do".

not in the statements i responded to.

> Data center servers which have baby sitters in an office nearby don't
> need automagic thingies.

you apparently don't have much experience with that...

> > I don't buy the "countless" at all, we're really only talking embedded
> > here, and for embedded style use cases you'll have to adopt. that is
> > the "special" case and not the norm.
> Embedded systems with configurable settings are a "special case"? 
> Where were you during the last 10 years?

you might have missed that openbsd isn't primarily targeted as
embedded OS...

> > while i was mostly talking about a console and not fsck -y, i do
> > believe that an automagic fsck -y is pretty damn stupid.
> Guess what your home router does,

I don't need to guess. I know. It doesn't do fsck -y.

> and what (if you have one) 
> your cell phone does? Also your car and your TV set? None of these
> drop you into a console after the 3rd power outage and people
> would laugh you out the door if you tried to sell such a product.

what is your point again?

openbsd is not an embedded out of the box product, and if you want to
use it as such, you gotta adjust yourself.
 
> > while we're really good in that and fsck almost always succeeds and
> > fixes things up i have seen different.
> And most likely the problems were not caused by fsck but by faulty
> hardware creating the mess to begin with. No serial console can fix 
> faulty RAM chips, itchy power supplies or loose SATA cables, so it 
> wouldn't help the proud owner of a "do" device one bit.

I honestly don't remember wether I ever had a case where fsck -y did
not succeed but the hardware was fine. i dunno.
but you are so focussed on fsck, not me. there are a gazilion things
that can go wrong that require console access.
and yes, the majority of them is a fuckup by a human.

> As I have written before: I don't care whether the default install of OBSD
> comes with "fsck -p" or "fsck -y", but calling people who suggest "fsck -y"
> in certain situations cheapskates and stupid shows blatant ignorance.

i see an interesting pattern here.
1) pick a seemingly simple "solution"
2) getting told that there are better ones, but you prefer to ignore
   that, since you've already chosen 1) and cannot possibly have been
   wrong. 

automagic fsck -y is stupid.

-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/



Re: Automatic "fsck -y" at Boot

2011-12-19 Thread Kevin Chadwick
On Mon, 19 Dec 2011 14:39:42 +0100
Rudolf Leitgeb  wrote:

> Guess what your home router does, and what (if you have one) 
> your cell phone does?

It loses unimportant data.

Hennings points stand. One of the beauties of OpenBSD is it's init
which is easy to follow and edit. To give such a feature to someone
that can't mod /etc/rc would be potentially causing them and people on
the mailing list grief.

To edit /etc/rc someone would think first especially as they will have
to remerge the diff on upgrades later but to twist a knob in a config
file, often they don't.



Re: Automatic "fsck -y" at Boot

2011-12-19 Thread Rudolf Leitgeb
Am Montag, 19. Dezember 2011, 13:52:40 schrieb Henning Brauer:
> gotta compromise for crippled systems. solvable with a little shell
> script run from cron and rc.shutdown.

Wait: your solution would be to periodically remount some volume
read/write, merge the changes and then drop back to ro ? You aren't
serious, are you?

> for the scenario i had in mind - servers in some data center - that is
> the one solution.

Agreed. Many posts ago, BTW, so why do you still bring it up? I specifically
differentiated between devices that "store" and devices that "do".
Data center servers which have baby sitters in an office nearby don't
need automagic thingies.

> I don't buy the "countless" at all, we're really only talking embedded
> here, and for embedded style use cases you'll have to adopt. that is
> the "special" case and not the norm.

Embedded systems with configurable settings are a "special case"? 
Where were you during the last 10 years?

> while i was mostly talking about a console and not fsck -y, i do
> believe that an automagic fsck -y is pretty damn stupid.

Guess what your home router does, and what (if you have one) 
your cell phone does? Also your car and your TV set? None of these
drop you into a console after the 3rd power outage and people
would laugh you out the door if you tried to sell such a product.

> while we're really good in that and fsck almost always succeeds and
> fixes things up i have seen different.

And most likely the problems were not caused by fsck but by faulty
hardware creating the mess to begin with. No serial console can fix 
faulty RAM chips, itchy power supplies or loose SATA cables, so it 
wouldn't help the proud owner of a "do" device one bit.

As I have written before: I don't care whether the default install of OBSD
comes with "fsck -p" or "fsck -y", but calling people who suggest "fsck -y"
in certain situations cheapskates and stupid shows blatant ignorance.



Re: Automatic "fsck -y" at Boot

2011-12-19 Thread Kevin Chadwick
On Mon, 19 Dec 2011 13:52:40 +0100
Henning Brauer wrote:

> while we're really good in that and fsck almost always succeeds and
> fixes things up i have seen different.

Same here, though I have to admit when there are lots to go through, I
can't rememeber not doing an fsck -y. Usually the datas not that
important and you can fix it up after (put the odd email back if
needed etc..)

Sync mounts should increase your chances too.



Re: Automatic "fsck -y" at Boot

2011-12-19 Thread Henning Brauer
* Rudolf Leitgeb  [2011-12-19 10:17]:
> Am Freitag, 16. Dezember 2011, 21:49:18 schrieb Henning Brauer:
> > in these cases - where "runs" is the top priority and manual
> > intervention is hard - you most probably want to run with ro / and an
> > mfs or three.
> This is one nice approach but doesn't cover features like user changeable
> settings and parameters, much less local error logs.

gotta compromise for crippled systems. solvable with a little shell
script run from cron and rc.shutdown.

> > this is still a bit like "fixing" holey condoms with duct tape.
> You fixed the holey condoms issue by replacing them with 5mm thick kevlar. 
> Your solution is certainly very l33t, but only few will want to use it ;)

for the scenario i had in mind - servers in some data center - that is
the one solution.

> There are, however, countless situations where "fsck -y" or similar is the
> most workable solution, and attacking people who use "fsck -y" after
> careful consideration as irresponsible cheapskates is neither helpful nor
> professional.

I don't buy the "countless" at all, we're really only talking embedded
here, and for embedded style use cases you'll have to adopt. that is
the "special" case and not the norm.
while i was mostly talking about a console and not fsck -y, i do
believe that an automagic fsck -y is pretty damn stupid.

> Of all the experts here: how many of you have ever intervened in a failed 
> "fsck -p" situation with anything else than an fsck and a barrage of "y" ?

while we're really good in that and fsck almost always succeeds and
fixes things up i have seen different.

-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/



Re: Automatic "fsck -y" at Boot

2011-12-19 Thread Rudolf Leitgeb
Am Freitag, 16. Dezember 2011, 21:49:18 schrieb Henning Brauer:
> in these cases - where "runs" is the top priority and manual
> intervention is hard - you most probably want to run with ro / and an
> mfs or three.

This is one nice approach but doesn't cover features like user changeable
settings and parameters, much less local error logs.

> this is still a bit like "fixing" holey condoms with duct tape.

You fixed the holey condoms issue by replacing them with 5mm thick kevlar. 
Your solution is certainly very l33t, but only few will want to use it ;)

I agree that there are lots of situations where an automated fsck -y in the
boot scripts is a bad idea (think of faulty RAM on a file server). I also agree
that it's a good idea to use "fsck -p" as the safe default on a fresh install.

There are, however, countless situations where "fsck -y" or similar is the
most workable solution, and attacking people who use "fsck -y" after
careful consideration as irresponsible cheapskates is neither helpful nor
professional.

Of all the experts here: how many of you have ever intervened in a failed 
"fsck -p" situation with anything else than an fsck and a barrage of "y" ?



Re: Automatic "fsck -y" at Boot

2011-12-18 Thread Илья Шипицин
how "fsck -p -y" will work?

manual says "-p" quits on major problem, will "-y" make it assume
"yes" or just quit?

2011/12/15 Kenneth R Westerback :
> On Thu, Dec 15, 2011 at 09:55:47AM +0100, Sebastien Maerker, Continum wrote:
>> Hello,
>>
>> it is possible, like in FreeBSD, to do an automatic "fsck -y" at boot time
>> when
>> the system hangs and need user intervention?
>>
>> In FreeBSD we have the possibility to edit the rc.conf and adding just these
>> lines:
>> ...
>> background_fsck="NO"
>> fsck_y_enable="YES"
>> fsck_y_flags=""
>> ...
>>
>> Is there in OpenBSD such a similar thing?
>>
>> Thank you in advance
>> SC)bastien Maerker
>>
>
> You can change the 'fsck -p' in /etc/rc to whatever varient you wish. There
> is, to my knowledge, no knob.
>
>  Ken



Re: Automatic "fsck -y" at Boot

2011-12-16 Thread Henning Brauer
* Rudolf Leitgeb  [2011-12-16 10:50]:
> Am Freitag, 16. Dezember 2011, 10:26:27 schrieb Henning Brauer:
> > there is no solution but a proper remote console access, i. e. cereal.
> > it is completely beyond me why some people accept anything else.
> > yes yes, some/many providers don't offer any. so pick one that does.
> > you don't buy condoms with holes either, no matter how cheap.
> Some devices are embedded devices and placed in environments 
> where remote access from the outside is not an option.

in these cases - where "runs" is the top priority and manual
intervention is hard - you most probably want to run with ro / and an
mfs or three.

  $ mount
/dev/wd0a on / type ffs (local, read-only)
mfs:17968 on /tmp type mfs (asynchronous, local, noatime, nodev, noexec, 
nosuid, size=19456 512-blocks)
mfs:28804 on /var type mfs (asynchronous, local, noatime, nodev, noexec, 
nosuid, size=38912 512-blocks)
mfs:5076 on /dev type mfs (asynchronous, local, noatime, noexec, nosuid, 
size=2048 512-blocks)

this is still a bit like "fixing" holey condoms with duct tape.

-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/



Re: Automatic "fsck -y" at Boot

2011-12-16 Thread Henning Brauer
* Stefan Beke  [2011-12-16 10:57]:
> On Fri, Dec 16, 2011 at 10:26, Henning Brauer  wrote:
> > it is completely beyond me why some people accept anything else.
> Because it fits their needs.

util something breaks and trey notice that they're doomed and whine,
yes.

> Sometimes would be preferable just to force fix of all inode errors
> and then continue booting.

as if an fsck would be the only case that ever required manual
intervention.

> > yes yes, some/many providers don't offer any. so pick one that does.
> Traveling to serverhousing twice a year was cheaper in my scenario.

cheap cheap cheap cheap cheap
sure, if you give shit about availability (pregnancy, diseases) use
remote servers without console access (holey condoms). but don't blame
anybody but yourself then.

> > you don't buy condoms with holes either, no matter how cheap.
> Not good analogy. But then, analogy is never good. This one has
> especially big holes in it.

it is actually excellent, you just don't like it. the bitten...

-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/



Re: Automatic "fsck -y" at Boot

2011-12-16 Thread Kevin Chadwick
On Fri, 16 Dec 2011 10:49:22 +0100
Rudolf Leitgeb  wrote:

> There are setups where the stored data is the most important thing
> and there are setups where the task is the most important thing, and
> for the latter ones an automatic "fsck -y" is the way to go.

Or take advantage of one of OpenBSDs greatest assets of few required
updates and use ro file systems everywhere if you can export the logs
and use memory file systems. Otherwise keep good backups and fsck -y or
use console.



Re: Automatic "fsck -y" at Boot

2011-12-16 Thread Stefan Beke
On Fri, Dec 16, 2011 at 10:26, Henning Brauer  wrote:
> it is completely beyond me why some people accept anything else.

Because it fits their needs. Even if there was remote access, it would
hang till someone would notice and use it.
Sometimes would be preferable just to force fix of all inode errors
and then continue booting.

> yes yes, some/many providers don't offer any. so pick one that does.

Traveling to serverhousing twice a year was cheaper in my scenario.

> you don't buy condoms with holes either, no matter how cheap.

Not good analogy. But then, analogy is never good. This one has
especially big holes in it.



Re: Automatic "fsck -y" at Boot

2011-12-16 Thread Rudolf Leitgeb
Am Freitag, 16. Dezember 2011, 10:26:27 schrieb Henning Brauer:
> there is no solution but a proper remote console access, i. e. cereal.
> it is completely beyond me why some people accept anything else.
> yes yes, some/many providers don't offer any. so pick one that does.
> you don't buy condoms with holes either, no matter how cheap.

Some devices are embedded devices and placed in environments 
where remote access from the outside is not an option. Of the many
times I have seen computers requiring a manual file system check after a
crash or power outage, I have never seen a device that would not
fix its file system after someone mindlessly pressed "y" a gazillion times.

There are setups where the stored data is the most important thing
and there are setups where the task is the most important thing, and
for the latter ones an automatic "fsck -y" is the way to go.



Re: Automatic "fsck -y" at Boot

2011-12-16 Thread Henning Brauer
there is no solution but a proper remote console access, i. e. cereal.
it is completely beyond me why some people accept anything else.
yes yes, some/many providers don't offer any. so pick one that does.
you don't buy condoms with holes either, no matter how cheap.

* Stefan Beke  [2011-12-16 09:51]:
> I guess I understand what Sebastien is talking about. I used to make
> trips to my cheap serverhosting after power failure too :).Just to
> type Y,  yes repair those blocks, while system was hanging at boot.
> Not very pleasant experience...
> 
> On Fri, Dec 16, 2011 at 03:00, Kenneth R Westerback
>  wrote:
> > On Thu, Dec 15, 2011 at 03:42:19PM +, Kevin Chadwick wrote:
> >> On Thu, 15 Dec 2011 08:29:40 -0500
> >> Kenneth R Westerback wrote:
> >>
> >> > >
> >> >
> >> > You can change the 'fsck -p' in /etc/rc to whatever varient you wish. 
> >> > There
> >> > is, to my knowledge, no knob.
> >>
> >> You probably realise but be aware you can lose data with fsck -y but
> >> only on writable filesystems?
> >>
> >
> > I sell rope in my spare time. :-)
> >
> >  Ken
> 

-- 
Henning Brauer, h...@bsws.de, henn...@openbsd.org
BS Web Services, http://bsws.de, Full-Service ISP
Secure Hosting, Mail and DNS Services. Dedicated Servers, Root to Fully Managed
Henning Brauer Consulting, http://henningbrauer.com/



Re: Automatic "fsck -y" at Boot

2011-12-16 Thread David Coppa
On Fri, Dec 16, 2011 at 9:49 AM, Stefan Beke  wrote:
> I guess I understand what Sebastien is talking about. I used to make
> trips to my cheap serverhosting after power failure too :).Just to
> type Y,  yes repair those blocks, while system was hanging at boot.
> Not very pleasant experience...

Proposed this some time ago:

http://marc.info/?l=openbsd-misc&m=132074722530672

ciao,
David



Re: Automatic "fsck -y" at Boot

2011-12-16 Thread Stefan Beke
I guess I understand what Sebastien is talking about. I used to make
trips to my cheap serverhosting after power failure too :).Just to
type Y,  yes repair those blocks, while system was hanging at boot.
Not very pleasant experience...

On Fri, Dec 16, 2011 at 03:00, Kenneth R Westerback
 wrote:
> On Thu, Dec 15, 2011 at 03:42:19PM +, Kevin Chadwick wrote:
>> On Thu, 15 Dec 2011 08:29:40 -0500
>> Kenneth R Westerback wrote:
>>
>> > >
>> >
>> > You can change the 'fsck -p' in /etc/rc to whatever varient you wish. There
>> > is, to my knowledge, no knob.
>>
>> You probably realise but be aware you can lose data with fsck -y but
>> only on writable filesystems?
>>
>
> I sell rope in my spare time. :-)
>
>  Ken



Re: Automatic "fsck -y" at Boot

2011-12-15 Thread Kenneth R Westerback
On Thu, Dec 15, 2011 at 03:42:19PM +, Kevin Chadwick wrote:
> On Thu, 15 Dec 2011 08:29:40 -0500
> Kenneth R Westerback wrote:
> 
> > > 
> > 
> > You can change the 'fsck -p' in /etc/rc to whatever varient you wish. There
> > is, to my knowledge, no knob.
> 
> You probably realise but be aware you can lose data with fsck -y but
> only on writable filesystems?
> 

I sell rope in my spare time. :-)

 Ken



Re: Automatic "fsck -y" at Boot

2011-12-15 Thread Kevin Chadwick
On Thu, 15 Dec 2011 08:29:40 -0500
Kenneth R Westerback wrote:

> > 
> 
> You can change the 'fsck -p' in /etc/rc to whatever varient you wish. There
> is, to my knowledge, no knob.

You probably realise but be aware you can lose data with fsck -y but
only on writable filesystems?



Re: Automatic "fsck -y" at Boot

2011-12-15 Thread Kenneth R Westerback
On Thu, Dec 15, 2011 at 09:55:47AM +0100, Sebastien Maerker, Continum wrote:
> Hello,
> 
> it is possible, like in FreeBSD, to do an automatic "fsck -y" at boot time
> when
> the system hangs and need user intervention?
> 
> In FreeBSD we have the possibility to edit the rc.conf and adding just these
> lines:
> ...
> background_fsck="NO"
> fsck_y_enable="YES"
> fsck_y_flags=""
> ...
> 
> Is there in OpenBSD such a similar thing?
> 
> Thank you in advance
> SC)bastien Maerker
> 

You can change the 'fsck -p' in /etc/rc to whatever varient you wish. There
is, to my knowledge, no knob.

 Ken



Automatic "fsck -y" at Boot

2011-12-15 Thread Sebastien Maerker, Continum
Hello,

it is possible, like in FreeBSD, to do an automatic "fsck -y" at boot time
when
the system hangs and need user intervention?

In FreeBSD we have the possibility to edit the rc.conf and adding just these
lines:
...
background_fsck="NO"
fsck_y_enable="YES"
fsck_y_flags=""
...

Is there in OpenBSD such a similar thing?

Thank you in advance
SC)bastien Maerker