profile
viewpoint
Shishir shishir-a412ed NVIDIA Santa Clara, CA https://www.linkedin.com/in/shishir-mahajan-871ba525 At NVIDIA, My work is around deploying/scaling deep learning (DL) containerized workloads using Mesos. Passionate about open source and a docker contributor.

issue closedcontainers/docker-lvm-plugin

RHEL7 `docker ls` does not autostart lvm plugin module

$ docker volume ls
DRIVER      VOLUME NAME
[...]
$ systemctl status docker-lvm-plugin
[...]
Loaded: loaded [...]
Active: inactive (dead)

installed on RHEL 7.4 via yum install. Version docker-lvm-plugin.x86_64 2:1.12.6-71.git3e8e77d.el7.

closed time in a day

erikbgithub

issue commentcontainers/docker-lvm-plugin

RHEL7 `docker ls` does not autostart lvm plugin module

@erikbgithub closing it due to inactivity. Please feel free to reopen if you are still facing the issue.

erikbgithub

comment created time in a day

issue closedcontainers/docker-lvm-plugin

Plugin "lvm" not found

Hi all, I just installed the plugin and I am testing lvm creation using:

docker volume create -d lvm --opt size=0.2G --name foobar

But I am receiving the following error:

Error response from daemon: create foobar: error looking up volume plugin lvm: plugin "lvm" not found

I have correctly configured the /etc/docker/docker-lvm-plugin and made only one minor configuration to the Makefile (changed GOLANG to my $GOPATH which is GOLANG ?= /usr/local/go/bin/go).

Can anybody guide me where I might have gone wrong? I am guessing this might have to do with the recently released go 1.13 version but I haven't confirmed it yet. Will update this when I am able to do so.

closed time in 2 months

jojaii

issue commentcontainers/docker-lvm-plugin

Plugin "lvm" not found

@jojaii msg="mkfs.xfs is not available, please install xfsprogs to continue" May be install xfsprogs :) ?

jojaii

comment created time in 2 months

issue commentcontainers/docker-lvm-plugin

Plugin "lvm" not found

@jojaii Looks like docker daemon is not able to find the plugin. Is the plugin running?

Can you paste the output of:

  1. cat /etc/os-release
  2. systemctl status docker-lvm-plugin
jojaii

comment created time in 2 months

pull request commentcontainers/docker-lvm-plugin

Throw error if volume size is <16M.

@rhatdan Please review. /cc @angermueller

[root@localhost docker-lvm-plugin]# docker volume create -d lvm --opt size=20Mbs --name foobar
Error response from daemon: create foobar: VolumeDriver.Create: invalid size: '20Mbs'
[root@localhost docker-lvm-plugin]# docker volume create -d lvm --opt size=15M --name foobar
Error response from daemon: create foobar: VolumeDriver.Create: Error creating LVM volume, minimum expected size is 16M
shishir-a412ed

comment created time in 3 months

PR opened containers/docker-lvm-plugin

Throw error if volume size is <16M.

Fixes #60

Signed-off-by: Shishir Mahajan shishirm@nvidia.com

+11 -0

0 comment

1 changed file

pr created time in 3 months

create barnchshishir-a412ed/docker-lvm-plugin-1

branch : min_size

created branch time in 3 months

push eventshishir-a412ed/docker-lvm-plugin-1

Shishir Mahajan

commit sha 62855a18e7a8c571f540dea4e9428a9ce5e4d5dc

Fix volume inspect with optional volume group. Signed-off-by: Shishir Mahajan <shishirm@nvidia.com>

view details

push time in 3 months

push eventshishir-a412ed/docker-lvm-plugin-1

Shishir Mahajan

commit sha 184afebbcbc2ca806296904f6983440cc737a394

Fix review comments. Signed-off-by: Shishir Mahajan <shishirm@nvidia.com>

view details

push time in 3 months

push eventshishir-a412ed/docker-lvm-plugin-1

Shishir Mahajan

commit sha a467933991263362a7076f26735f20459dea0617

Fix review comments. Signed-off-by: Shishir Mahajan <shishirm@nvidia.com>

view details

push time in 3 months

pull request commentcontainers/docker-lvm-plugin

make unitfile independent of docker.service

@rhatdan Sure, let me take a look at podman and check how it manages volumes.

lsm5

comment created time in 3 months

pull request commentcontainers/docker-lvm-plugin

Add optional argument to select volume group

@rhatdan This is still work in progress (WIP). I will wrap it up, test it and merge it.

shishir-a412ed

comment created time in 3 months

pull request commentcontainers/docker-lvm-plugin

make unitfile independent of docker.service

@rhatdan @lsm5 Do we still need this or can we close this one?

lsm5

comment created time in 3 months

PR closed containers/docker-lvm-plugin

Reviewers
Add optional argument to select volume group Code Review enhancement

This PR adds a new option vg that allows to specify a volume group different from the default defined in /etc/docker/docker-lvm-plugin at a per-volume basis. The volume group is also stored in /var/lib/docker-lvm-plugin/lvmVolumesConfig.json to have it available for volume mount and remove operations.

Usage

docker volume create -d lvm --opt size=100G --opt vg=vg1 --name=data

This PR should also resolve #7 since it provides a convenient way to specify a volume group on docker command line, in docker-compose and other docker config files (swarm, etc).

