[TriLUG] e2fsck under cron gets retcode=8 operational error

Joseph Mack NA3T jmack at wm7d.net
Tue Sep 18 15:20:05 EDT 2012


On one of my OpenWrt boxes I have a thumbdrive. A script 
takes photos every 5 mins, mounts the thumbdrive, stores the 
photos and umounts the thumbdrive. Every hour I have another 
script check that the thumbdrive is not mounted, then fsck's 
the drive just before it takes the photos. If I run the 
script from the command line, everything runs fine. If it's 
run by cron, then e2fsck gives

ERROR: fsck on /dev/sda4 failed with ret_code 8

code 8 is "operational error, fsck did not complete"

this occurs whether I have `fsck -f` or just plain `fsck`

>From the timing of the error in the logfile, e2fsck fails 
instantly. A real fsck takes about 45secs.

googling gets advice (from IBM) to run the command again. 
Other people haven't found cures for the problem.

Since the script runs fine from the CLI, I'm wondering if 
there's something about running fsck under cron. I execute 
fsck with the pathname (/usr/sbin/e2fsck) so there's no 
problem finding the executable.

Thanks Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!



More information about the TriLUG mailing list