Skip to content

Comment on Writing systemd units that stop gracefully before shutdownparent

Comments

A "halt -fp" just unmounts file systems and immediately shuts down.

I find that CentOS systems that I've used for a while seem to hang on shutdowns; halt -fp is a way to get them down quickly. It is important to terminate any sensitive processes beforehand.

For systems that hang or take intolerably long to shutdown, I typically do:

     systemctl --force [poweroff|reboot]
From the man page, this means that "shutdown of all running services is skipped, however all processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the powering off."
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.