Steele, Gregory F
2003-Sep-29 10:42 UTC
Fsck (presumably e2fsck) returns exit code 127 on an ext3 file sy stem
fsck (Red Hat Enterprise Linux AS 2.1) returns an exit code 127 on an ext3 file system when run from a shellscript started by cron. Here is the pertinent part of the script: ... fsck -p /dev/${BK_SLICE} 1>/dev/null 2>&1 STATUS=$? if [ ${STATUS} -ne "0" ] then echo "${MIR_PID}: file system check of /dev/${BK_SLICE} failed, status = ${STATUS}" >>${LOG} ... This is the message that is logged: 25227: file system check of /dev/sdb3 failed, status = 127 According to the man page for fsck, the exit code should be "the sum of the following conditions": 0 - No errors 1 - File system errors corrected 2 - System should be rebooted 4 - File system errors left uncorrected 8 - Operational error 16 - Usage or syntax error 128 - Shared library error The 127 seems illogical to me because there is nothing in the list for the 32 and 64 bits and it is unlikely that *all* of these errors should occur on a single fsck. When this happens, I re-run the shellscript manually and the fsck succeeds with no problems. Any ideas would be appreciated. greg.steele@ncr.com
Jani Jaakkola
2003-Sep-29 14:53 UTC
Re: Fsck (presumably e2fsck) returns exit code 127 on an ext3 file sy stem
On Mon, 29 Sep 2003, Steele, Gregory F wrote:> fsck (Red Hat Enterprise Linux AS 2.1) returns an exit code 127 on an ext3 > file system when run from a shellscript started by cron. Here is the > pertinent part of the script:> fsck -p /dev/${BK_SLICE} 1>/dev/null 2>&1<CLIP> pehesaari-11:~$ fsck bash: fsck: command not found pehesaari-11:~$ echo $? 127 </CLIP> Value 127 is returned by /bin/sh when the given command is is not found from PATH and it is not a builtin shell command. My guess is, that your cron job is missing /sbin from its PATH: <CLIP> pehesaari-11:~$ /sbin/fsck fsck 1.27 (8-Mar-2002) No devices specified to be checked! pehesaari-11:~$ echo $? 8 </CLIP> - Jani
Seemingly Similar Threads
- When im login the error: "A device attached to the sy stem is not functioning"
- [PATCH] nv50/gallium: small fix for nv50_transfer_rect_m2mf (sy <-> dy)
- wine on non-x86 architectures (presumably silly question)
- rsync/popt/config.log in CVS - presumably an accidental "cvs add"
- Presumably simple question about sorting/ordering