[linux-lvm] IOP selection scripts (was: '/etc/init.d/lvm' script in debian package)

Andreas Dilger adilger at turbolinux.com
Thu Dec 21 22:06:52 UTC 2000


Claudio writes:
> On Wed, 20 Dec 2000, Andreas Dilger wrote:
> > Is there ever a reason why you would want to install this program as
> > "lvm-wrapper" anywhere?
> 
> I'm installing it as /sbin/lvm-wrapper and symlinking all utilities to it
> (seems better than using one wrapper per tool).

Why not simply install it as one of the commands (e.g. vgscan) and make
hard links to it.  Hard links don't even take up inodes - only directory
entries.

> Regarding lvmiopversion, is it supposed to be statically linked? Otherwise,
> it wouldn't know what liblvm link to, assuming that we have liblvm-iopX.so.

Yes.  Basically, it is only a single ioctl call, so it is not dependent
on the LVM version at all.  Compiled in tools as:

gcc -I . -I lib -o lvmiopversion lvmiopversion.c lib/lvm_get_iop_version.c
	lib/lvm_check_special.c

and stripped it is only 4408 bytes on my system.

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert



More information about the linux-lvm mailing list