Skip to content

Commit 8aa5e70

Browse files
committed
added updated and new files
1 parent d8b31e5 commit 8aa5e70

72 files changed

Lines changed: 3549 additions & 168 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 87 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,108 @@
1-
**SAP HANA Storage Deplyment through Ansible Pipeline**
1+
# Hitachi Storage Provisioning Pipelines for SAP HANA
2+
3+
**Author:** Hitachi Vantara SAP Engineering Team
4+
**Date:** November 2025
5+
**Tested on:** Hitachi Virtual Storage Platform One Block Storage Modules for Red Hat Ansible 4.4.2
26

3-
Hitachi Vantara developed a comprehensive pipeline encapsulated in **main.yml**, to automate the initial creation of SAP HANA scale-up volumes on the VSP Block storage system. These two pipelines have been created and thoroughly tested for all creation tasks:
7+
## Overview
8+
This repository contains automated Ansible pipelines for provisioning and managing Hitachi VSP storage for SAP HANA environments. The pipelines cover both **Scale-Out** and **Scale-Up** deployment models across different VSP storage families (VSP E/F/G Series and VSP One).
49

5-
**sap-hana-tdi-su-single-pool**: Designed for the latest VSPs
10+
## Available Pipelines
611

7-
**sap-hana-tdi-su-two-pool**s: Designed for older VSPs
12+
### 1. SAP HANA Scale-Out (VSP E/F/G Series)
13+
**Directory:** `sap-hana-scale-out-vsp-efg`
14+
**Version:** v1.0
15+
**Description:** Automated storage provisioning for SAP HANA Scale-Out servers using a **Two HDP Storage Pool** method (Data & Log separation).
816

9-
Above pipeline efficiently orchestrates the following tasks:
17+
**Workflow:**
18+
1. `0_storagesystem_validate.yml`: Validates VSP system support.
19+
2. `1_load_nodes.yml`: Loads SAP HANA node details from `nodes_info.csv`.
20+
3. `2_storage_port_create.yml`: Configures VSP storage ports.
21+
4. `3_hostgroup_add-wwn_create.yml`: Creates hostgroups and registers WWNs.
22+
5. `4_paritygroup_get_pg_id.yml`: Checks existing Parity Groups and determines IDs.
23+
6. `5_paritygroup_create.yml`: Creates Parity Groups for storage pools.
24+
7. `6_storagepool_create.yml`: Creates two distinct storage pools (Data and Log).
25+
8. `7_vvol_creation_mapping.yml`: Creates required VVols and maps them to hostgroups.
1026

11-
**Configure Storage Port**: Sets up the necessary storage ports on the Hitachi VSP system using 1_storage_port_create.yml
27+
---
1228

13-
**Configure Hostgroups:** Establishes host groups and adds WWNs of hosts using 2_hostgroup_create.yml
29+
### 2. SAP HANA Scale-Out (VSP One)
30+
**Directory:** `sap-hana-scale-out-vsp-one`
31+
**Version:** v1.0
32+
**Description:** Automated storage provisioning for SAP HANA Scale-Out servers using a **Single DDP Storage Pool** method on VSP One Block Storage.
1433

15-
**Parity Group Creation:** Creates parity groups with the required RAID type for data redundancy with 4_paritygroup_create.yml, after retrieving the parity group ids with 3_paritygroup_get_pg_id.yml
34+
**Workflow:**
35+
1. `0_storagesystem_validate.yml`: Validates VSP One system support.
36+
2. `1_disk_drives_fact.yml`: Checks for required free disk drives.
37+
3. `2_ddp_pool_create.yml`: Creates a Dynamic Provisioning (DDP) Pool.
38+
4. `3_load_nodes.yml`: Loads SAP HANA node details from `nodes_info.csv`.
39+
5. `4_vsp_one_storage_port_create.yml`: Configures storage ports.
40+
6. `5_vsp_one_server_profile_create_so.yml`: Creates server profiles, adds WWNs, and connects ports.
41+
7. `6_vsp_one_volume_creation_mapping.yml`: Creates volumes in the DDP pool and attaches them to server profiles.
1642

17-
**Single or Two Storage Pool with Pool volumes Creation**: Create a storage pool with approx. 4 or 8 Pool Volumes (PVOLs) with 5_storagepool_create.yml
43+
---
1844

