Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Spreadsheet or script for creating CLI commands for new volumes, luns, and IGs?
2023-02-06
02:04 PM
2,465 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all. I'm just curious if anyone has built a spreadsheet (or other method) to create all the commands (vol create, lun create, lun map) (using concatenate or similar) that would create volumes, luns and igs at the CLI? Then I would copy the commands out of the spreadsheet and paste them into the CLI. I have to add 40 individual LUNs to 40 different servers. I would like to paste these server names into a column in Excel along with the IG group names and have it put together the CLI commands. If someone has a more efficient way to do this, please share if you don't mind. Its only 40 LUNs this time, but we have a project coming up which will require me to do this for many more production servers. Thanks for the help! Carl
Solved! See The Solution
1 ACCEPTED SOLUTION
Carl-in-Austin has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Carl,
I don't have the CLI way to do it, but my suggestion is that you take a look at Ansible and maybe ask internally if you have a team that knows Ansible that could assist. It is not a programming language but is powerful and can get your job done. We have some blog posts about automating with Ansible here: https://netapp.io/configuration-management-and-automation/.
Here are some of the commands on the NetApp side that you would need:
Create a volume: https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_volume_module.html#ansible-collections-netapp-ontap-na-ontap-volume-module
Create an iGroup - https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_igroup_module.html
Create your LUN - https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_lun_module.html#ansible-collections-netapp-ontap-na-ontap-lun-module
Map your LUN - https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_lun_map_module.html#ansible-collections-netapp-ontap-na-ontap-lun-map-module
There are also commands for Linux, Windows and VMWare to automate adding those LUNs to the servers.
There is a bit of a learning curve, I admit, and the initial creating of the necessary files takes a bit if you don't know what you are doing, however this is a great way to automate everything you need to do, from storage to server to network. The good thing is, you will find a community on the netapp.io page under the Discord menu item and there are a lot of resources for finding Ansible examples, including the GitHub page at https://github.com/netapp-automation under ansible.
2 REPLIES 2
Carl-in-Austin has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Carl,
I don't have the CLI way to do it, but my suggestion is that you take a look at Ansible and maybe ask internally if you have a team that knows Ansible that could assist. It is not a programming language but is powerful and can get your job done. We have some blog posts about automating with Ansible here: https://netapp.io/configuration-management-and-automation/.
Here are some of the commands on the NetApp side that you would need:
Create a volume: https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_volume_module.html#ansible-collections-netapp-ontap-na-ontap-volume-module
Create an iGroup - https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_igroup_module.html
Create your LUN - https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_lun_module.html#ansible-collections-netapp-ontap-na-ontap-lun-module
Map your LUN - https://docs.ansible.com/ansible/latest/collections/netapp/ontap/na_ontap_lun_map_module.html#ansible-collections-netapp-ontap-na-ontap-lun-map-module
There are also commands for Linux, Windows and VMWare to automate adding those LUNs to the servers.
There is a bit of a learning curve, I admit, and the initial creating of the necessary files takes a bit if you don't know what you are doing, however this is a great way to automate everything you need to do, from storage to server to network. The good thing is, you will find a community on the netapp.io page under the Discord menu item and there are a lot of resources for finding Ansible examples, including the GitHub page at https://github.com/netapp-automation under ansible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If have laptop etc. then can install install say UNBUNTU, Python and ansible on the LINUX VM (most decent laptops can be configured for Hyper-V if have windows, easier if using LINUX machine. If use NetApp simulator as test bed then cant break anything you cant rebuild in 30 mins.
