2012-12-19 21:47:11 +00:00
|
|
|
==========================
|
|
|
|
Block Device Quick Start
|
|
|
|
==========================
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2012-12-19 21:47:11 +00:00
|
|
|
To use this guide, you must have executed the procedures in the `5-minute
|
|
|
|
Quick Start`_ guide first. Execute this quick start on the client machine.
|
2012-07-03 18:21:43 +00:00
|
|
|
|
2012-12-19 21:47:11 +00:00
|
|
|
.. important:: Mount the block device on the client machine,
|
|
|
|
not the server machine.
|
2012-10-08 17:48:27 +00:00
|
|
|
|
2012-12-19 21:47:11 +00:00
|
|
|
#. Create a block device image. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
|
|
|
rbd create foo --size 4096
|
|
|
|
|
2012-10-08 17:48:27 +00:00
|
|
|
#. Load the ``rbd`` client module. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
|
|
|
sudo modprobe rbd
|
|
|
|
|
2012-10-08 17:48:27 +00:00
|
|
|
#. Map the image to a block device. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
|
|
|
sudo rbd map foo --pool rbd --name client.admin
|
|
|
|
|
2012-10-08 17:48:27 +00:00
|
|
|
#. Use the block device. In the following example, create a file system. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
|
|
|
sudo mkfs.ext4 -m0 /dev/rbd/rbd/foo
|
|
|
|
|
2012-10-08 17:48:27 +00:00
|
|
|
#. Mount the file system. ::
|
2012-07-03 18:21:43 +00:00
|
|
|
|
|
|
|
sudo mkdir /mnt/myrbd
|
|
|
|
sudo mount /dev/rbd/rbd/foo /mnt/myrbd
|
2012-12-19 21:47:11 +00:00
|
|
|
|
|
|
|
See `block devices`_ for additional details.
|
|
|
|
|
|
|
|
.. _5-minute Quick Start: ../quick-start
|
|
|
|
.. _block devices: ../../rbd/rbd
|