5

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?

1
  • While searching fro answer, I found this: bugs.debian.org/cgi-bin/bugreport.cgi?bug=343671 - but it didn't help either, as I didn't have the files mentioned there. So finally I made apt-get update and upgrade, and the problem went away. Not sure what caused it, but snapshotting works now.
    – eijeze
    Nov 29, 2014 at 11:26

3 Answers 3

5

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.

1
  • 1
    udev is running, and was running. rebooted, restarted, still the same problem.
    – eijeze
    Nov 28, 2014 at 19:01
2

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.

0

This happened to me after a failed vgimportclone run. The solution was to make sure the affected volume group was inactive (vgchange -a n) and then to manually remove all those leftover broken symlinks.

Note that deactivation of volume groups may be foiled by bugs such as https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1088081

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .