Issue
when running "mount -a" on a production system (Centos 7), I'm getting return code 64
try:
subprocess.check_call(["mount", "-a"])
except subprocess.CalledProcessError as e:
raise Exception("Failed to run mount command. error:%s", str(e))
The following are logs:
raise Exception("Failed to run mount command. error:%s", str(e))
Exception: ('Failed to run mount command. error:%s', "Command '['mount', '-a']' returned non-zero exit status 64")
What does exit code 64 mean?
Solution
It means some filesystems failed to mount but others succeeded.
From mount(8) manual:
RETURN CODES
mount has the following return codes (the bits can be ORed):
0 success
1 incorrect invocation or permissions
2 system error (out of memory, cannot fork, no more loop devices)
4 internal mount bug
8 user interrupt
16 problems writing or locking /etc/mtab
32 mount failure
64 some mount succeeded
The command mount -a returns 0 (all succeeded), 32 (all failed), or 64 (some failed, some
succeeded).
Answered By - Nathan Mills Answer Checked By - David Marino (WPSolving Volunteer)