19-
**VVOLs Creation and Mapping**: Provisions for Virtual Volumes (VVOLs) are made for operating system and SAP HANA components, including shared, log, and data volumes, utilizing the 6_vvol_creation_in_pool.yml configuration file. These volumes are then mapped to the host groups that contain the host WWNs. The creation process adheres to Hitachi Vantara's best practices for SAP HANA, ensuring optimal performance and reliability.
45+
### 3. SAP HANA Scale-Up (VSP E/F/G Series - Single Pool)
46+
**Directory:** `sap-hana-scale-up-vsp-efg-single-pool`
47+
**Version:** v1.1
48+
**Description:** Automated storage provisioning for a SAP HANA Scale-Up server using a **Single HDP Storage Pool**.
2049

21-
**Variables:** To manage variables effectively, we have utilized two below variables:
50+
**Workflow:**
51+
1. `0_storagesystem_validate.yml`: Validates VSP system support.
52+
2. `1_storage_port_create.yml`: Configures storage ports.
53+
3. `2_hostgroup_create.yml`: Creates hostgroups and registers WWNs.
54+
4. `3_paritygroup_get_pg_id.yml`: Determines Parity Group IDs.
55+
5. `4_paritygroup_create.yml`: Creates Parity Group with required RAID type.
56+
6. `5_storagepool_create.yml`: Creates a single HDP storage pool.
57+
7. `6_vvol_creation_in_pool.yml`: Creates Virtual Volumes and maps LUNs to the hostgroup.
2258

23-
vsp_direct_variables_create.yml: A file containing global variables for the storage provisioning process, there would be a separate file for modification and deletion.
59+
---
2460

25-
ansible_vault_storage_var.yml: An Ansible Vault file to securely store sensitive VSP credentials and connection information.
61+
### 4. SAP HANA Scale-Up (VSP E/F/G Series - Two Pools)
62+
**Directory:** `sap-hana-scale-up-vsp-efg-two-pools`
63+
**Version:** v1.1
64+
**Description:** Automated storage provisioning for a SAP HANA Scale-Up server using **Two HDP Storage Pools** (Data & Log separation).
2665

27-
**Run the ansible playbook command to use pipeline:**
66+
**Workflow:**
67+
1. `0_storagesystem_validate.yml`: Validates VSP system support.
68+
2. `1_storage_port_create.yml`: Configures storage ports.
69+
3. `2_hostgroup_create.yml`: Creates hostgroups and registers WWNs.
70+
4. `3_paritygroup_get_pg_id.yml`: Determines Parity Group IDs.
71+
5. `4_paritygroup_create.yml`: Creates Parity Groups with required RAID type.
72+
6. `5_storagepool_create.yml`: Creates two separate HDP storage pools.
73+
7. `6_vvol_creation_in_pool.yml`: Creates Virtual Volumes in respective pools and maps LUNs.
2874

29-
ansible-playbook main.yml -e "vsp_storage=e1090" -J
75+
---
3076

31-
-e EXTRA_VARS or --extra-vars EXTRA_VARS set additional variables for the Storage which will be use
77+
## Configuration Files
3278

33-
-J or --ask-vault-password or--ask-vault-pass ask for vault password
79+
Each pipeline directory contains specific configuration files that must be updated before execution:
3480

81+
* **`vsp_direct_global_variables.yml`**:
82+
* Contains global variables specific to the selected pipeline (e.g., Pool Names, RAID levels, LDEV sizing).
83+
* *Note: Each pipeline has its own version of this file.*
84+
85+
* **`nodes_info.csv`** (Scale-Out Pipelines only):
86+
* A CSV file containing details for the SAP HANA nodes.
87+
* **Format:** `Hostname,Storage_Port_1,Storage_Port_2,WWPN_1,WWPN_2`
88+
89+
## Prerequisites
90+
* Red Hat Ansible Core - 2.16, 2.17, 2.18
91+
* Python - 3.9 or higher
92+
* Hitachi Virtual Storage Platform One Block Storage Modules for Red Hat Ansible 4.3 or later
93+
* Network connectivity to Hitachi VSP Storage
94+
* Valid credentials configured in `ansible_vault_storage_var.yml`
95+
96+
97+
## Usage
98+
Run the ansible playbook command to use pipeline:
99+
100+
**`ansible-playbook -J main.yml`**
101+
102+
-J or --ask-vault-password or --ask-vault-pass ask for vault password, use this only if vault file is encrypted.
35103

