[blfs-dev] LVM2

Bruce Dubbs bruce.dubbs at gmail.com
Fri Feb 3 20:20:48 PST 2012

Qrux wrote:
> The instructions on the svn LVM2 page could use a bit of updating.
> The package isn't usable (at least according to docs) without certain
> options.

I've certainly been able to create, format, and mount an lvm partition 
with the current commands:

# pvcreate /dev/sdb5
   Writing physical volume data to disk "/dev/sdb5"
   Physical volume "/dev/sdb5" successfully created
# vgcreate lfstest /dev/sdb5
   Volume group "lfstest" successfully created
# lvcreate --name lvm1 --size 40G lfstest
   Logical volume "lvm1" created
# mkfs -t ext4 /dev/lfstest/lvm1
# mount /dev/lfstest/lvm1 /mnt/test
# df
Filesystem                Size  Used Avail Use% Mounted on
/dev/mapper/lfstest-lvm1   40G  176M   38G   1% /mnt/test

> They're on the page, but they're not in the build commands.
> Also, there's some nice info in the docs subdir of the tarball that
 > don't get installed.
> I propose this update to the LVM2 page (including a version bump to LVM2.2.09.90):
> ====
> ./configure --prefix=/usr --enable-pkgconfig --enable-dmeventd --enable-cmdlib

When you do that, the only executable added is dmeventd, but the 
executables do link to a new library.  The description of dmeventd is 
"the event monitoring daemon for device-mapper devices.  Library plugins 
can register and carry out actions triggered when particular events occur."

I have no idea what that means or how it would be used.  The fact that 
it's a daemon appears to mean that a boot script needs to be written to 
control it.  I'm reluctant to do that unless I know what it does.

If we have a writeup for a separate page "Using LVM" that explains it, 
I'd think the change would be appropriate.

> LVM2_DOC_DIR=/usr/share/doc/lvm2-2.02.90
> install -d ${LVM2_DOC_DIR}
> cp -va doc/* ${LVM2_DOC_DIR}
> rm -vf ${LVM2_DOC_DIR}/Makefile{,.in}

I'd think this would be better for the last two lines:

  cp -v doc/{*.txt,example*} ${LVM2_DOC_DIR}

Although in the book, for consistency, I'd spell out 
/usr/share/doc/lvm2-2.02.90 in both the install and cp commands.

   -- Bruce

More information about the blfs-dev mailing list