Nixpkgs: Cannot create a thin volume

Created on 2 Apr 2016  ·  7Comments  ·  Source: NixOS/nixpkgs

Basic info

  • Kernel: 4.4.6 1-NixOS
  • System: NixOS 16.03.498.f8a5d1e
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: "16.03.498.f8a5d1e"

    Issue

This command:

lvcreate -V 200G -T vgthin/thinpool -n backup

complains that it cannot create a thin volume.
Also it does not load kernel module dm-thin-pool.

Expected result

I expected that thin volume will be created.

Actual result

/usr/sbin/thin_check: execvp failed: No such file or directory
WARNING: Integrity check of metadata for pool vgthin/thinpool failed.
/usr/sbin/thin_check: execvp failed: No such file or directory
Check of pool vgthin/thinpool failed (status:2). Manual repair required!
Failed to activate thin pool vgthin/thinpool.

Steps to reproduce

Just run the command.

bug

Most helpful comment

This has broken my boot (initrd) which included this for my rootfs to work:

      extraUtilsCommands = ''
        # cache_check
        copy_bin_and_libs ${pkgs.thin-provisioning-tools}/sbin/pdata_tools
      '';

Now LVM uses a hardcoded path to the thin-provisioning-tools and that is nuked creating the initrd.

Any idea how to fix this? I can't boot 17.03 otherwise.

All 7 comments

As a workaround I've linked it to /usr/sbin. But there should be a better way.

Yes, patching is necessary here.

This has broken my boot (initrd) which included this for my rootfs to work:

      extraUtilsCommands = ''
        # cache_check
        copy_bin_and_libs ${pkgs.thin-provisioning-tools}/sbin/pdata_tools
      '';

Now LVM uses a hardcoded path to the thin-provisioning-tools and that is nuked creating the initrd.

Any idea how to fix this? I can't boot 17.03 otherwise.

By now I'm using packageOverrides to disable "thin-provisioning-tools" input to lvm2.

By the way, my cache situation was explained in #15516

This was an issue for me when using cinder on openstack. However, it got fixed by manually installing thin-provisioning-tools.

close as stagnated?

The “paths in LVM in the initrd are nuked” issue is tracked here: https://github.com/NixOS/nixpkgs/issues/15516

As the initial issue is now, as far as I understand, solved, let's close this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ob7 picture ob7  ·  3Comments

vaibhavsagar picture vaibhavsagar  ·  3Comments

ghost picture ghost  ·  3Comments

chris-martin picture chris-martin  ·  3Comments

matthiasbeyer picture matthiasbeyer  ·  3Comments