]> git.proxmox.com Git - ceph.git/blame - ceph/doc/rbd/rbd-ko.rst
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / doc / rbd / rbd-ko.rst
CommitLineData
7c673cae
FG
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
9Get a List of Images
10====================
11
12To mount a block device image, first return a list of the images. ::
13
14 rbd list
15
16Map a Block Device
17==================
18
19Use ``rbd`` to map an image name to a kernel module. You must specify the
20image name, the pool name, and the user name. ``rbd`` will load RBD kernel
21module on your behalf if it's not already loaded. ::
22
11fdf7f2 23 sudo rbd device map {pool-name}/{image-name} --id {user-name}
7c673cae
FG
24
25For example::
26
11fdf7f2 27 sudo rbd device map rbd/myimage --id admin
7c673cae
FG
28
29If you use `cephx`_ authentication, you must also specify a secret. It may come
30from a keyring or a file containing the secret. ::
31
11fdf7f2
TL
32 sudo rbd device map rbd/myimage --id admin --keyring /path/to/keyring
33 sudo rbd device map rbd/myimage --id admin --keyfile /path/to/file
7c673cae
FG
34
35
36Show Mapped Block Devices
37=========================
38
11fdf7f2
TL
39To show block device images mapped to kernel modules with the ``rbd``,
40specify ``device list`` arguments. ::
7c673cae 41
11fdf7f2 42 rbd device list
7c673cae
FG
43
44
45Unmapping a Block Device
11fdf7f2 46========================
7c673cae 47
11fdf7f2
TL
48To unmap a block device image with the ``rbd`` command, specify the
49``device unmap`` arguments and the device name (i.e., by convention the
50same as the block device image name). ::
51
52 sudo rbd device unmap /dev/rbd/{poolname}/{imagename}
7c673cae 53
7c673cae
FG
54For example::
55
11fdf7f2 56 sudo rbd device unmap /dev/rbd/rbd/foo
7c673cae
FG
57
58
59.. _cephx: ../../rados/operations/user-management/