[linux-lvm] FWD: Re: Draft Snapshot Regression Test

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

 



On the xfs regression test I posted yesterday, there is concern that my check for lvm being present in the kernel is not general enough to check LVM 1 and LVM 2, or even EVMS.

Can anyone recommend a more general method of checking?

Possibilities:

   lsmod | grep lvm                only looks for modules, so it is flawed.

   if [ -d /proc/lvm ]                apparently only works for LVM 1

   grep lvm /proc/devices       might be a good choice, but I assume will not find EVMS setups


Greg Freemyer
Internet Engineer
Deployment and Integration Specialist
Compaq ASE - Tru64 v4, v5
Compaq Master ASE - SAN Architect
The Norcross Group
www.NorcrossGroup.com

---------- Forwarded Message ----------

FROM:      Andi Kleen <ak@suse.de>
TO:      Ragnar Kj?rstad <xfs@ragnark.vestdata.no>
DATE:      Thu, 29 Aug 2002 14:37:37 +0200

RE:      Re: Draft Snapshot Regression Test

On Thu, Aug 29, 2002 at 02:11:46PM +0200, Ragnar Kj?rstad wrote:
> 
> On Thu, Aug 29, 2002 at 05:58:21PM +1000, Nathan Scott wrote:
> > > #Verify we have the a lvm enabled kernel
> > > # TODO (This assumes lvm is a module.  What if it is linked?  I don't know how to check that.
> > > lsmod | grep lvm-mod;
> > > if [ $? != 0 ]; then _notrun "This test requires the LVM kernel module be present"; fi
> > 
> > A better approach here would be to grep for lvm in /proc/devices,
> > this would work for module/non-module builds.
> 
> or 
> [ -d /proc/lvm ] || _notrun 

This will likely break with LVM2/EVMS, which have lvm compatible 
user utils and support snapshots, but not the /proc file.

-Andi

_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html


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

  Powered by Linux