[SOLVED] I there an easy way to mount the rbd image of a VM on a non proxmox host?

Leah

Active Member
Aug 1, 2019
53
2
28
I need to copy some huge VMs. To reduce the downtime and the overall resources needed I want to mount the rbd image of a VM on the old host and dd it directly to the block device. Currently I'm not cappable of finding a way to mount an image created on the pve ceph cluster on another host. Is there some default config from proxmox that could make difficulties here? Every time I try I get "rbd: sysfs write failed" as an error. Any Ideas?

Cluster runs on proxmox 6.0.9
 
Last edited:
Yes sure, but the VM should be offline, or better said nobody else should modify the image in between to avoid incosistencies.

You first need to map the image:
Code:
# rbd -p <POOLNAME> list
# rbd -p <POOLNAME> map <IMAGE>

This will output to which block device it was mapped, e.g., /dev/rbd0.

You then can work with that block device as normally, even mounting it should works.

After your done just ensure that you unmap it again, e.g.,
Code:
rbd unmap /dev/rbd0
 
Oh ok... I tried it with another command. Now there is a more verbose error. It seems that there is a feature mismatch. Maybe because of the older kernel version of the client. Is it a problem for proxmox to run the suggested command that disables object-map, fast-diff and deep-flatten? Or do you know if this is only relevant for the client mounting and will have no effect after unmounting the image?

Error:
Code:
rbd: sysfs write failed
RBD image feature set mismatch. You can disable features unsupported by the kernel with "rbd feature disable HDD/vm-115-disk-0 object-map fast-diff deep-flatten".
In some cases useful info is found in syslog - try "dmesg | tail".
rbd: map failed: (6) No such device or address
 
Maybe because of the older kernel version of the client

Rather because of the newer Kernel of the Client, I'd guess. You could try installing and booting our 5.3 proposed kernel, available from all our repos with
Code:
apt install pve-kernel-5.3
, it's RBD module should support those features.
 
I think not, the client is a CentOS 6 with a 3.10 kernel
FWIW, I had the same issue a few days ago and booting 5.3 made it able to do so...

After another though, it does not make sense that the GuestOS client has anything to do with this features a tall, i gets a a VirtIO-SCSI or SATA or VirtioBlk, it has no clue about the RBD itself :)
 
Well, maybe that was not clear. The client is not a guest running on the proxmox cluster. It is an old libvirt based host. And booting a newer kernel on this old CentOS...is not an option.
 
And booting a newer kernel on this old CentOS...is not an option.

I did not meant to suggest installing the Kernel on the CentOS, but on the PVE host to be able to map the RBD, as I said - it solved the issues here.
 
Oh...sorry :D I didn't realized that 5.3 is a really new kernel :D I'm not that fit these days. I'll try this later, so thanks for the suggestions and help.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!