Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / doc / rbd / rbd-ko.rst
1 ==========================
2  Kernel Module Operations
3 ==========================
4
5 .. index:: Ceph Block Device; kernel module
6
7 .. important:: To use kernel module operations, you must have a running Ceph cluster.
8
9 Get a List of Images
10 ====================
11
12 To mount a block device image, first return a list of the images. ::
13
14         rbd list
15
16 Map a Block Device
17 ==================
18
19 Use ``rbd`` to map an image name to a kernel module. You must specify the 
20 image name, the pool name, and the user name. ``rbd`` will load RBD kernel
21 module on your behalf if it's not already loaded. ::
22
23   sudo rbd map {pool-name}/{image-name} --id {user-name}
24
25 For example:: 
26
27   sudo rbd map rbd/myimage --id admin
28  
29 If you use `cephx`_ authentication, you must also specify a secret.  It may come
30 from a keyring or a file containing the secret. ::
31
32   sudo rbd map rbd/myimage --id admin --keyring /path/to/keyring
33   sudo rbd map rbd/myimage --id admin --keyfile /path/to/file
34
35
36 Show Mapped Block Devices
37 =========================
38
39 To show block device images mapped to kernel modules with the ``rbd`` command,
40 specify the ``showmapped`` option. ::
41
42         rbd showmapped
43
44
45 Unmapping a Block Device
46 ========================        
47
48 To unmap a block device image with the ``rbd`` command, specify the ``unmap``
49 option  and the device name (i.e., by convention the same as the block device
50 image name). :: 
51
52         sudo rbd unmap /dev/rbd/{poolname}/{imagename}
53         
54 For example::
55
56         sudo rbd unmap /dev/rbd/rbd/foo
57
58
59 .. _cephx: ../../rados/operations/user-management/