Tested and works with Docker 1.13.1 on CentOS 7.4.

# docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.13.1
Storage Driver: devicemapper
 Pool Name: vg0-docker--pool
 Pool Blocksize: 524.3 kB
 Base Device Size: 4.295 GB
 Backing Filesystem: xfs
 Data file:
 Metadata file:
 Data Space Used: 15.73 MB
 Data Space Total: 21.47 GB
 Data Space Available: 21.46 GB
 Metadata Space Used: 106.5 kB
 Metadata Space Total: 960.5 MB
 Metadata Space Available: 960.4 MB
 Thin Pool Minimum Free Space: 2.147 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: true
 Deferred Deletion Enabled: true
 Deferred Deleted Device Count: 0
 Library Version: 1.02.146-RHEL7 (2018-01-22)
Logging Driver: gelf
Cgroup Driver: systemd
Plugins:
 Volume: local lvm
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: docker-runc runc
Default Runtime: docker-runc
Init Binary: docker-init
containerd version:  (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: N/A (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: N/A (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.16.8-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 48
Total Memory: 377.5 GiB
Name: XXX
ID: SC35:4TGP:5KDA:BJXK:LTOA:I7O2:63TC:QIIG:3TN4:LGAZ:7SBH:PMJP
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-ip6tables is disabled
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: true
Registries: docker.io (secure)
+81 -41

5 comments

3 changed files

echa

pr closed time in 3 months

pull request commentcontainers/docker-lvm-plugin

Add optional argument to select volume group

Closing this in favor of #79

/cc @rhatdan @echa

echa

comment created time in 3 months

create barnchshishir-a412ed/docker-lvm-plugin-1

branch : volume_group

created branch time in 3 months

push eventshishir-a412ed/docker-lvm-plugin-1

Shishir Mahajan

commit sha 2a782b1f75c57a207d370be77c95b68d6fb44886

Add screencast back. Signed-off-by: Shishir Mahajan <shishirm@nvidia.com>

view details

Daniel J Walsh

commit sha 7c13c624b2d43f64c9bcbae7a519ebf6608c08ba

Merge pull request #78 from shishir-a412ed/ascii Add screencast back.

view details

push time in 3 months

issue closedcontainers/docker-lvm-plugin

docker-lvm-plugin doesn't work right with userns-remap

I have docker configured with userns-remap. With default permissions, docker-lvm-plugin doesn't work right. It can create volumes, but they can't actually be mounted.

$ sudo docker volume create -d lvm --opt size=0.3G --name docker_lvm_test3
docker_lvm_test3
$ sudo docker run -d -p 8080:80 -v docker_lvm_test2:/somemount nginx
03fd9cccd5d4ef9e3782c1eeb7d7080b93098aa5b8087721bab796b456600888
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"rootfs_linux.go:58: mounting \\\"/var/lib/docker-lvm-plugin/docker_lvm_test2\\\" to rootfs \\\"/srv/var/lib/docker/262144.262144/overlay2/b701da7e5d997e50ef147df89ada2c90a88f7e1076f1b15d6ba06842808119d9/merged\\\" at \\\"/somemount\\\" caused \\\"stat /var/lib/docker-lvm-plugin/docker_lvm_test2: permission denied\\\"\"": unknown.
$ 

This appears to be a simple permission issue. Workaround: chmod 755 /var/lib/docker-lvm-plugin/

Probably best to fix it in the code, though.

closed time in 3 months

mortya

issue commentcontainers/docker-lvm-plugin

docker-lvm-plugin doesn't work right with userns-remap

@mortya I tried to reproduce this by running docker daemon under a remapped root (--userns-remap=smahajan)

[root@localhost docker-lvm-plugin]# cat /etc/subuid
smahajan:120000:65536
[root@localhost docker-lvm-plugin]# cat /etc/subuid
smahajan:120000:65536

The problem is docker-lvm-plugin is running as root and it's graph directory (/var/lib/docker-lvm-plugin) is owned by root:root. When you launch the container, it will run as remapped root (120000) {non-root} and does not have the permission to mount a root path into the container rootfs.

Correct solution would be when docker-lvm-plugin starts (restarts), it should query docker daemon to check if the daemon is running under a remapped root, and chown it's own root (graph) directory to remapped root.

I don't like the idea of adding a dependency to docker daemon, to be able to start the plugin. Since if we add this, docker daemon should be running when the plugin starts so it can query the daemon.

We can get around this situation by:

  1. chown 120000:120000 /var/lib/docker-lvm-plugin
  2. chmod 755 /var/lib/docker-lvm-plugin (As suggested by you).

I prefer (1) since that's the remapped user container is running under. Also (2) makes /var/lib/docker-lvm-plugin world executable. I ll leave it upto you, which one you wanna choose.

Closing it in favor of workaround for now. If more people start facing this issue, we can think of addressing it in the code.

mortya

comment created time in 3 months

issue commentcontainers/docker-lvm-plugin

RHEL7 `docker ls` does not autostart lvm plugin module

@erikbgithub Are you still facing this issue?

  1. Can you show me the systemd unit file for docker-lvm-plugin ? $$ systemctl cat docker-lvm-plugin.

  2. Output of: $$ ls /run/docker/plugins -lt

erikbgithub

comment created time in 3 months

more