Closed weilai201 closed 6 years ago
Currently, it doesn't support Capabilities
API, we can add that later.
BTW, for NFS, I don't think we have a way to limit the size of volume...
Hello
I used losetup to set the /dev/loop0 and /dev/loop1:
truncat -s 500m data.vol truncat -s 100m metadata.vol losetup /dev/loop0 data.vol losetup /dev/loop1 metadata.vol
convoy daemon start success with command
convoy daemon --drivers devicemapper --driver-opts dm.datadev=/dev/loop0 --driver-opts dm.metadatadev=/dev/loop1
but when I start container with command
docker run --name test-convoy --volume-driver devicemapper -v v1:/v1 -idt ubuntu bash
I got the error then start failed:
DEBU[0695] Handle plugin get volume: POST /VolumeDriver.Get pkg=daemon DEBU[0695] Request from docker: &{v1 map[]} pkg=daemon DEBU[0695] Response: { "Err": "Could not find volume v1." } pkg=daemon DEBU[0695] Handle plugin create volume: POST /VolumeDriver.Create pkg=daemon DEBU[0695] Request from docker: &{v1 map[]} pkg=daemon DEBU[0695] Create a new volume v1 for docker pkg=daemon DEBU[0695] event=create object=volume opts=map[VolumeIOPS:0 PrepareForVM:false Size:0 BackupURL: VolumeName:v1 VolumeDriverID: VolumeType:] pkg=daemon reason=prepare volume=v1 DEBU[0695] Current devID 3 pkg=devmapper DEBU[0695] Creating volume dm_volume_devid=3 event=create object=volume pkg=devmapper reason=start volume=v1 DEBU[0695] [devmapper] CreateDevice(poolName=/dev/mapper/convoy-pool, deviceId=3) DEBU[0695] libdevmapper(7): ioctl/libdm-iface.c:1750 (4) dm version OF [16384] (1) DEBU[0695] libdevmapper(7): ioctl/libdm-iface.c:1750 (4) dm message convoy-pool OF create_thin 3 [16384] (1) DEBU[0695] Activating device for volume dm_volume_devid=3 event=activate object=volume pkg=devmapper reason=start volume=v1 DEBU[0695] libdevmapper(7): ioctl/libdm-iface.c:1750 (4) dm create v1 OF [16384] (1) DEBU[0695] libdevmapper(7): libdm-common.c:1348 (4) v1: Stacking NODE_ADD (252,3) 0:0 0600 [verify_udev] DEBU[0695] libdevmapper(7): ioctl/libdm-iface.c:1750 (4) dm reload v1 OF [16384] (1) DEBU[0695] libdevmapper(7): ioctl/libdm-iface.c:1750 (4) dm resume v1 OF [16384] (*1) DEBU[0695] libdevmapper(7): libdm-common.c:1348 (4) v1: Processing NODE_ADD (252,3) 0:0 0600 [verify_udev] DEBU[0695] libdevmapper(7): libdm-common.c:983 (4) Created /dev/mapper/v1 DEBU[0695] Formatting device /dev/mapper/v1 with ext4 filesystem pkg=devmapper DEBU[0695] Formatting device done pkg=devmapper DEBU[0695] Created volume event=create object=volume pkg=daemon reason=complete volume=v1 DEBU[0695] Created volume for docker v1 pkg=daemon DEBU[0695] Response: {} pkg=daemon ERRO[0695] Handler not found: POST /VolumeDriver.Capabilities pkg=daemon DEBU[0695] Handle plugin volume path: POST /VolumeDriver.Path pkg=daemon DEBU[0695] Request from docker: &{v1 map[]} pkg=daemon DEBU[0695] event=mountpoint object=volume pkg=daemon reason=prepare volume=v1 DEBU[0695] event=mountpoint mountpoint= object=volume pkg=daemon reason=complete volume=v1 DEBU[0695] Volume: v1 is mounted at for docker pkg=daemon DEBU[0695] Response: {} pkg=daemon DEBU[0696] Handle plugin mount volume: POST /VolumeDriver.Mount pkg=daemon DEBU[0696] Request from docker: &{v1 map[]} pkg=daemon DEBU[0696] Mount volume: v1 for docker pkg=daemon DEBU[0696] event=mount object=volume opts=map[MountPoint:] pkg=daemon reason=prepare volume=v1 DEBU[0696] Volume v1 is being mounted it to /var/lib/rancher/convoy/devicemapper/mounts/v1, with option [] pkg=util DEBU[0696] Response: { "Err": "Failed to execute: mount [/dev/mapper/v1 /var/lib/rancher/convoy/devicemapper/mounts/v1], output mount: wrong fs type, bad option, bad superblock on /dev/mapper/v1,\n missing codepage or helper program, or other error\n\n In some cases useful info is found in syslog - try\n dmesg | tail or so.\n, error exit status 32" } pkg=daemon
OS:ubuntu 16.04 Kernel:4.4.0-79-generic #100-Ubuntu SMP Wed May 17 19:58:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux docker version:Docker version 17.03.1-ce, build c6d412e
thanks!
the volume-driver should be convoy, instead of devicemapper
You need to change your command: docker run --name test-convoy --volume-driver=convoy -v v1:/v1 -idt ubuntu bash
The /VolumeDriver.Capabilities part was fixed in 0.5.1.
When I create volume by used docker api
docker volume create -d convoy --opt o=size=1GB bus3
i get the responseDEBU[2514] Handle plugin get volume: POST /VolumeDriver.Get pkg=daemon DEBU[2514] Request from docker: &{bus3 map[]} pkg=daemon DEBU[2514] Response: { "Err": "Could not find volume bus3." } pkg=daemon DEBU[2514] Handle plugin create volume: POST /VolumeDriver.Create pkg=daemon DEBU[2514] Request from docker: &{bus3 map[o:size=1GB]} pkg=daemon DEBU[2514] Create a new volume bus3 for docker pkg=daemon DEBU[2514] event=create object=volume opts=map[VolumeIOPS:0 PrepareForVM:false Size:0 BackupURL: VolumeName:bus3 VolumeDriverID: VolumeType:] pkg=daemon reason=prepare volume=bus3 DEBU[2514] Created volume event=create object=volume pkg=daemon reason=complete volume=bus3 DEBU[2514] Created volume for docker bus3 pkg=daemon DEBU[2514] Response: {} pkg=daemon ERRO[2514] Handler not found: POST /VolumeDriver.Capabilities pkg=daemon DEBU[2514] Handle plugin volume path: POST /VolumeDriver.Path pkg=daemon DEBU[2514] Request from docker: &{bus3 map[]} pkg=daemon DEBU[2514] event=mountpoint object=volume pkg=daemon reason=prepare volume=bus3 DEBU[2514] event=mountpoint mountpoint= object=volume pkg=daemon reason=complete volume=bus3 DEBU[2514] Volume: bus3 is mounted at for docker pkg=daemon DEBU[2514] Response: {} pkg=daemon bus3 [root@nginx log]# docker volume create -d convoy --opt o=size=1GB bus3 DEBU[2517] Handle plugin get volume: POST /VolumeDriver.Get pkg=daemon DEBU[2517] Request from docker: &{bus3 map[]} pkg=daemon DEBU[2517] event=mountpoint object=volume pkg=daemon reason=prepare volume=bus3 DEBU[2517] event=mountpoint mountpoint= object=volume pkg=daemon reason=complete volume=bus3 DEBU[2517] Found volume bus3 for docker pkg=daemon DEBU[2517] Response: { "Volume": { "Name": "bus3" } } pkg=daemon bus3
I guess ,is convoy cannot supported '/VolumeDriver.Capabilities' api? I use nfs do for base storage.
VERSION INFO
OS version: CentOS Linux release 7.3.1611 (Core) docker verion: 1.13.0 convoy version: v0.5.0