lvm on initrd
Hi,
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?
Such thing is for example done with mdadm tool for raid arrays: make mdassemble produces very small binary which can only assemble arrays (so very nice to use on initrd) while there is also mdadm binary with full support for everything.
Signature · 2 lines
Arkadiusz Mi¶kiewicz CS at FoE, Wroclaw University of Technology arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux
Quoted 3 lines · Arkadiusz Miskiewicz
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-diet.patch.bz2
patches for lvm1 are:
http://www.comedia.it/~bluca/cooker/lvm2/lvm1-1.0.8-2mdk/lvm-1.0.8-dietlibc.patch.bz2
http://www.comedia.it/~bluca/cooker/lvm2/lvm1-1.0.8-2mdk/lvm-1.0.8-wrapper.patch.bz2
NB1 the lvm1 patches come originally from redhat, but have been modified NB2 the urls there might change slightly due to repackaging of rpms, so if (404) backtrack();
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \
Dnia sob 24. stycznia 2004 10:58, Luca Berra napisa³:
Quoted 9 lines · Arkadiusz Miskiewicz
Quoted 4 lines
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
t.patch.bz2
Thanks, I've modified these for my needs.
http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/lvm2-initrd.patch?rev=1.1
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@arm misiek]# /sbin/initrd-lvm
No such command. Try 'help'.
[root@arm misiek]# ln -s /sbin/initrd-lvm lvm
[root@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.
Quoted 1 line
L.
Signature · 2 lines
Arkadiusz Mi¶kiewicz CS at FoE, Wroclaw University of Technology arekm.pld-linux.org, 1024/3DB19BBD, JID: arekm.jabber.org, PLD/Linux
Quoted 7 lines · Arkadiusz Miskiewicz
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-lvmHow these sizes look with dietlibc?
-rwxr-xr-x 1 root root 308180 Jan 23 22:14 /sbin/lvm2-static*
Which is still very big, but reducing it will take significantly more work.
Quoted 3 lines
Also some problems with lvm way of checking what command user wants based on argv[0] came out:
[root@arm misiek]#/sbin/initrd-lvm
No such command. Try 'help'.
...
Quoted 2 lines
It would be much better if when argv[0] is not known internally for lvm then work as argv[0] = lvm.
unfortunately it seems done the other way around in lvm.c i found it easier to add possible aliases for lvm in there
http://www.comedia.it/~bluca/cooker/lvm2/lvm2-2.00.08-7mdk/lvm2-alternatives.patch.bz2
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \