作者m8403051 (大吉嶺紅茶)
看板Linux
標題[問題] Docker-CE 檔案損毀
時間Tue May 9 16:48:00 2017
之前使用都沒注意到, 是最近在跑個 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 沒有相同問題
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 101.15.33.197
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1494319684.A.EE7.html
→ m8403051: 這篇文章提到相關的東西有 kernel version xfs overlay 05/10 12:57
→ m8403051: 我確認過 kernel 是 3.10.0, 因此朝 xfs 下手 05/10 12:58
→ m8403051: 新增一個 ext4 partition, 掛載 /var/log/docker 05/10 12:59
→ m8403051: 這個問題就消失了, 還在測試是否有其他問題 05/10 12:59
推 Hevak: 推自問自答有補解答 05/11 12:53
推 ddtsatan: 推 05/11 18:32