libblockdev is a C library supporting GObject Introspection for manipulation of block devices. It has a plugin-based architecture where each technology (like LVM, Btrfs, MD RAID, Swap,...) is implemented in a separate plugin, possibly with multiple implementations (e.g. using LVM CLI or the new LVM DBus API).
This package is known to build and work properly using an LFS 12.2 platform.
Download (HTTP): https://github.com/storaged-project/libblockdev/releases/download/3.1.1-1/libblockdev-3.1.1.tar.gz
Download MD5 sum: 28d43f2d6bff85245502a8c4c478c5a3
Download size: 1.0 MB
Estimated disk space required: 13 MB
Estimated build time: 0.1 SBU
GLib-2.80.4 (GObject Introspection required for GNOME)
cryptsetup-2.7.4, keyutils-1.6.3, libbytesize-2.11, libnvme-1.10, and LVM2-2.03.26
btrfs-progs-6.10.1, GTK-Doc-1.34.0, mdadm-4.3, parted-3.6, volume_key, ndctl, and targetcli (for tests)
First, work around a problem when using e2fsprogs-1.47.1 or later:
find -name Makefile.in -exec sed -i "s/-Werror//" {} \;
        Install libblockdev by running the following commands:
./configure --prefix=/usr      \
            --sysconfdir=/etc  \
            --with-python3     \
            --without-escrow   \
            --without-gtk-doc  \
            --without-lvm      \
            --without-lvm_dbus \
            --without-nvdimm   \
            --without-tools    &&
make
        The test suite requires targetcli, which is not a part of BLFS.
          Now, as the root user:
        
make install
          --without-escrow: This
          switch allows building libblockdev
          without volume_key installed.
        
          --without-lvm --without-lvm_dbus --without-tools: The combination of
          these switches allows building libblockdev without parted-3.6
          installed. Remove it if you've installed parted-3.6 and wish
          to build the lvm-cache-stats or vfat-resize utilities, or wish
          libblockdev to support logical
          volumes.
        
          --without-btrfs --without-mdraid
          --without-tools: The combination of these switches allows
          building libblockdev without
          libbytesize-2.11 installed. The --without-mdraid option will break UDisks-2.10.1, so
          don't use it unless you really know what you are doing.
        
          --without-crypto: This switch allows
          building libblockdev without
          cryptsetup-2.7.4 or keyutils-1.6.3
          installed. This switch will break UDisks-2.10.1, so don't
          use it unless you really know what you are doing.
        
          --without-dm --without-lvm --without-lvm_dbus
          --without-mpath: The combination of these switches allows
          building libblockdev without
          LVM2-2.03.26 installed. The --without-dm and --without-mpath options are not in the instructions
          provided by the book because LVM2-2.03.26 is
          required for cryptsetup-2.7.4 and cryptsetup-2.7.4 is a recommended dependency
          of libblockdev anyway.
        
          --without-nvme: This switch allows
          building libblockdev without
          libnvme-1.10 installed. This switch will break
          UDisks-2.10.1, so don't use it unless you
          really know what you are doing.