If there is a partition table on the device, you need to get Linux to
scan the partition table and build the sub-devices. Try running
"kpartx -a /dev/rbd0" to create the devices. Since you have LVM on the
second partition, ensure that it is configured to not filter out the
new partition device and you should be able to get the device mapper
to add the logical volumes contained within the group.

On Thu, Aug 25, 2016 at 1:31 PM, Deneau, Tom <tom.den...@amd.com> wrote:
> If I have an rbd image that is being used by a VM and I want to mount it
> as a read-only /dev/rbd0 kernel device, is that possible?
>
> When I try it I get:
>
> mount: /dev/rbd0 is write-protected, mounting read-only
> mount: wrong fs type, bad option, bad superblock on /dev/rbd0,
>        missing codepage or helper program, or other error
>
> The rbd image when viewed from the VM has a /dev/vda disk with 2 partitions
>
> Number  Start   End     Size    Type     File system  Flags
>  1      1049kB  525MB   524MB   primary  xfs          boot
>  2      525MB   12.9GB  12.4GB  primary               lvm
>
> I wanted to view it thru the /dev/rbd0 mount because on one of my systems,
> the VM is not booting from the image.
>
> -- Tom
> _______________________________________________
> ceph-users mailing list
> ceph-users@lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



-- 
Jason
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to