You are not logged in.
I was worried when approximately one minute after pacman completed upgrading some packages my zone had a power outage. As things are still working, I think my XFS file system had enough time to flush data to disk by its own (if pacman does nothing to ensure persistence). Does pacman issue fsync() for the files it writes? Or a at least a sync() after completion?
Offline
Not a sys admin topic, moving to pacman discussion.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
If I remember correctly, it doesn't do that. For pacman 5.0 there should be a sync hook available
https://github.com/andrewgregory/pachooks/
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Afaik it doesn't by default, but as of pacman 5 can be easily made to do so, see
man alpm-hooks
(the example being literally what you are asking for even)
Edit: I should press the preview button more before posting
Last edited by V1del (2016-02-03 11:30:14)
Offline
Thanks. I will take a look.
I still think this should be in pacman's code. fsync() on every file is expensive, but a sync() after completion would be doable, enabled by an option in /etc/pacman.conf (SyncOnCompletion or so). There is also syncfs() (kernel 2.6.39+/glibc 2.14+) to sync only selected mount points.
Offline
I still think this should be in pacman's code. fsync() on every file is expensive, but a sync() after completion would be doable
I think you are confusing two things. The hooks run either prior to or after the complete transaction instead of after each package (that is what the install files are for). So, you can easily run sync after every complete pacman transaction/session.
Anyway, take a look at the link progandy gave. And take a look at sync.hook in particular.
E: Formatting
Last edited by runical (2016-02-03 11:54:41)
Offline
Yes, I know that. My english is not the best, sorry.
It should be in pacman's code because data integrity is IMO priority number one for package managers: http://article.gmane.org/gmane.comp.fil … eral/62090
Offline
It can be handled by a hook, so will not be added to pacman.
Offline