[linux-lvm] lvm on initrd

Arkadiusz Miskiewicz arekm at pld-linux.org
Sun Jan 25 15:12:01 UTC 2004

Dnia sob 24. stycznia 2004 10:58, Luca Berra napisał:
> On Sat, Jan 24, 2004 at 01:37:35AM +0100, Arkadiusz Miskiewicz wrote:
> >Are there any plans to add makefile target which would produce very small
> > + features stripped down lvm binary with only two commands:
> >vgscan vgchange
> >for usage on initrd images?
> patches for lvm2 are:
> http://www.comedia.it/~bluca/cooker/lvm2/lvm2-2.00.08-7mdk/LVM2.2.00.08-die
Thanks, I've modified these for my needs.

Unfortunately this doesn't give any significant size drop:
lvm staticly linked with uClibc and device-mapper lib with all features
-rwxr-xr-x    1 misiek   users      555815 2004-01-25 21:05 initrd-lvm
lvm staticly linked with uClibc and device-mapper lib using my patch above (so 
only vgscan and vgchange functions available)
-rwxr-xr-x    1 root     root       482428 2004-01-25 20:51 initrd-lvm

How these sizes look with dietlibc?

Also some problems with lvm way of checking what command user wants based on 
argv[0] came out:
[root at arm misiek]# /sbin/initrd-lvm
  No such command.  Try 'help'.
[root at arm misiek]# ln -s /sbin/initrd-lvm lvm
[root at arm misiek]# ./lvm
  Please supply an LVM command.
  Available lvm commands:
  Use 'lvm help <command>' for more information

  help            Display help for commands
  vgchange        Change volume group attributes
  vgscan          Search for all volume groups
  version         Display software and driver version information

It would be much better if when argv[0] is not known internally for lvm then 
work as argv[0] = lvm.

> L.

Arkadiusz Miśkiewicz     CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux

More information about the linux-lvm mailing list