[Bio-linux-dev] Corruption of persistent filesystem on USB-stick

Tony Travis tony.travis at abdn.ac.uk
Fri Mar 28 06:35:43 EDT 2014


On 18/03/14 11:23, Tony Travis wrote:
> On 18/03/14 11:02, Tim Booth wrote:
>> [...]
>> I think it should be reasonably easy to combine the versions and make a
>> usb-maker that can handle either partitioning or loopback.  Given the
>> 4GB size limitation for FAT 32 and that we now have a nice batch of 8GB
>> sticks I'll probably need to do this anyway, regardless of the
>> corruption issue.

Hi, Tim.

I've added code to partition the sticks and use "sync ; sync" to make
sure all writes are flushed to the sticks properly. The second "sync" is
redundant but will not start until the first one finishes, so you know
all pending writes have been flushed to disk properly.

There's a lot of misinformation out there on the Internet about using
"sync ; sync" which, traditionally, is part of the Unix mantra "sync ;
sync ; halt". However, it does work and it is a rational alternative to
using "sleep" hoping that you have waited long enough for writes to be
flushed to disk...

The USB-sticks I've created using "bio-linux-usb-maker_new" work well
and do not corrupt their "casper-rw" filesystem. I've adopted your 3%
wriggle-room in this version, which gives more space for persistence.

HTH,

  Tony.

--
Dr. A.J.Travis, University of Aberdeen, Institute of Biological and
Environmental Sciences, Cruickshank Building, St. Machar Drive, Aberdeen
AB24 3UU, Scotland, UK. tel +44(0)1224 272700, fax +44 (0)1224 272 396
http://www.abdn.ac.uk, mailto:tony.travis at abdn.ac.uk, skype:ajtravis
The University of Aberdeen is a charity registered in Scotland, No SC013683.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bio-linux-usb-maker.patch
Type: text/x-patch
Size: 5774 bytes
Desc: not available
URL: <http://www.bioinformatics.org/pipermail/bio-linux-devel/attachments/20140328/b3380873/attachment.bin>


More information about the Bio-linux-devel mailing list