linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Urs Thuermann <urs@isnogud.escape.de>
To: linux-lvm@sistina.com
Subject: [linux-lvm] Reducing size of user space lvm binary
Date: 20 Mar 2006 11:39:03 +0100	[thread overview]
Message-ID: <m2wtepcse0.fsf@janus.isnogud.escape.de> (raw)

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

                 reply	other threads:[~2006-03-20 10:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wtepcse0.fsf@janus.isnogud.escape.de \
    --to=urs@isnogud.escape.de \
    --cc=linux-lvm@redhat.com \
    --cc=linux-lvm@sistina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).