Mount Ceph block disk of a server instance.

Get the block device from vm

root@overcloud-compute-01:~# virsh domblklist instance-00000001
Target     Source
------------------------------------------------
vda        compute/f0984ae9-f9c9-439b-80b9-f1c6201c914c_disk

Shutdown the instance from OSP

Map the disk using rbd command

root@overcloud-compute-01:~# rbd map compute/f0984ae9-f9c9-439b-80b9-f1c6201c914c_disk --name client.admin

Mount the disk

root@overcloud-compute-01:~# mount /dev/rbd/compute/f0984ae9-f9c9-439b-80b9-f1c6201c914c_disk-part1 /mnt

Do the changes you want.

Unmount the disk

root@overcloud-compute-01:~# umount /mnt

List rbdmaps

root@overcloud-compute-01:~# rbd showmapped
id pool    image                                     snap device
1  compute f0984ae9-f9c9-439b-80b9-f1c6201c914c_disk -    /dev/rbd1

Unmap the disk

root@overcloud-compute-01:~# rbd unmap /dev/rbd1

links

social