3

I have a funtoo linux machine which I am trying to add ubuntu to (thats a whole other issue). It is encrypted with luks and has lvm on top of that. I have a 2 TB harddrive (sdb) which I would like to use to take lvm snapshots of the important logical volumes on the machine. I don't need the whole external drive, so I split it up into 3 ~600G partitions. I formatted them with linux LVM, then added one partition (sdb2) to the same volume group of the logical volumes I want to back up on the funtoo machine (e.g. I want to backup /dev/cr/root, /dev/cr/portage...)

Heres where things are weird. When I normally create an logical volume, it doesn't work. However, I can get it to work by specifying maximum verbosity when using lvcreate: lvcreate -vvv. Super weird. Unfortunately, this strange workaround doesn't work when I am trying to create a snapshot.

Here is the end of the output after running sudo lvcreate -vvv --size 35G --snapshot --name snaproot /dev/cr/root

    Creating volume group backup "/etc/lvm/backup/cr" (seqno 21).
        Writing cr metadata to /etc/lvm/backup/.lvm_agamemnon_5516_1152467130
        Committing cr metadata (21)
        Renaming /etc/lvm/backup/cr.tmp to /etc/lvm/backup/cr
        Unlock: Memlock counters: locked:0 critical:0 daemon:0 suspended:0
        Syncing device names
  semid 1343490: semop failed for cookie 0xd4de368: incorrect semaphore state
  Failed to set a proper state for notification semaphore identified by cookie value 223208296 (0xd4de368) to initialize waiting for incoming notifications.
        Udev cookie 0xd4de368 (semid 1343490) destroyed
        cr-snaproot: Skipping NODE_DEL [trust_udev]
      Unlocking /var/lock/lvm/V_cr
        _undo_flock /var/lock/lvm/V_cr
        Closed /dev/mapper/root
        Closed /dev/sdb2
        Freeing VG cr at 0x7543d0.

Anyone ever seen this error before? I am running LVM version: 2.02.95(2) (2012-03-06) and udev version 171.. Should I upgrade udev?

I could backup my disk another way, I just thought this would be the cleanest. Any better ideas?

3
  • I'm seeing online that this is usually related to kernel configuration. more info (I'm seeing hat multiple places but that mailling list post has a specific setting to look at).
    – Bratchley
    Commented Jun 9, 2013 at 1:48
  • Is dm_snapshot loaded? Commented Jun 9, 2013 at 2:03
  • @HaukeLaging Yes, dm_snapshot is loaded.
    – nckturner
    Commented Jun 9, 2013 at 20:35

1 Answer 1

0

As long as you don't get the real problem solved you could try (as another work-around) not to let LVM do all the snapshot stuff but do it the hard way – with dmsetup. Maybe you can avoid the problem trigger that way.

If that is an option for you then have a look at the man page and the kernel documentation. If you don't know how to do it afterwards, then ask. I have done that already.

You must log in to answer this question.

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