Search

Chapter 7. Kernel Module Operations

download PDF
Important

To use kernel module operations, you must have a running Ceph cluster.

Note

This feature has been added in Red Hat Ceph Storage v1.3 for use with RHEL 7.1 and Ubuntu 14.04.

7.1. Get a List of Images

To mount a block device image, first return a list of the images.

To do so, execute the following:

rbd list

7.2. Map a Block Device

Use rbd to map an image name to a kernel module. You must specify the image name, the pool name and the user name. rbd will load RBD kernel module on your behalf if it’s not already loaded.

To do so, execute the following:

sudo rbd map {image-name} --pool {pool-name} --id {user-name}

For example:

sudo rbd map --pool rbd myimage --id admin

If you use cephx authentication, you must also specify a secret. It may come from a keyring or a file containing the secret.

To do so, execute the following:

sudo rbd map --pool rbd myimage --id admin --keyring /path/to/keyring
sudo rbd map --pool rbd myimage --id admin --keyfile /path/to/file

7.3. Show Mapped Block Devices

To show block device images mapped to kernel modules with the rbd command, specify the showmapped option.

To do so, execute the following:

rbd showmapped

7.4. Unmapping a Block Device

To unmap a block device image with the rbd command, specify the unmap option and the device name (by convention the same as the block device image name).

To do so, execute the following:

sudo rbd unmap /dev/rbd/{poolname}/{imagename}

For example:

sudo rbd unmap /dev/rbd/rbd/foo
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.