To test out thinly provisioned snapshots before applying them to a production system for backup purpose, I did the following:
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
All commands succeeded, but when lvdisplay storage/snap1
gives as status NOT available
and \dev\storage\snap1
is not created by the device mapper:
--- 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
made no difference either. Did I just miss a final step to make the snapshot accessible? Or what else could be the problem here?
OS: Fedora 22 (x64) Kernel: 4.2.6-200.fc22.x86_64 LVM2: 2.02.116