Docker-CE 檔案損毀 - Linux

Table of Contents

之前使用都沒注意到, 是最近在跑個 nodejs 的專案才發現,
怎麼 export 的 image 在執行會壞掉

環境: Google Cloud Compute Engine
OS CentOS 7 w/ 100G SSD

安裝方式:
依照官網建議, 抓取 repo 檔後使用 yum 安裝
https://store.docker.com/editions/community/ \
docker-ce-server-centos?tab=description
yum -y install docker-ce
service docker restart

安裝完後, 建立 centos:6.8 container 然後 commit 再執行新的 image
docker run -it --name test centos:6.8 /bin/bash
[root@blabla /]# touch /root/1 ; exit
docker commit -m "test1" -a "tester" test test-image
docker run -it --name test2 test-image:latest /bin/bash
[root@blabla2 /]# rm /root/1
[root@blabla2 /]# ls /root
ls: cannot access /root/1: No such file or directory
1 other-files...
^^^^^^^^^^^^^^^^^^ 這邊的 1 就是個壞掉的檔案, 看得到但是不存在
手動操作無所謂, 但是有些套件會判斷錯誤

google docker filesystem broken 之類的字串並沒有看到有人有相同的問題
請問有高手知道這問題在哪嗎?謝謝。

ps. epel 7 內的 docker 沒有相同問題


--

All Comments

Kristin avatarKristin2017-05-11
自問自答: https://github.com/moby/moby/issues/27358
這篇文章提到相關的東西有 kernel version xfs overlay
Mary avatarMary2017-05-11
我確認過 kernel 是 3.10.0, 因此朝 xfs 下手
James avatarJames2017-05-14
新增一個 ext4 partition, 掛載 /var/log/docker
這個問題就消失了, 還在測試是否有其他問題
Oscar avatarOscar2017-05-19
推自問自答有補解答
Rachel avatarRachel2017-05-19