Understanding Data Durability with the fsync System Call in Linux
By
RGBCube
10mo ago· 4 min readenInsight
85/100
Golden Brown
Bagelometer↗
Front-window bakery material. Catches the eye, delivers the goods.
Score85TypeanalysisSentimentneutral
Summary
The article discusses the durability guarantees provided by the fsync system call in Linux, particularly focusing on the potential data loss in mass-market SSDs and HDDs due to volatile write cache. It questions the necessity of enterprise-grade drives with additional power loss protection for ensuring data persistence.
Key quotes
· 3 pulledMany mass-market SSDs and HDDs don't provide sufficient durability guarantees.
If you want any meaningful durability, you should go for enterprise-grade drives that have a battery/capacitor.
Let's check what POSIX.1-2017 specification says about fsync.
What kind of durability guarantees fsync system call provides in Linux? Let's find out.

