Useful Command for Identifying All Volumes Associated with an Initiator Group

Document created by abiren Employee on Jul 15, 2013
Version 1Show Document
  • View in full screen mode

I cannot take credit for this command, rather it was obtained from a fellow SE, but it has become useful to a number of customers.

 

for vol in `vol --list | tail -n +5 | cut -d " " -f 1`; do vol --info $vol | grep '\(Name:\|Initiator Group:\)' | sed 's/Name:\(.*\)/Volume: \1 /; $!N; s/\n\s\+Initiator //; P; D'; done;

 

This will give an output similar to the following:

 

Volume: volume1 Group: Initiator1

Volume: volume2 Group: Initiator2

Volume: volume3 Group: Initiator2

Volume: volume4 Group: Initiator1

Volume: volume5 Group: Initiator2

Attachments

    Outcomes