I’m assuming you want as-close-to-100%-ocaml as possible, in which case, I know of nothing. But if you’re willing to wrapper C++, you might want to look at the “recordio” code at the bottom of leveldb. It’s … well-designed and -implemented. And does what you asked for (in addition to more).
Neither of the Irmin file-system backends (irmin-fs and irmin-pack) currently fsync to disk, but we have an open issue to add an option for this in irmin-pack.
This would likely not be difficult, as the work has already been done in mirage/index, which forms the core of the irmin-pack backend. We’d need to lift the with_fsync option to the sync function on the Pack.S signature. Contributions are very welcome.
Perhaps you’re asking “is there a durable fsync’ed database accessible from Ocaml?” If so (and setting aside stuff like ODBC drivers, on the assumption that you’re looking for something single-process) I’d suggest leveldb/rocksdb, as well as sqlite. I don’t know about sqlite, but for sure the former two do the job right.