[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rebooting with systemd wedged

From: Bob Proulx
Subject: Re: Rebooting with systemd wedged
Date: Tue, 2 May 2023 23:19:49 -0600

Andrew Engelbrecht wrote:
> Bob Proulx wrote:
> >      echo 1 >/proc/sys/kernel/sysrq
> >      echo s >/proc/sysrq-trigger
> >      echo b >/proc/sysrq-trigger
> If the server is doing anything other than hosting static data, it might
> make sense to try killing important processes, or sending them commands
> to exit gracefully, so they can write out any data to disk before they
> die. I'm thinking mostly about processes like SQL servers.

If the system were running a database then by all means try to
shutdown the database first.  But it _should_ survive a power outage
in most cases anyway.  But why chance it if there is the possibility
to avoid it?

In this case that wasn't a problem though.  No database server on this
system.  In this case just needed to trigger a reboot so that things
could get back on track again.

>  > And of course shutdown and reboot both call systemctl now.  Could not
>  > reboot it normally it since systemd is in charge of the reboot and
>  > systemd is not responding.  Isn't systemd just such a wonderful
>  > system?
> ... unless systemd gobbles up the kill command too... As much as I like
> systemd, I hope not. : P

If you are asking about "systemctl stop mariadb.service" then that
would not have worked.  Since all systemctl commands were failing.

But one could dig through the systemd service units and see what it
does to stop the process and then do the same thing.  I gave a quick
browse through /lib/systemd/system/mariadb.service and it was not
immediately apparent to me though.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]