Re: bus error when disk is full, with mmap & sparse file
Tobias Oetiker <[email protected]> Thu, 2 Feb 2012 07:22:28 +0100 (CET)
| Newsgroups | gmane.comp.db.rrdtool.devel |
|---|---|
| Message-ID | <alpine.DEB.2.00.1202020716410.32228__4781.77201371199$1328163761$gmane$org@johan.oetiker.ch> |
Hi Richard, Yesterday Richard Laager wrote: > I stumbled across this thread: > http://permalink.gmane.org/gmane.comp.db.rrdtool.devel/4102 > > I've attached a patch that uses fallocate(), which may address this > issue. Also, it should be faster than filling the file with zeros from > userspace and may also decrease file fragmentation. I've only lightly > tested the patch. > > Sorry my reply isn't threaded properly. I couldn't find an mbox-format > archive to use for replying. thanks for your patch ... I am a bit torn here: * with the patch, we get performance and a sort of thin provisioning (files with holes). * without the patch rrdtool lives up to the promise of never running out of diskspace ... (with the patch, rrdtool would not crash but it would still run out of diskspace.) maybe this 'creating files with holes' should be an optional feature, available if rrdtool is compiled with fallocate ? cheers tobi -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland http://it.oetiker.ch [email protected] ++41 62 775 9902 / sb: -9900