[artix-general] [s6] How to add "sync" before umounting anything on reboot/shut-down?

Javier je-vv at e.email
Wed Mar 24 18:50:38 CET 2021


On 3/24/21 7:47 AM, Dudemanguy wrote:
> ...
> s6-linux-init unmounts filesystems during the shutdown process so a down
> script anywhere in the s6-rc service would run a sync before anything
> gets unmounted. I'm not sure this would actually do anything however as
> there is no guarantee when this sync would be run exactly. A daemon could still be up and write to the disk afterwards.
> 
> A journal recovery is something that shouldn't normally happen though.
> You can get one if you upgrade/reinstall s6 or s6-linux-init (the PID1
> binary gets replaced), but in general it shouldn't happen.

A sync would only make sense just before umounting the file systems, not before, so I guess it wouldn't work.  I was looking for the place where there wouldn't be any more FS accesses, but before umount...

I agree, sync shouldn't be necessary, since clean umount shouldn't need sync before.  I just thought there was a way to help the system make sure there was no pending writes, :)

Thanks !

-- 
Javier

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://lists.artixlinux.org/archives/artix-general/attachments/20210324/11febc8f/attachment.sig>


More information about the artix-general mailing list