Creating device mapper nodes

Thinking about creating a simple Convoy deployment. Seems like device mapper may be the way to go if I don’t have/need NFS and am not running on EC2. Is that correct?

If so, how do I go about creating the device mapper nodes? The docs refer to a couple examples but sort of handwave around how devices themselves are created. I.e. it mentions /dev/convoy-vg but doesn’t tell me how to create those devices. Google isn’t entirely helpful, either. I don’t know whether I’m creating a thin volume or something entirely different.


Hi @nolan

Yes, device mapper is the way to go if you don’t need NFS or running on EC2.

Every volume created by Convoy Device Mapper Driver is thin-provisioned volume, so no worry.

Device mapper needs two block devices to work. We didn’t describe the method to get them in details because it would be decided by user and needs to suit for user’s environment. For production level of reliability and performance, it’s likely you need to attach two new storage devices to the instance running Convoy. If it’s only for demo and development, you can use loopback devices, which creates block devices based on local files. You can check our Quick Start Guide, or our instruction to setup loopback devices. Notice it’s only for demo or development purpose, since it’s known that loopback device is not reliable and low in performance.

Cool. Is it somehow possible to use a directory on the host as volume storage? Or is there some way to emulate another storage device that isn’t loopback? I have a VM with a single emulated drive. I suppose I can give it another and use that as a separate storage device, but I’d rather treat the VMs as mostly disposable, back up their volumes regularly and just reconstitute them should something break. That becomes a bit more complicated if, for instance, I underallocate the root filesystem and it fills up with older Docker images while the Convoy devices are just fine.

Put another way, Docker’s device manager driver seems to use parts of /var/lib/docker for its storage. Is there any way to do something similar with /var/lib/convoy or some other directory? This isn’t heavy use, just light production workloads that I’d like to be able to snapshot, backup and restore more easily than I currently do with Duply.


Docker’s device mapper graphdriver would create loopback devices and use them by default. If you choose to give VM another storage device in fact you don’t need to worry about backing them up. Just use Convoy snapshot/backup to the location you chose, either a local/NFS mounted directory, or S3. And restore the volumes when something messed up.

Docker’s default volume driver is basically what Convoy VFS/NFS driver do. They store the volume in a directory. Convoy can do local directory or NFS mounted directory as well. VFS/NFS driver can support snapshot/backup, but it would be much heavier than device mapper.

@nolan In your case, I think you need to decide where to put the backup. Since your VM’s are disposable, I guess you would need NFS or S3 for backup.

I am working a script to automatically partition a new block device to the size Device Mapper driver needed, it should make Device Mapper setup more easier.

@nolan The script I mentioned for partition single block device is ready. You can take a look at: