[openstack-dev] [cinder] Problem with lvm thin provisioning and snapshots
Marco Marino
marino.mrc at gmail.com
Wed Jan 18 16:09:21 UTC 2017
Ok, problem solved (it seems)
in /etc/lvm/lvm.conf I need to set
auto_set_activation_skip = 0
and, in my case, I set the same in /etc/cinder/lvm.conf (because I'm using
a cluster configuration for lvm)
Thank you
2017-01-18 16:38 GMT+01:00 Marco Marino <marino.mrc at gmail.com>:
> Hi, I'm trying to use lvm thin provisioning with openstack cinder (mitaka)
> but I have a problem with snapshots. I'm trying to create a snapshot from a
> volume (detached) and then create a new volume from the snapshot.
>
> 1) Snapshot creation works well and I have (with lvs)
>
> LV VG
> Attr LSize Pool Origin
> Data% Meta% Move Log Cpy%Sync Convert
> *_snapshot-f702a3b0-e021-471b-80c3-56cab0c1c1e6 cinder-volumes2
> Vwi---tz-k 1.00g cinder-volumes2-pool
> volume-a60699c5-55c2-4dbc-b74a-64b51f2f4dd2*
>
> activationvol cinder-volumes2
> -wi-a----- 16.00m
>
> cinder-volumes2-pool cinder-volumes2
> twi-aotz-- 18.98g
> 0.00 0.59
> *volume-a60699c5-55c2-4dbc-b74a-64b51f2f4dd2 cinder-volumes2
> Vwi-a-tz-- 1.00g
> cinder-volumes2-pool 0.00*
>
>
> 2) When I try to create the new volume from the snapshot I have an error:
> /bin/dd: failed to open /dev/mapper/cinder--volumes2-_
> snapshot--f702a3b0--e021--471b--80c3--56cab0c1c1e6\xe2\x80\x99: No such
> file or directory\n'
> But the new logical volume is created in the pool:
>
> [root at mitaka-cinder-volume1-env3 ~]# lvs
> LV VG
> Attr LSize Pool Origin
> Data% Meta% Move Log Cpy%Sync Convert
> _snapshot-f702a3b0-e021-471b-80c3-56cab0c1c1e6 cinder-volumes2
> Vwi---tz-k 1.00g cinder-volumes2-pool volume-a60699c5-55c2-4dbc-
> b74a-64b51f2f4dd2
> activationvol cinder-volumes2
> -wi-a----- 16.00m
>
> cinder-volumes2-pool cinder-volumes2
> twi-aotz-- 18.98g
> 0.00 0.59
> volume-86666116-660f-4bfc-a27e-fa5e689578ce cinder-volumes2
> Vwi-a-tz-- 1.00g cinder-volumes2-pool
> 0.00
> volume-a60699c5-55c2-4dbc-b74a-64b51f2f4dd2 cinder-volumes2
> Vwi-a-tz-- 1.00g cinder-volumes2-pool
> 0.00
>
>
> The problem is that in /dev/mapper I don't have the link associated with
> the "snapshot" device. Is this a problem related to the operating system
> configuration? Or I missing something in cinder.conf?? Should I modify some
> setting in /etc/lvm/lvm.conf?
>
> More details about my configuration:
> [root at mitaka-cinder-volume1-env3 ~]# cat /etc/redhat-release
> CentOS Linux release 7.3.1611 (Core)
> [root at mitaka-cinder-volume1-env3 ~]# rpm -qa | grep lvm
> lvm2-libs-2.02.166-1.el7_3.1.x86_64
> lvm2-2.02.166-1.el7_3.1.x86_64
>
> My configuration in cinder.conf:
>
> [lvm2]
> volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
> volume_group = cinder-volumes2
> volume_backend_name = LVM_iSCSI2
> iscsi_protocol = iscsi
> iscsi_helper = lioadm
> iscsi_ip_address= 192.168.203.4
> volume_clear=zero
> volume_clear_size=30
> lvm_type = thin
> lvm_conf_file = /etc/cinder/lvm.conf <-- locking_type = 1, use_lvmetad =
> 0, volume_list = [ "@pacemaker" ] (I'm using an active/passive cluster
> with an LVM resource for cinder-volumes2 VG)
> max_over_subscription_ratio = 1.0
>
>
> It seems that if I use thin provisioning the snapshot device doesn't
> exists even though I see it with lvm so dd command fails.
> I'm a bit confused. Any help will be really appreciated
>
> Thank you
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170118/0e8355b4/attachment.html>
More information about the OpenStack-dev
mailing list