[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[linux-lvm] how to determine if /dev/... is an LV?
- 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
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]