Ceph practice summary: configuration of the RBD block device client in Centos

Source: Internet
Author: User

Ceph practice summary: configuration of the RBD block device client in Centos

Before proceeding to this chapter, you need to complete the basic cluster building, please refer to the http://blog.csdn.net/eric_sunah/article/details/40862215

Ceph Block devices are also calledRBDOrRADOS. Block Device


During the experiment, a virtual machine can be used as the ceph-client node. To ensure cluster stability, do not perform the following operations on the cluster node.

Install Ceph
  1. Use OS Recommendations to determine whether your client OS meets the basic requirements.

  2. Use on Management NodesCeph-deployInCeph-clientIf ceph is installed on the node, it is called cephclient.

    ceph-deploy install cephclient
  3. Use ceph-deploy on the Management node to copy the ceph configuration file andCeph. client. admin. keyringToOn cephclient

    ceph-deploy admin cephclient

    Ceph-deployWill copy the keyring file/Etc/ceph directory. To ensure security, you can set the appropriate permissions for the file (e.g .,Sudo chmod + r/etc/ceph. client. admin. keyring).

    Configure Block devices
    1. Create a block device image on the cephclient Node

      rbd create testdevice --size 40960 [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring]
    2. Map the image to a block device on the cephclient Node

      sudo rbd map foo --pool rbd --name client.admin [-m {mon-IP}] [-k /path/to/ceph.client.admin.keyring]
    3. Format Block devices on the cephclient Node

      sudo mkfs.ext4 -m0 /dev/rbd/rbd/testdevice
    4. Mount the device.

      sudo mkdir /mnt/ceph-block-devicesudo 
      sudo mount -t ext4 /dev/rbd/rbd/testdevice /mnt/ceph-block-devicesudo
      cd /mnt/ceph-block-devicesudo
      Check Result
           <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink">
            
      VcHJlPgoKCgo8aDE + zsrm420.vade + identifier = "http://www.2cto.com/uploadfile/Collfiles/20141121/20141121095058151.png" alt = "\">
            
      Cause and solution: if the above prompt appears, it indicates that the kernel has not compiled the rbd module. The solution is to upgrade the kernel version. For specific steps to upgrade, see: http://blog.csdn.net/eric_sunah/article/details/41282379
      In the steps of make menuconfig, you can find rbd in block drive and select it.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.