Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

best mechanism to mounting a pool on a remote linux client environment instead of iscsi

Currently, we are using Petasan to present an iSCSI Lun to a set of Linux servers that utilize KVM as a hypervisor for VMs.

The block device presented by the petasan iSCSI contains LVMs that are exposed to the KVM hypervisor for use in the VMs.

Instead of iSCSI, we would like to use the native ceph rbd driver to present the block devices to the Linux server and simply bypass iSCSI.

We wanted to use something like the following in our bash script on the client machine.

rbd map $CEPH_POOL/$CEPH_IMAGE --id admin --keyring /etc/ceph/ceph.client.admin.keyring

We would like to know what would be the best recommended mechanism in petasan to achieve this.

More specifically, creating a keyring that is unique and allocated to only a single RBD pool for access control preferences.

ceph auth get-or-create client.USER1 mgr 'allow r' mon 'profile rbd' osd 'profile rbd pool=POOL1'  >> /etc/ceph/ceph.client.USER1.keyring

 

ok, this would need to be in both the petasan nodes and the client node or JUST the client node?

 

the command needs to run on a host with admin keyring, it will create a user/keyring with restricted privileges. the keyring of the restricted user needs to be installed on client node.

 

thanks

i am trying to create a client key that allows for a specific image on a specific pool... but got an error as follows ....

 

ceph auth get-or-create client.devcomp-hdd mgr 'allow r' mon 'profile rbd' osd 'profile rbd pool=dev-hdd-pool image=image-00004'  >> /etc/ceph/ceph.client.devcomp.keyring

 

Error EINVAL: osd capability parse failed, stopped at 'object_prefix rbd_data.image.image-00004' of 'profile rbd pool=dev-hdd-pool object_prefix rbd_data.image.image-00004'

 

 

you cannot specify image

running "rbd showmapped" ... I see that petasan is not using any namespaces. is it possible to map an image to a namespace in petasan without it causing issues to petasan. I am asking because i CAN limit access to name spaces per the CEPH documentation....

 

root@cephdev1:~# rbd showmapped
id      pool namespace image snap device
0       iscsi-test image-00007 - /dev/rbd0
1        iscsi-test-hdd image-00008 - /dev/rbd1
2 dev-ssd-pool image-00010 - /dev/rbd2
3 dev-ssd-pool image-00011 - /dev/rbd3
4 rbd image-00001 - /dev/rbd4
5 rbd image-00002 - /dev/rbd5
6 dev-hdd-pool image-00004 - /dev/rbd6
7 dev-hdd-pool image-00005 - /dev/rbd7
8 dev-ssd-pool image-00003 - /dev/rbd8
root@cephdev1:~#

 

 

You can limit access via namespaces, i am not sure how this will affect the rest of the system as it is not something we test. You can test yourself and see if there are any issues. or you can create different pools and have the access by pool as your original question which has no issues.