[Sugar-devel] [PATCH 0/7] datastore: handle ENOSPC gracefully

Martin Langhoff martin.langhoff at gmail.com
Fri Sep 21 11:36:18 EDT 2012


On Thu, Sep 20, 2012 at 11:55 PM, Martin Langhoff <martin at laptop.org> wrote:
> In conditions of very low disk space available, or ENOSPC, the datastore
> misbehaves grossly:

Reviews are boring. Testing is more fun! rpms for ARM at

   http://dev.laptop.org/~martin/ds-enospc/

How to test:

 - Set Sugar to verbose debugging
 - Make sure sugar logs are not on /, add a file in /etc/statetab.d
containing "/home/olpc/.sugar/default/logs"
 - use "dd if=/dev/zero of=/bigfile bs=1M count=<numberofmegs>" to
fill up your disk

I usually create one large file to put the system where it has little
disk space remaining, then add/remove smaller files to tighten the
free space further, or to push all the way to ENOSPC. This is faster
than recreating a very large file everytime.

The datastore.org will be telling you whether we are using tmpfs for
the index, when a rebuild is triggered, ENOSPC is hit, etc.

It is also interesting to monitor the presence of two "clean" markers
in the datastore dir, ds_clean and index_updated. You can use
inotifywatch -e create -e delete /home/olpc/.sugar/default/datastore

cheers,


m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- Software Architect - OLPC
 - ask interesting questions
 - don't get distracted with shiny stuff  - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff


More information about the Sugar-devel mailing list