glfs/general/genlib/libblockdev.xml
2024-01-20 09:48:49 -06:00

277 lines
8.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY libblockdev-download-http
"https://github.com/storaged-project/libblockdev/releases/download/&libblockdev-version;-1/libblockdev-&libblockdev-version;.tar.gz">
<!ENTITY libblockdev-download-ftp " ">
<!ENTITY libblockdev-md5sum "033f2098a13f9dae6105d0337470efd3">
<!ENTITY libblockdev-size "1.0 MB">
<!ENTITY libblockdev-buildsize "13 MB">
<!ENTITY libblockdev-time "0.1 SBU">
]>
<sect1 id="libblockdev" xreflabel="libblockdev-&libblockdev-version;">
<?dbhtml filename="libblockdev.html"?>
<title>libblockdev-&libblockdev-version;</title>
<indexterm zone="libblockdev">
<primary sortas="a-libblockdev">libblockdev</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to libblockdev</title>
<para>
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).
</para>
&lfs120_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&libblockdev-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&libblockdev-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &libblockdev-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &libblockdev-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &libblockdev-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &libblockdev-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">libblockdev Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="glib2"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="cryptsetup"/>,
<xref linkend="gobject-introspection"/> (required for GNOME),
<xref linkend="keyutils"/>,
<xref linkend="libbytesize"/>,
<xref linkend="libnvme"/>, and
<xref linkend="lvm2"/>
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="btrfs-progs"/>,
<xref linkend="gtk-doc"/>,
<xref linkend="mdadm"/>,
<xref linkend="parted"/>,
<ulink url="https://github.com/felixonmars/volume_key">volume_key</ulink>,
<!-- <xref linkend="volume_key"/>,-->
<!-- <ulink url="https://people.redhat.com/~heinzm/sw/dmraid/">dmraid</ulink>, -->
<!-- <ulink url="https://bcachefs.org/">bcachefs</ulink>, -->
<ulink url="https://github.com/pmem/ndctl">ndctl</ulink>, and
<ulink url="https://github.com/Datera/targetcli">targetcli</ulink>
(for tests)
</para>
</sect2>
<sect2 role="installation">
<title>Installation of libblockdev</title>
<!--
<para>
Fix the usage of a glib function deprecated for security:
</para>
<screen><userinput>sed 's/g_memdup/&amp;2/' -i \
src/lib/plugin_apis/vdo.{c,api} \
src/plugins/vdo.c</userinput></screen>
-->
<para>
Install <application>libblockdev</application> by running
the following commands:
</para>
<screen><userinput>./configure --prefix=/usr \
--sysconfdir=/etc \
--with-python3 \
--without-escrow \
--without-gtk-doc \
--without-lvm \
--without-lvm_dbus \
--without-nvdimm \
--without-tools &amp;&amp;
make</userinput></screen>
<para>
The test suite requires <application>targetcli</application>, which
is not a part of BLFS.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make install</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<parameter>--without-escrow</parameter>: This switch allows building
<application>libblockdev</application> without volume_key installed.
</para>
<para>
<parameter>--without-lvm</parameter>
<parameter>--without-lvm_dbus</parameter>
<parameter>--without-tools</parameter>: The combination of these
switches allows
building <application>libblockdev</application> without
<xref linkend="parted"/> installed. Remove it if you've installed
<xref linkend="parted"/> and wish to build the
<command>lvm-cache-stats</command> or <command>vfat-resize</command>
utilities, or wish <application>libblockdev</application> to support
logical volumes.
</para>
<para>
<option>--without-btrfs --without-mdraid --without-tools</option>:
The combination of these switches allows building
<application>libblockdev</application> without
<xref linkend="libbytesize"/> installed. The
<option>--without-mdraid</option> option will break
<xref linkend="udisks2"/>, so don't use it unless you really know what
you are doing.
</para>
<para>
<option>--without-crypto</option>: This switch allows building
<application>libblockdev</application> without
<xref linkend="cryptsetup"/> or <xref linkend="keyutils"/> installed.
This switch will break <xref linkend="udisks2"/>, so don't use it
unless you really know what you are doing.
</para>
<para>
<option>--without-dm --without-lvm --without-lvm_dbus
--without-mpath</option>: The combination of these switches allows
building <application>libblockdev</application> without
<xref linkend="lvm2"/> installed. The <option>--without-dm</option>
and <option>--without-mpath</option> options are not in the instructions
provided by the book because <xref linkend="lvm2"/> is required for
<xref linkend="cryptsetup"/> and <xref linkend="cryptsetup"/> is a
recommended dependency of <application>libblockdev</application> anyway.
</para>
<para>
<option>--without-nvme</option>: This switch allows building
<application>libblockdev</application> without
<xref linkend="libnvme"/> installed. This switch will break
<xref linkend="udisks2"/>, so don't use it unless you really know what
you are doing.
</para>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
lvm-cache-stats and vfat-resize (both optional)
</seg>
<seg>
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
</seg>
<seg>
/etc/libblockdev,
/usr/include/blockdev, and
/usr/share/gtk-doc/html/libblockdev (optional)
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="lvm-cache-stats">
<term><command>lvm-cache-stats</command></term>
<listitem>
<para>
prints statistics on caches on LVM Logical Volumes
</para>
<indexterm zone="libblockdev lvm-cache-stats">
<primary sortas="b-lvm-cache-stats">lvm-cache-stats</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="vfat-resize">
<term><command>vfat-resize</command></term>
<listitem>
<para>
resizes <systemitem class="filesystem">vfat</systemitem>
file systems
</para>
<indexterm zone="libblockdev vfat-resize">
<primary sortas="b-vfat-resize">vfat-resize</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>