[Sugar-devel] GPA School Visit report for Tuesday July 14

Martin Langhoff martin.langhoff at gmail.com
Tue Jul 14 22:14:31 EDT 2009


On Wed, Jul 15, 2009 at 8:35 AM, Greg Smith<gregsmithpm at gmail.com> wrote:
> As I got there I noticed a kid had unplugged their USB before full
> shut down and they were frantically trying to plug it back in while
> errors scrolled on the screen. Still not sure if they lost data (will
> check tomorrow on kid who made the same mistake last week). Is there
> anything we can do to ensure that all data is written/saved ASAP on
> clicking Shut down from the menu?

This is a very valid concern, and very tricky. I've seen lots of
problems with LiveUSB sticks and unclean shutdown.

The short of it is that the scheme behind "LiveUSB", specifically the
"persistent storage" is very brittle, to the point that it can hose
the entire disk badly. The USB stick will only be usable again after
re-formatting and re-installing the SoaS software (losing user data,
etc).

It is a bad combination of

 - Using "rw" overlay mountpoints that only sync every 5s. If the
overlay partition is corrupted, it will prevent the SoaS from booting.

 - Writing on a FAT partition which is notoriously fragile... and
mounted async. Mounting it sync slows things tremendously and wears
the USB stick out much faster.

IIRC, recent kernels have a mount flag for vfat (and maybe other FSs?)
that makes the kernel more eager to flush things to disk, so you can
keep the mountpoint async but reduce the 5s window significantly.

Unfortunately, I can't find it now. It was well reported on LWN and
kernelnewbies a few months ago.

cheers,



m
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - 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