Rhel

在 RHEL 7 上為 /var/lib/docker 使用 Isilon NFS

  • November 12, 2020

RHEL:7.8 碼頭工人:1.13.1

該伺服器由多個團隊共享,我想讓 docker 可用於測試或沙盒,以供那些無法/不會將其安裝在筆記型電腦上的人使用。因為它是共享的,所以映像增長可能會很大,我想將 Isilon NFS 共享掛載​​為 /var/lib/docker。我使用“vfs”作為儲存驅動程序讓它工作,但我認為這是導致以下錯誤的原因:

ERROR: for redis  Cannot create container for service redis: SELinux relabeling of <mount_point>/volumes/1185719ebf09771e9e9641f329c9c57f72792a942c283562f701ece914cca82a/_data is not allowed: "operation not supported"

我看到了嘗試“chcon -Rt svirt_sandbox_file_t <mount_point>”的建議,但我得到了相同的“不支持操作”錯誤。

其他人有這個工作嗎?我走錯方向了嗎?

我通過解除安裝 RHEL docker 並從 docker.com 安裝 docker 19.03.13 解決了這個問題。對於那些好奇的人:

[root@oitleap01 ~]# docker info
Client:
Debug Mode: false

Server:
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 19.03.13
Storage Driver: devicemapper
 Pool Name: docker-0:61-7297578891-pool
 Pool Blocksize: 65.54kB
 Base Device Size: 10.74GB
 Backing Filesystem: xfs
 Udev Sync Supported: true
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data loop file: /net/oitfile01/ifs/oitisilon/oit/Unix/ReplicatedData/UnixTeam/docker/oitleap01/devicemapper/devicemapper/data
 Metadata loop file: /net/oitfile01/ifs/oitisilon/oit/Unix/ReplicatedData/UnixTeam/docker/oitleap01/devicemapper/devicemapper/metadata
 Data Space Used: 11.73MB
 Data Space Total: 107.4GB
 Data Space Available: 107.4GB
 Metadata Space Used: 17.36MB
 Metadata Space Total: 2.147GB
 Metadata Space Available: 2.13GB
 Thin Pool Minimum Free Space: 10.74GB
 Deferred Removal Enabled: true
 Deferred Deletion Enabled: true
 Deferred Deleted Device Count: 0
 Library Version: 1.02.164-RHEL7 (2019-08-27)
...
Docker Root Dir: &lt;mount point&gt;
...
WARNING: the devicemapper storage-driver is deprecated, and will be removed in a future release.
WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
        Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.

引用自:https://unix.stackexchange.com/questions/618968