36104
###################################################################################################
37105

38-
**DISCLAIMER: **
39-
_All materials provided in this repository, including but not limited to Ansible Playbooks and Terraform Configurations, are made available as a courtesy. These materials are intended solely as examples, which may be utilized in whole or in part. Neither the contributors nor the users of this platform assert or are granted any ownership rights over the content shared herein. It is the sole responsibility of the user to evaluate the appropriateness and applicability of the materials for their specific use case.
40-
106+
**DISCLAIMER: ** _All materials provided in this repository, including but not limited to Ansible Playbooks and Terraform Configurations, are made available as a courtesy. These materials are intended solely as examples, which may be utilized in whole or in part. Neither the contributors nor the users of this platform assert or are granted any ownership rights over the content shared herein. It is the sole responsibility of the user to evaluate the appropriateness and applicability of the materials for their specific use case.
107+
41108
Use of the material is at the sole risk of the user and the material is provided “AS IS,” without warranty, guarantees, or support of any kind, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Unless specified in an applicable license, access to this material grants you no right or license, express or implied, statutorily or otherwise, under any patent, trade secret, copyright, or any other intellectual property right of Hitachi Vantara LLC (“HITACHI”). HITACHI reserves the right to change any material in this document, and any information and products on which this material is based, at any time, without notice. HITACHI shall have no responsibility or liability to any person or entity with respect to any damages, losses, or costs arising from the materials contained herein._
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Hitachi Storage Provisioning Playbooks for SAP HANA
2+
3+
**Author:** Hitachi Vantara SAP Engineering Team
4+
**Version:** v1.0
5+
**Date:** November 2025
6+
7+
## Overview
8+
This repository contains a collection of Ansible playbooks designed to automate the provisioning, management, and decommissioning of storage resources on Hitachi Virtual Storage Platform (VSP) systems, specifically tailored for SAP HANA environments.
9+
10+
The playbooks are organized into three main categories:
11+
1. **Modification & Expansion:** Tasks for expanding pools, resizing LDEVs, and configuring ports.
12+
2. **Deletion & Decommissioning:** Tasks for removing resources like LDEVs, hostgroups, and pools.
13+
3. **Custom Facts Gathering:** Tasks for retrieving detailed storage system information for reporting and audit purposes.
14+
15+
---
16+
17+
## 1. Modification & Expansion Playbooks
18+
These playbooks are used to modify existing storage infrastructure.
19+
20+
| Playbook File | Summary |
21+
| :--- | :--- |
22+
| `modify_storage_pool_expand.yml` | Expands storage pool capacity by adding a new PVOL from an existing parity group and auto-assigns a sequential name based on existing volume naming convention. |
23+
| `modify_ldev_resize.yml` | Expands the capacity of specified LDEVs to a new size and displays a summary of the resized volumes. |
24+
| `modify_storage_port_config.yml` | Configures storage port settings including security, fabric mode, connection type, and port speed. |
25+
26+
**Configuration File:**
27+
* `vsp_direct_variables_modify.yml` - Central variable file containing configuration parameters for storage pool expansion, LDEV resize, and port configuration.
28+
29+
---
30+
31+
## 2. Deletion & Decommissioning Playbooks
32+
**⚠️ WARNING:** These playbooks perform destructive actions. Use with caution.
33+
34+
| Playbook File | Summary |
35+
| :--- | :--- |
36+
| `delete_all_existing_hostgroups.yml` | Deletes ALL custom hostgroups from the storage system after unpresenting all associated LDEVs. Skips default system hostgroups (ending in `-G00`). |
37+
| `delete_hostgroup.yml` | Deletes a specific hostgroup from multiple ports, forcibly removing all mapped LDEVs and releasing host reserves. |
38+
| `delete_ldevs_by_name.yml` | Finds and forcibly deletes all LDEVs that match a specific name pattern (prefix). Includes unmapping from hostgroups and iSCSI targets before deletion. |
39+
| `delete_ldevs_id_list.yml` | Forcibly deletes a specific list of LDEV IDs provided in a variable list. Handles unmapping from hostgroups automatically. |
40+
| `delete_luns_from_host.yml` | Identifies LDEVs by name pattern and detaches (unpresents) them from their connected hostgroups without deleting the volumes. |
41+
| `delete_paritygroup_id.yml` | Deletes a specific Parity Group by ID. |
42+
| `delete_storage_pool_pg_by_name.yml` | Deletes storage pools matching a name pattern, including all their pool volumes, and subsequently deletes the associated parity groups. |
43+
| `delete_vsp_one_all_servers.yml` | Retrieves all server profiles from VSP One and deletes them by ID while keeping LUN configuration (if specified). |
44+
45+
**Configuration File:**
46+
* `vsp_direct_variables_delete.yml` - Central variable file containing inputs for all delete operations, including pool names, LDEV lists, and naming patterns.
47+
48+
---
49+
50+
## 3. Custom Facts Gathering Playbooks
51+
These playbooks are safe to run and provide detailed reporting on the storage system state.
52+
53+
| Playbook File | Summary |
54+
| :--- | :--- |
55+
| `get_ddp_pool_custom_facts.yml` | Retrieves and displays detailed summary information for all Dynamic Provisioning Pools (DDP), including capacity, RAID levels, drive details, and encryption status. |
56+
| `get_ldevs_facts_name_keyword.yml` | Searches for LDEVs whose names start with a specific keyword (prefix) and displays their ID, Name, and Size. |
57+
| `get_pvol_from_pool.yml` | Retrieves all LDEVs (PVOLs) belonging to storage pools that match a specific name pattern. Displays a summary of pool capacity and individual volume details. |
58+
| `get_storage_pools_custom_facts.yml` | Retrieves detailed facts for all storage pools and displays a custom summary including Pool ID, Type, LDEV count, Status, and Capacity utilization metrics. |
59+
| `hostgroup_custom_facts_all_ports.yml` | Retrieves information for ALL hostgroups on the system, displaying a formatted summary of Hostgroup Name, Port, WWNs, and mapped LUNs. |
60+
| `hostgroup_facts_custom_ports.yml` | Retrieves hostgroup information for specific ports defined in variables, returning details like mapped WWNs and LDEVs. |
61+
| `ldev_pool_id_custom_facts.yml` | Retrieves and lists all LDEVs (PVOLs) residing in a specific storage pool identified by its Pool ID. |
62+
| `paritygroup_custom_facts.yml` | Retrieves and displays configuration facts for a single specified Parity Group ID. |
63+
| `pvol-vvol_by_name_custom_facts.yml` | Filters and displays LDEVs (PVOLs/VVOLs) that contain a specific keyword in their name, showing ID, Name, Size, Parity Group, and Status. |
64+
| `storagesystem_custom_facts.yml` | Retrieves general storage system information including Model, Serial Number, and Microcode version. |
65+
| `vsp_one_volume_custom_facts.yml` | Retrieves volume facts for a specific DDP pool by name using the VSP One API, displaying a summary of LDEV IDs, names, sizes, and connection counts. |
66+
67+
**Configuration File:**
68+
* `vsp_direct_variables_facts.yml` - Central variable file for Fact Gathering playbooks, defining search patterns, pool IDs, and port configurations.
69+
70+
---
71+
72+
## Prerequisites
73+
* Ansible 2.9+
74+
* `hitachivantara.vspone_block` Ansible Collection
75+
* Network connectivity to Hitachi VSP Storage (REST API / VSP One API)
76+
* Valid credentials configured in `ansible_vault_storage_var.yml`
77+
78+
## Usage
79+
1. Update the relevant `variables_*.yml` file with your specific environment details (Pool IDs, Port names, etc.).
80+
2. Run the desired playbook using `ansible-playbook`:
81+
```
82+
ansible-playbook modify_storage_pool_expand.yml --ask-vault-pass
83+
-J or --ask-vault-password or --ask-vault-pass ask for vault password, use this only if vault file is encrypted.
84+
```
85+
## Prerequisites
86+
* Red Hat Ansible Core - 2.16, 2.17, 2.18
87+
* Python - 3.9 or higher
88+
* Hitachi Virtual Storage Platform One Block Storage Modules for Red Hat Ansible 4.3 or later
89+
* Network connectivity to Hitachi VSP Storage
90+
* Valid credentials configured in `ansible_vault_storage_var.yml`
91+
92+
93+
94+
###################################################################################################
95+
96+
**DISCLAIMER: ** _All materials provided in this repository, including but not limited to Ansible Playbooks and Terraform Configurations, are made available as a courtesy. These materials are intended solely as examples, which may be utilized in whole or in part. Neither the contributors nor the users of this platform assert or are granted any ownership rights over the content shared herein. It is the sole responsibility of the user to evaluate the appropriateness and applicability of the materials for their specific use case.
97+
98+
Use of the material is at the sole risk of the user and the material is provided “AS IS,” without warranty, guarantees, or support of any kind, including, but not limited to, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement. Unless specified in an applicable license, access to this material grants you no right or license, express or implied, statutorily or otherwise, under any patent, trade secret, copyright, or any other intellectual property right of Hitachi Vantara LLC (“HITACHI”). HITACHI reserves the right to change any material in this document, and any information and products on which this material is based, at any time, without notice. HITACHI shall have no responsibility or liability to any person or entity with respect to any damages, losses, or costs arising from the materials contained herein._
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
####################################################################
3+
# Hitachi Storage Provisioning Playbooks for SAP HANA
4+
# Author: Hitachi Vantara SAP Engineering Team
5+
# Version: v1.0
6+
# Date: November 2025
7+
#
8+
# Summary: Deletes ALL custom hostgroups from the VSP Storage system
9+
# after unpresenting all associated LDEVs. Skips default system
10+
# hostgroups (ending in -G00).
11+
####################################################################
12+
13+
- name: Delete ALL existing hostgroups
14+
hosts: localhost
15+
gather_facts: false
16+
collections:
17+
- hitachivantara.vspone_block.vsp
18+
19+
vars_files:
20+
- ~/playbooks/ansible_vault_vars/ansible_vault_storage_var.yml
21+
- vsp_direct_variables_delete.yml
22+
23+
vars:
24+
connection_info:
25+
address: "{{ storage_address }}"
26+
username: "{{ vault_storage_username }}"
27+
password: "{{ vault_storage_secret }}"
28+
29+
tasks:
30+
- name: Get all existing hostgroups from storage "{{ storage_address }}"
31+
hitachivantara.vspone_block.vsp.hv_hg_facts:
32+
connection_info: "{{ connection_info }}"
33+
storage_system_info:
34+
serial: "{{ storage_serial }}"
35+
register: all_hostgroups
36+
37+
- name: Unpresent ldevs from all hostgroups from storage "{{ storage_address }}"
38+
hitachivantara.vspone_block.vsp.hv_hg:
39+
connection_info: "{{ connection_info }}"
40+
state: "present"
41+
spec:
42+
name: "{{ item.host_group_name }}"
43+
port: "{{ item.port_id }}"
44+
should_delete_all_ldevs: true
45+
should_release_host_reserve: true
46+
state: "unpresent_ldev"
47+
loop: "{{ all_hostgroups.ansible_facts.hostGroups }}"
48+
loop_control:
49+
label: "{{ item.host_group_name }} on {{ item.port_id }}"
50+
register: result
51+
52+
53+
- name: Delete all custom hostgroups from storage "{{ storage_address }}"
54+
hitachivantara.vspone_block.vsp.hv_hg:
55+
connection_info: "{{ connection_info }}"
56+
state: "absent"
57+
spec:
58+
name: "{{ item.host_group_name }}"
59+
port: "{{ item.port_id }}"
60+
should_delete_all_ldevs: true
61+
should_release_host_reserve: true
62+
state: unpresent_ldev
63+
loop: "{{ all_hostgroups.ansible_facts.hostGroups }}"
64+
loop_control:
65+
label: "{{ item.host_group_name }} on {{ item.port_id }}"
66+
when:
67+
- all_hostgroups.ansible_facts.hostGroups is defined
68+
- not item.host_group_name.endswith('-G00') # Skip default system hostgroups
69+
ignore_errors: true
70+
71+
- name: Done
72+
debug:
73+
msg: "All custom hostgroups has been deleted"

0 commit comments

Comments
 (0)