Why docker daemon fails to start when docker root is on a EMC powerpath device in Red Hat Enterprise

本文解决了一个特定问题:在Red Hat Enterprise Linux 7中,当Docker根目录位于EMC PowerPath设备上时,Docker守护进程启动失败。通过在systemd中添加依赖项,确保在底层逻辑卷挂载后Docker服务才开始启动,从而解决了此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://access.redhat.com/solutions/3643862

环境

  • Red Hat Enterprise Linux 7
  • docker-1.13.1-75.git8633870.el7_5.x86_64
  • /var/lib/docker is a LV and the underlying PV is a EMC powerpath device
  • OpenShift Container Platform 3.9

问题

  • Why docker daemon fails to start when docker root directory is on a EMC powerpath device in Red Hat Enterprise Linux 7 ?
    From the log messages:

Raw

Oct 08 17:35:27 test dockerd-current[3409]: Error starting daemon: error initializing graphdriver: devmapper: Unable to take ownership of thin-pool (vg_docker-docker--pool) that already has used data blocks

决议

Add a dependency so that docker service wont start until the underlying LV is mounted.

Create a file varlibdocker.conf under /etc/systemd/system/docker.service.d/ directory with the following contents

Raw

[Unit]
RequiresMountsFor=/var/lib/docker

After making the change, reload systemd using the command systemctl daemon-reload

根源

docker daemon was starting early even before the EMC powerpath devices were initialized. Since /var/lib/docker was not mounted, docker daemon will detect an empty /var/lib/docker and tries to initialize as if it was starting for the first time on the system. Due to this, it will not be able to use the existing docker thin pool and fails with the error messagedevmapper: Unable to take ownership of thin-pool (vg_docker-docker--pool) that already has used data blocks

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值