USB, Persistant file system corruption

Description

I am making a batch of LiveUSB disks created with Unetbootin and using the "persistence" option. I have found that I get file system corruption when using the Desktop osgeo-halt icon to shutdown immediately after saving a new file. If I wait a few moments (> 1 min) this does not occur.
If I shutdown using the usual shutdown in the top panel (under User's name) and *wait for the 30 sec timeout*, the file system stays intact. But using the Desktop shutdown icon, whatever directory I saved a file in becomes inaccessible on the next boot.

--
Micha

Oldest firstNewest firstThreaded

Show commentsShow property changes

Change history (4)

I am making a batch of LiveUSB disks created with Unetbootin and using the
"persistence" option. I have found that I get file system corruption when using
the Desktop osgeo-halt icon to shutdown immediately after saving a new file.
If I wait a few moments (> 1 min) this does not occur.
If I shutdown using the usual shutdown in the top panel (under User's name) and
*wait for the 30 sec timeout*, the file system stays intact. But using the Desktop
shutdown icon, whatever directory I saved a file in becomes inaccessible on the
next boot.

try adding sync near the start of /etc/init.d/umountfs (or has ubuntu upstart'd that?)

the disk cache in linux defaults to waiting a maximum of 30 seconds before writing data to the disk. see /proc/sys/vm/dirty_expire_centisecs

(actually for full safety wait >35 sec just to be sure pdflush has run)

running sync makes it write out everything immediately and not wait for the timeout.

probably should be filed upstream in launchpad as an ubuntu bug. (if not there already)