All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] how to determine if /dev/... is an LV?
@ 2001-08-22  7:44 Brian J. Murrell
  2001-08-22 14:49 ` josv
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Brian J. Murrell @ 2001-08-22  7:44 UTC (permalink / raw)
  To: linux-lvm

Hi all,

This should hopefully be simple.  I am modifying some code to deal
with LVM.  If I am given a device path for an LV, say, /dev/VG/1,
programatically, how can I determine that it actually is an LV and not
some other kind of device?  The best I have come up with is:

lvdisplay -D -c /dev/VG/lvol1 2>&1 | grep "^/dev/VG/lvol1" >/dev/null

and testing "$?".

Seems kind of "hacky" though.  Is there a better way?

Also, is there any relationship between the output from the lvdisplay
and the minor number for the device?

Thanx,
b.

-- 
Brian J. Murrell

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-08-23 15:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-22  7:44 [linux-lvm] how to determine if /dev/... is an LV? Brian J. Murrell
2001-08-22 14:49 ` josv
2001-08-22 16:43 ` José Luis Domingo López
2001-08-22 15:01   ` Brian J. Murrell
2001-08-23  8:11     ` Heinz J . Mauelshagen
2001-08-23 12:34     ` Keith Hopkins
2001-08-23 15:48 ` Harald Milz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.