Reducing size of user space lvm binary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am currently converting from LVM1 to DM + LVM2.  I have my root fs
on LVM so I need to load the kernel modules and scan for VGs in initrd
before mounting the real root device.

With LVM1, I had copied liblvm-10.so, vgscan and vgchange to my initrd
file system.  With LVM2, everything is in one large binary, which
consumes considerably more space on my initrd, which I'd like to
reduce.

I changed tools/commands.h to only contain vgscan and vgchange, and
then relinked the lvm binary with

    gcc -s -o lvm lvm.o lvmcmdline.o vgchange.o vgscan.o vgmknodes.o \
        pvmove.o toollib.o polldaemon.o -Wl,--export-dynamic         \
        -L../lib -L/lib -llvm -ldevmapper -ldl  -rdynamic

The size is still 300 kB.  Is there a way to further reduce its size?

Is vgscan required in the initrd?  The man page for vgscan says that
in LVM2, vgscans take place automatically.  What does this mean?  When
is the scan done automatically?  Is it done as part of other commands
like vgchange?

urs

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux