1753856 Members
7483 Online
108808 Solutions
New Discussion юеВ

List inactive vgs

 
Coolmar
Esteemed Contributor

List inactive vgs

Is there a way to print a list (in a script) of the inactive volume groups?

Thanks,
SD
5 REPLIES 5
Geoff Wild
Honored Contributor

Re: List inactive vgs

vgdisplay >/dev/null


Standard error will display on your screen.

Example:


# vgdisplay >/dev/null
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vg13".



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Coolmar
Esteemed Contributor

Re: List inactive vgs

Yeah, thanks Geoff....that is what I am using but was hoping there was a command or switch that would do something like list the vg's and their status.

Thanks again.
Torsten.
Acclaimed Contributor

Re: List inactive vgs

The command is not that bad - it list the vg's and their status!

For activated VG you have an output like

--- Volume groups ---
VG Name /dev/vgdata
VG Write Access read/write, read/write-quiesced
VG Status available, shared, client
...

among other lines and for non-activated VG you have (according to the example above)

vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "/dev/vg13".

Not enough for printing a list in a script?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Coolmar
Esteemed Contributor

Re: List inactive vgs

Yes, I created a script...I was wondering if there was a command or a switch.
Coolmar
Esteemed Contributor

Re: List inactive vgs

n/a