LVM 精简快照不可用

LVM 精简快照不可用

为了在将精简配置的快照应用到生产系统进行备份之前对其进行测试,我执行了以下操作:

lvcreate -L1G -T storage/thinpool
lvcreate -V10M -T storage/thinpool -n thinvol1
lvcreate -V10M -T storage/thinpool -n thinvol2
# [create ext4 fs on thinvol1, mount it, add some files]
lvcreate -s --name snap1 storage/thinvol1

所有命令均成功,但当lvdisplay storage/snap1给出状态时NOT available且未\dev\storage\snap1由设备映射器创建: --- Logical volume --- LV Path /dev/storage/snap1 LV Name snap1 VG Name storage LV UUID csDP34-HlpY-Rd8x-yJgr-99PW-jHZu-T7wsUJ LV Write Access read/write LV Creation host, time localhost.localdomain, 2015-11-24 10:01:43 +0100 LV Pool name thinpool LV Thin origin name thinvol1 LV Status NOT available LV Size 12.00 MiB Current LE 3 Segments 1 Allocation inherit Read ahead sectors auto

lvchange -a y storage/snap1也没什么区别。我是不是错过了使快照可访问的最后一步?或者这里还有什么问题?

操作系统:Fedora 22(x64) 内核:4.2.6-200.fc22.x86_64 LVM2:2.02.116

答案1

默认情况下,精简快照设置为不可用,并设置了“跳过激活”位。

尝试发行lvchange -ay -Ky storage/snap1后你的薄快照就可用了。

要永久关闭“跳过激活”标志,请发出lvchange -kn storage/snap1

相关内容