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

RE: [linux-lvm] determining lv from mount point



Well.. The reason I say to do it this way is because lvdisplay doesn't
seem to give an "error" code on return (it's always 0) when it's not a
logical volume.  It does display an error message that you'd have to
parse the output for a specific error message.

This should work for LVM, but not sure about LVM2 because I haven't
personally had a chance to play with it. It may work for both, but I'm
not sure.

Kendal.

-----Original Message-----
From: Galen Seitz [mailto:galens seitzassoc com] 
Sent: Tuesday, September 23, 2003 5:20 PM
To: linux-lvm sistina com
Subject: Re: [linux-lvm] determining lv from mount point 



Montgomery, Kendal L <kendal montgomery qwest com> wrote:

> 
> DEVICE=$(df ${1} | grep -v ^Filesystem | awk '{ print $1 }')
> 
> lvscan | grep ${DEVICE} > /dev/null 2>&1

Is using lvscan preferable to something like this
lvdisplay ${DEVICE} > /dev/null 2>&1

I'm currently using LVM, not LVM2 (sorry, I should have said that in the
first message).  Will this method work for LVM2 as well?

thanks,
galen
 

_______________________________________________
linux-lvm mailing list
linux-lvm sistina com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/



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