[CentOS-virt] Can't block-attach a file on a read only volume?

Thu Mar 12 20:05:05 UTC 2015
Nathan March <nathan at gt.net>

Hi All,

 

One more weird issue, this works on old xen but fails on 4.4:

 

xendev01 ~ # mkdir /mnt/test

xendev01 ~ # mount -t tmpfs - /mnt/test

xendev01 ~ # dd if=/dev/null of=/mnt/test/disk seek=100M bs=1

0+0 records in

0+0 records out

0 bytes (0 B) copied, 0.000201809 s, 0.0 kB/s

 

xendev01 ~ # /usr/sbin/xl block-attach nathannx "file:/mnt/test/disk" "xvdd4"           

DEBUG libxl__blktap_devpath 37 aio:/mnt/test/disk

DEBUG libxl__blktap_devpath 40 /dev/xen/blktap-2/tapdev20

 

xendev01 ~ # xl block-detach nathannx 51764

DEBUG libxl__device_destroy_tapdisk 66 type=aio:/mnt/test/disk disk=:/mnt/test/disk

 

xendev01 ~ # mount -o remount,ro /mnt/test   

 

xendev01 ~ # /usr/sbin/xl block-attach nathannx "file:/mnt/test/disk" "xvdd4"           

DEBUG libxl__blktap_devpath 37 aio:/mnt/test/disk

libxl: error: libxl.c:2149:device_disk_add: failed to get blktap devpath for 0xd3abd0

libxl: error: libxl.c:1727:device_addrm_aocomplete: unable to (null) device

libxl_device_disk_add failed.

 

I'm not sure why xen would care if the disk is writable? Would be nice to be able to mount these since many NFS storage arrays provide read only access to snapshots.

 

- Nathan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20150312/94efcce9/attachment-0005.html>