Creating LUN views
To create a LUN view for an initiator, use the commands vstorage-target tg-initiator add
or vstorage-target view-add
. The former command adds an initiator to the target group’s ACL and creates a view for it. The latter command is used to add views to initiators that are already on the ACL.
For example:
# vstorage-target tg-initiator add -alias initiator2 -luns 0,1 \ -tg ee764519-80e3-406e-b637-8d63712badf1 -wwn iqn.1994-05.com.redhat:1535946874d
This command adds the initiator with the IQN iqn.1994-05.com.redhat:1535946874d
to the ACL of the target group with the ID ee764519-80e3-406e-b637-8d63712badf1
and creates a view allowing it to access the LUNs with the IDs 0 and 1.
Another example:
# vstorage-target view-add -tg faeacacd-eba6-416c-9a7f-b5ba9e372e16 -lun 2 \ -map 2 -wwn iqn.1994-05.com.redhat:1535946874d
This command adds a view for the same initiator allowing it to access LUN 2 as well.