How do you create LVM snapshot after the error message "not found: device not cleared"
I'm trying to test LVM, but I failed on first, potentially simple task - create a snapshot.
I have following situation:
root@debian:~# vgs
VG #PV #LV #SN Attr VSize VFree
big 1 1 0 wz--n- 14.99g 5.68g
fast 1 2 0 wz--n- 14.99g 4.75g
and
root@debian:~# lvs
Internal error: Using string as sort value for numerical field.
Internal error: Using string as sort value for numerical field.
Internal error: Using string as sort value for numerical field.
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
home big -wi-ao-- 9.31g
root fast -wi-ao-- 9.31g
swap fast -wi-ao-- 952.00m
I'd like to make test snapshot of home, so Figured this will be the command to use:
lvcreate --size 1G -n snap -s /dev/big/home
But it fails with:
/dev/big/snap: not found: device not cleared
Aborting. Failed to wipe snapshot exception store.
Well, obviously there is no /dev/big/snap - I didn't make the snapshot yet.
/dev/big contains only link to home:
root@debian:~# ls -l /dev/big/
total 0
lrwxrwxrwx 1 root root 7 Nov 28 18:09 home -> ../dm-2
What am I missing in here?
Your lvcreate command looks fine. One thing that will cause this error is if udev isn't running. Try service udev status
to see if it's running, and service udev start
if it's not.
This happened to me during a dist-upgrade from Debian 7 Wheezy to Debian 8 Jessie, too, where the udev
package was already upgraded, but the lvm2
wasn't yet. Upgrading the lvm2
package helped and the lvmcreate
command worked fine again.