カーネルの設定
以下に示すカーネル設定のオプションを有効にして、カーネルを再コンパイルしてください。
注記
There are several other Device Mapper options in the kernel
beyond those listed below. In order to get reasonable results if
running the regression tests, all must be enabled either
internally or as a module. The tests will all time out if Magic
SysRq key is not enabled.
Device Drivers --->
[*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
<*/M> Device mapper support [CONFIG_BLK_DEV_DM]
<*/M> Crypt target support [CONFIG_DM_CRYPT]
<*/M> Snapshot target [CONFIG_DM_SNAPSHOT]
<*/M> Thin provisioning target [CONFIG_DM_THIN_PROVISIONING]
<*/M> Mirror target [CONFIG_DM_MIRROR]
Kernel hacking --->
Generic Kernel Debugging Instruments --->
[*] Magic SysRq key [CONFIG_MAGIC_SYSRQ]
LVM2 のインストール
以下のコマンドを実行して LVM2 をビルドします。
SAVEPATH=$PATH &&
PATH=$PATH:/sbin:/usr/sbin &&
./configure --prefix=/usr \
--exec-prefix= \
--enable-cmdlib \
--enable-pkgconfig \
--enable-udev_sync &&
make &&
PATH=$SAVEPATH &&
unset SAVEPATH
The tests use udev for logical
volume synchronization, so the LVM udev rules and some utilities
need to be installed before running the tests. If you are
installing LVM2 for the first
time, and do not want to install the full package before running
the tests, the minimal set of utilities can be installed by running
the following instructions as the root
user:
make -C tools install_tools_dynamic &&
make -C udev install &&
make -C libdm install
To test the results, issue, as the root
user:
make S=shell/thin-flags.sh check_local
The S=... option
allows to skip tests. The shell/thin-flags.sh test has been
reported to freeze the computer. Other targets are available and
can be listed with make -C test
help. The test timings are very dependent on the
speed of the disk(s), and on the number of enabled kernel options.
The tests do not implement the 「expected fail」 possibility, and a small
number of test failures is expected by upstream. More failures may
happen because some kernel options are missing. For example, the
lack of the dm-delay device
mapper target may explain some failures. Some tests are flagged
「warned」 if
thin-provisioning-tools
are not installed. A workaround is to add the following flags to
configure:
--with-thin-check= \
--with-thin-dump= \
--with-thin-repair= \
--with-thin-restore= \
--with-cache-check= \
--with-cache-dump= \
--with-cache-repair= \
--with-cache-restore= \
Some tests may hang. They can be removed if necessary, for example:
rm
test/shell/lvconvert-raid-reshape.sh. The tests
generate a lot of kernel messages, which may clutter your terminal.
You can disable them by issuing dmesg
-D before running the tests (do not forget to issue
dmesg -E when tests
are done).
注記
The checks create device nodes in the /tmp directory. The tests
will fail if /tmp is mounted with the nodev option.
root
ユーザーになって以下を実行します。
make install
make install_systemd_units
コマンド説明
PATH=$PATH:/sbin:/usr/sbin: The
path must contain /sbin
and
/usr/sbin
for proper system tool
detection by the configure script. This
instruction ensures that PATH is properly set even if you build as
an unprivileged user.
--enable-cmdlib
:
このスイッチは共有コマンドライブラリをビルドすることを指示します。 デーモンをビルドする際にはこれが必要になります。
--enable-pkgconfig
:
このスイッチの指定により pkgconfig サポートファイルをインストールします。
--enable-udev_sync
: このスイッチは
Udev との同期処理を有効にします。
--enable-dmeventd
: このスイッチは Device Mapper イベントデーモンをビルドすることを指示します。
make
install_systemd_units: This is needed to install a
unit that activates logical volumes at boot. It is not installed by
default.