【问题标题】:mount returns non-zero exit code 64mount 返回非零退出代码 64
【发布时间】:2020-09-16 12:12:10
【问题描述】:

在生产系统(Centos 7)上运行“mount -a”时,我得到返回码 64

try:
    subprocess.check_call(["mount", "-a"])
except subprocess.CalledProcessError as e:
    raise Exception("Failed to run mount command. error:%s", str(e))

以下是日志:

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")

退出代码 64 是什么意思?

【问题讨论】:

  • 检查man mount 的返回码。

标签: python centos subprocess centos7


【解决方案1】:

这意味着一些文件系统未能挂载,但其他文件系统成功。

来自mount(8) manual

返回代码

   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).

【讨论】:

    猜你喜欢
    • 2016-07-03
    • 1970-01-01
    • 1970-01-01
    • 2019-02-25
    • 2016-11-30
    • 1970-01-01
    • 2015-07-02
    • 2014-10-10
    • 2020-02-19
    相关资源
    最近更新 更多