4 ms·
I've never had issues with a plain old "reboot" on systemd machines... just curious, why you would need to force it?
by nubinetwork 3y ago
I've never had issues with a plain old "reboot" on systemd machines... just curious, why you would need to force it?
- dharmab 3y agoMain reason I can think of is you are a kernel developer and you have broken your own kernel in such a way that the regular reboot hangs.
- worthless-trash 3y agoSometimes, we break our tools with our tools.
- wink 3y agoCan't tell you the exact reasons but it happens to me once in a while, usually something in the network stack hanging. Laptops usually, so I just long-press the power button to "fix" it.
- rbanffy 3y agoNot for laptops, but, there are machines that don’t have power buttons. Or where the power buttons are somewhere in a warehouse you are not even supposed to know where it is.
- dikei 3y agoI've encountered issue when NFS mount can block regular system reboot when the network connection is broken.
- nubinetwork 3y agoInteresting. I would have figured systemd would have coded around that. (Not that I've tried)
- antiloper 3y agoA process that's stuck on an NFS operation is unkillable, even by a SIGKILL from the root user. So any shutdown/reboot procedure that has a "kill all processes" step will be unable to complete (unless it has a timeout). It sounds like systemctl --force --force reboot will just invoke the `reboot` syscall directly and thus avoid this issue.
- znpy 3y agoYeah, that happens when a process is in D state (uninterruptible sleep). This happens for example if the process is waiting for io from a block device that has gone forever, like an nfs mount with a broken connection, but i also remember this happening in a company where somebody had the unfortunate idea of “retrofitting” (I’m using kind words here…) zfs to run on some rhel6 hosts, and it would hang very often (of course… but hey, we get snapshots without paying for a netapp).
- josteink 3y ago> just curious, why you would need to force it? For a regular reboot to work, all file-systems must be able to unmount cleanly. If you for whatever reason have a file-system which have become non-responsive and is “hanging” any process which tries to interact with it, regular “systemctl reboot” and “systemctl reboot -force” may fail to actually trigger a reboot, further preventing you from fixing your issue with the non-responsive file-system. In these cases “systemctl reboot —force —force” is useful. Especially on remote machines you cannot physically power-cycle. I don’t remember the exact specifics beyond that, but this has happened to me and I’ve needed this at least once.
- guilhas 3y agoSometimes systemd does not reboot the pc because of some random service not closing It has happened to me several times on debian, pc accessible by SSH, I try to reboot and it gets stuck