Bash script clobbers something vital (lucid)

Colin Law clanlaw at googlemail.com
Sat Nov 19 15:34:51 UTC 2011


On 19 November 2011 14:36, J <dreadpiratejeff at gmail.com> wrote:
> On Sat, Nov 19, 2011 at 03:47, Colin Law <clanlaw at googlemail.com> wrote:
>
>> Have a look in syslog and see what are the first errors that appear
>> there.  No need to get it to fail again for this, you can go back to
>> the previous log, assuming you know when it happened.  Also if you run
>> the disc utilities do you see any errors noted in the SMART data?
>>
>> Are you doing anything else when it fails (plugging/unplugging
>> additional usb devices for example)?
>>
>> Colin
>
> Additionally, when the script gets to the point where it starts trying
> to md5sum things, have all the other operations truly finished?  133GB
> is a lot of data to move, especially over USB.  Are you positive that
> all the data is finished being written to the disks at that point?
> Perhaps adding in something ridiculous like 'sleep 30m' before you
> start the md5sums would point this out.  Since the backup takes 4+
> hours, an extra 30 minutes isn't going to hurt things in the grand
> scheme of things.  Anyway, it's a longshot, but worth considering. Of
> course, 30m is just an arbitrary time, adjust as you see fit.

Are you suggesting that if the data has not been completely written
then trying to read it back will give issues?  That does not make any
sense to me.  If the data is still available in the cache then it will
be read back from their anyway.

This does suggest a possible issue however.  Kevin, does the script do
something after completing the writes to ensure that the md5sum is
read back from the device rather than the cache?  Perhaps it is
accidentally unmounting the device.

Colin




More information about the ubuntu-users mailing list