为了在将精简配置快照应用于生产系统以进行备份之前对其进行测试,我执行了以下操作:
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
Run Code Online (Sandbox Code Playgroud)
所有命令都成功了,但是当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 …