Forum Discussion

liuyl's avatar
liuyl
Level 6
6 years ago

List volume groups

**** Moved to new discussion from https://vox.veritas.com/t5/NetBackup/View-Volume-Groups-From-CLI/m-p/734589/thread-id/199858  ****

I just want to ask what command can output all the current volume groups list,   such as "vmpool  -listall" !?

  • liuyl

    You can run "vminitlists" under volmgr\bin without any switches

    This should list all the NetBackup volume groups for you.

    But the output discards the robot type from the volume group name. So the finaly result would be the volume group+robot type from the output. But if you are looking for a single command then this is your best bet.

     

    Or then as mentioned by Marianne you can simply run the vmquery command and generate the list by running something like this

    vmquery -a | grep group | awk '{print $3}' | sort -u

5 Replies

  • liuyl

    vmpool command is for Volume Pools, not Volume Groups.

    I am not aware of any 'out of the box' command to list volume groups.
    You will probably need to parse vmquery output to list Volume Groups.

    • Amol_Nair's avatar
      Amol_Nair
      Level 6

      liuyl

      You can run "vminitlists" under volmgr\bin without any switches

      This should list all the NetBackup volume groups for you.

      But the output discards the robot type from the volume group name. So the finaly result would be the volume group+robot type from the output. But if you are looking for a single command then this is your best bet.

       

      Or then as mentioned by Marianne you can simply run the vmquery command and generate the list by running something like this

      vmquery -a | grep group | awk '{print $3}' | sort -u

      • liuyl's avatar
        liuyl
        Level 6
        Good! Maybe this should be the only way for querying all the volume groups, especially for the older NBU versions!! Thank you for all !
    • liuyl's avatar
      liuyl
      Level 6

      I surely know that "vmpool -listall" is only corresponding to the volume pool list!
      So I mean what command can only output all the current volume groups list !

      • There is not command that can do it. As Marianne explained, you can list all the volumes, and from the resulting output, you can build a list of volume groups.