Home > Storage > PowerMax and VMAX > Storage Admin > Dell PowerMax: Ansible Modules Best Practices > Adding volumes
You can add volumes to an existing storage configuration in a number of ways, using either the storage group module or the volume module. Using the storage group module is generally recommended because it is the simplest method and keeps playbooks to a minimum number of tasks.
To add volumes, append the new volume to the variable containing the list of volumes in the storage group and re-run your playbook. An example of this is on the Dell GitHub here.
The playbook has a single task to add volumes. Due to the idempotent nature of the Ansible modules, running the playbook with a different or modified volume_list will make the necessary changes.
For example, adding a device to an SRDF replicated storage group also creates a pairing on the remote array and ensures that hosts at both sites have access to an equal number of volumes automatically.
Best Practice: When adding volumes to a storage group, the volume name must be unique within the storage group. The volume name is only a label and therefore is not unique to every volume in the PowerMax array. Choosing a naming convention for your volume names can help storage administrators easily identify volumes on the hosts. After provisioning using the Dell INQ utility, customers can run inq -identifier device_name to see the assigned volume name from the host operating system.
Note: if your storage group is replicated with SRDF to a single remote site, adding a volume will result in the volume being protected with the same mode of SRDF operation. It will also be automatically added to the storage group of the same name at the remote site. If your existing storage group is protected with multi-site SRDF configuration, see Adding volumes to multi-site SRDF environments (three sites).
Figure 18 shows the recap for running the provision playbook with the new volume list variable with the additional volume. Because all other inputs were the same, only this task generated a change. Figure 19 shows the playbook running with the verbose option, detailing the exact changes under the covers.
Figure 20 shows the detailed output for the running task. The returned JSON includes a key added_vols_details that details any new volumes added in the task. On this run of the playbook, device 0042F was added to the storage group. This information can be captured and used in subsequent tasks. Using the return with Ansible registry is discussed in What is a playbook?.