systemd questions

Lennart Poettering mzerqung at 0pointer.de
Thu May 19 18:25:11 UTC 2011


On Thu, 19.05.11 19:37, Tomasz Torcz (tomek at pipebreaker.pl) wrote:

> > > > This is not the case and never has been the case. The root disks
> > > > traditionally could not be unmounted and hence MD/DM/MP and so on could
> > > > not be disassembled before going down.
> > > > 
> > > > Delaying shutdown by 30s is hack, not a fix for a race.
> > > 
> > > What race are we talking about exactly ?
> > 
> > Host requests power down from UPS in 30s. Host then continues shut
> > down. If the host now ends up taking more time then expected for
> > shutting down it might still be busy at the time of the power going
> > away. It's a race between "UPS powering off" and "system finishing
> > shutdown". It's a bet that your system is faster than 30s when
> > unmounting the remaining file systems, syncing the MD/DM metadata to
> > disk, syncing ATA and so on (i.e. all the stuff the kernel does when you
> > invoke the reboot() syscall).
> 
>   reboot() do not seem to be wise choice.  After 30s pass, computer
> may be in the middle of boot are even be fully restarted.  UPS terminating
> power then would made mess it should prevent.

reboot() is just the name of the syscall, that halts or reboots the
machine or turns off power. The argument to that syscall specifies what
to do. See reboot(2) for more information.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the devel mailing list