Linux LVM users
 help / color / mirror / Atom feed
From: "Brian J. Murrell" <6888736b923846176364586bf2e7649f@interlinx.bc.ca>
To: linux-lvm@sistina.com
Subject: [linux-lvm] how to determine if /dev/... is an LV?
Date: Wed, 22 Aug 2001 03:44:25 -0400	[thread overview]
Message-ID: <20010822034425.F8742@pc.ilinx> (raw)

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

             reply	other threads:[~2001-08-22  7:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-22  7:44 Brian J. Murrell [this message]
2001-08-22 14:49 ` [linux-lvm] how to determine if /dev/... is an LV? 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010822034425.F8742@pc.ilinx \
    --to=6888736b923846176364586bf2e7649f@interlinx.bc.ca \
    --cc=linux-lvm@sistina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox