Detecting active/inactive volume groups
Hello world,
I am searching for a way to determine which volume groups on a system are active; ideally I'd like to be able to list all active volume groups and all inactive volume groups separately, from the command line.
With older versions of LVM, I believe this was possible by using the -D flag to vgdisplay. Unfortunately, with current versions of LVM - I'm running 2.02.66 presently - the -D flag no longer exists, and I cannot find equivalent functionality in vgdisplay or in any other command. In fact, vgdisplay now appears to always list all VGs, regardless of their state, and makes no mention whatsoever of active or inactive state.
Is it possible to determine which VGs are active or inactive, with recent versions of LVM? How should I go about doing this?
Thanks,
- Keegan
Signature · 4 lines
Keegan Quinn <[email protected]> Software Support Engineer Storix, Inc. (619) 543-0200
The concept of 'active' (or 'available') and 'inactive' in respect of Volume Groups has been removed. Under the LVM1 architecture it made sense - VG metadata was cached in-kernel - but with device-mapper it doesn't - the kernel doesn't know anything about VGs, only LVs.
Do your detection at the LV level instead.
Alasdair