Advertisement
Guest User

Quick Start RBD mapping

a guest
Dec 13th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. ## On your admin node:
  2. * Create the Pool / RBD image for the client.
  3. $ sudo ceph osd pool create {client name}.{Description} {PG Count}
  4. $ sudo rbd create {RBD Image Name} --size {RBD Image Size in MB}
  5.  
  6. * Create the keys for your phprados client:
  7. $ sudo ceph auth get-or-create client.{client name}.rbd osd 'allow rwx' mon 'allow r' -o /etc/ceph/ceph.client.{client name}.rbd.keyring
  8.  
  9. - Note: You can grant access to only one pool for tighter security, example:
  10. $ sudo ceph auth get-or-create client.{client name}.rbd osd 'allow rwx pool={PoolName}' mon 'allow r' -o /etc/ceph/ceph.client.{client name}.rbd.keyring
  11.  
  12. * Copy the /etc/ceph/ceph.conf and /etc/ceph/ceph.client.{client name}.rbd.keyring to your RBD Client's /etc/ceph folder
  13.  
  14. ## On the Client:
  15. * Map the RBD
  16. $ sudo rbd -p {PoolName} map {RBD Image Name} --id={client name}.rbd
  17.  
  18. * Verify the mapped RBD
  19. $ sudo rbd showmapped --id {client name}.rbd
  20.  
  21. * Format / mount the mapped RBD. Example:
  22. $ sudo mkfs.ext4 -m0 /dev/rbd0
  23. $ sudo mount /dev/rbd0 /mnt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement