libblockdev-3.5.0

#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-553

### Chapter 9. General Libraries

- Prev

  libatomic_ops-7.10.0

- Next

  libbytesize-2.12

- Up
- Home

# libblockdev-3.5.0

## Introduction to libblockdev

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).

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://github.com/storaged-project/libblockdev/releases/download/3.5.0/libblockdev-3.5.0.tar.gz

- Download MD5 sum: 68448042ea0a2073098fc4ae37b01cbf

- Download size: 1.2 MB

- Estimated disk space required: 19 MB

- Estimated build time: 0.1 SBU

### libblockdev Dependencies

#### Required

GLib-2.88.1 (GObject Introspection required for GNOME)

#### Recommended

cryptsetup-2.8.6, keyutils-1.6.3, libatasmart-0.19, libbytesize-2.12, libnvme-1.16.1, and LVM2-2.03.40

#### Optional

btrfs-progs-6.19.1, GTK-Doc-1.36.1, JSON-GLib-1.10.8, mdadm-4.4, parted-3.7, smartmontools-7.5, volume_key, ndctl, and targetcli (for tests)

## Installation of libblockdev

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    \
                --without-smartmontools &&
    make

The test suite requires targetcli, which is not a part of BLFS.

Now, as the `root` user:

    make install

## Command Explanations

`--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.7 installed. Remove it if you've installed parted-3.7 and wish to build the lvm-cache-stats or vfat-resize utilities, or wish libblockdev to support logical volumes.

`--without-smartmontools`: This switch allows building libblockdev without JSON-GLib-1.10.8 or smartmontools-7.5 installed. Remove it if you have both packages installed.

`--without-btrfs --without-mdraid --without-tools`: The combination of these switches allows building libblockdev without libbytesize-2.12 installed. The `--without-mdraid` option will break UDisks-2.11.1, so don't use it unless you really know what you are doing.

`--without-crypto`: This switch allows building libblockdev without cryptsetup-2.8.6 or keyutils-1.6.3 installed. This switch will break UDisks-2.11.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.40 installed. The `--without-dm` and `--without-mpath` options are not in the instructions provided by the book because LVM2-2.03.40 is required for cryptsetup-2.8.6 and cryptsetup-2.8.6 is a recommended dependency of libblockdev anyway.

`--without-nvme`: This switch allows building libblockdev without libnvme-1.16.1 installed. This switch will break UDisks-2.11.1, so don't use it unless you really know what you are doing.

## Contents

Installed Programs: lvm-cache-stats and vfat-resize (both optional)
Installed Libraries: libbd_btrfs.so, libbd_crypto.so, libbd_dm.so, libbd_fs.so, libbd_loop.so, libbd_lvm.so (optional), libbd_lvm-dbus.so (optional), libbd_mdraid.so, libbd_mpath.so, libbd_nvme.so, libbd_part.so, libbd_swap.so, libbd_utils.so, and libblockdev.so
Installed Directories: /etc/libblockdev, /usr/include/blockdev, and /usr/share/gtk-doc/html/libblockdev (optional)

### Short Descriptions

lvm-cache-stats | prints statistics on caches on LVM Logical Volumes
vfat-resize | resizes `vfat` file systems

- Prev

  libatomic_ops-7.10.0

- Next

  libbytesize-2.12

- Up
- Home