LTDD: Userland Cloud Block Device

The LTDD is an implementation of userland block device extended from the Network Block Device (NBD) for private cloud systems. The LTDD is originally designed for hot cloning P2V migration, but it also implements snapshot of a virtual disk.

The LTDD enables its users to attach image files on a local or remote file system as a block device like the original NBD, and additionally, it can create snapshot images without detaching the virtual disk and it is also able to clone data to a virtual disk with attaching and using the virtual disk.

Search from the Internet:
Custom Search

LTDD: Userland Cloud Block Device

The software (version 0.2.0rc4) is available at ltdd-0.2.0rc4.tar.gz. The detailed manual and technical documents will be provided in future. If you have any comments on this software, please let us <bug __at__> (please replace "__at__" with "@") know.


Redistribution of this software without authors' permission is prohibited because the license is under consideration now. You are allowed to use this software for personal purposes on your own responsibility. An appropriate license will come when it becomes ready.


How to use it

The ltdd kernel module interface is compatible with nbd. To load the nbd driver, execute the following command:

# modprobe nbd

The number of created nbd devices can be specified as follows:

# modprobe nbd nbds_max=32

Here, the specified number is 32.

Launch the ltddmgr first for any cases

The following command is executed to use /dev/nbd1.

# ./mgr/ltddmgr /dev/nbd1

Case 1: Attaching a local image file to nbd1

To attach a local image file /tmp/foo.img to nbd1 (i.e., ltddmgr), execute the following command:

# ./ctl/ltddctl attach nbd1 local:///tmp/foo.img

To check the current status of nbd1, you can use the status sub-command with ltddctl:

# ./ctl/ltddctl status nbd1
Password for ltddmgr (up to 32 characters):
Vdisk attached: local:///tmp/foo.img

To create a snapshot of the attached virtual disk to the file /tmp/foo.bak.img, snapshot sub-command can be used:

# ./ctl/ltddctl snapshot nbd1 local:///tmp/foo.bak.img

Note that snapshot sub-command is available if and only if the current status is "attached", without creating any other snapshots nor cloning.

You can detach the virtual disk from nbd1 (i.e., ltddmgr) by the following command (when not creating a snapshot nor cloning):

# ./ctl/ltddctl detach nbd1

Case 2: Hot-cloning from /tmp/bar.img to /tmp/foo.img

To clone data in /tmp/bar.img to the virtual disk attached to /tmp/foo.img, the following command is used instead of the attach sub-command:

# ./ctl/ltddctl clone nbd1 local:///tmp/foo.img local:///tmp/bar.img

Case 3: Attaching a remote image file to nbd1

Before attaching the remote image file, launch virtual disk controller "ltddiod" on the remote host:

remote# ./io/ltddiod /tmp/foo.img rw 5001

Here the second argument denote the path to the image file to be exported. Moreover, the third, fourth, and fifth arguments ("rw", "", and "5001") denote mode ("rw" is read/write mode), listening IP address ("" is a wildcard for IPv4 addresses), and listening port number.

To stop the launched ltddiod, the following command is to used:

remote# ./io/ltddioctl 5001 stop

To attach the remote file through ltddiod to nbd1 (i.e., ltddmgr), execute the following command on the local host:

local# ./ctl/ltddctl attach nbd1 remote://remote-hostname:5001

Quit ltddmgr

# ./ctl/ltddctl disconnect nbd1

Tested environments