Infoscale Ansible Queries
Hello
I've read the infoscale ansible guide https://sort.veritas.com/public/infoscale/ansible/linux/docs/Infoscale7.4.2_Ansible_Support_Linux_Guide.pdf and wanted to configure a diskgroup and volumes using the templates plublished by matthewyee https://github.com/VeritasOS/infoscale_ansible
It is my understanding that we can deploy any of the following product options using the install (yum), and license modules
ENTERPRISE,AVAILABILITY,STORAGE,orFOUNDATION.
I had already installed infoscale so I did not use this option / playbook, I only modified the following templates from the github repo. I have not configured a cluster, and I only have two disks assigned to this server, sdb, and sdc.
[root@ansible infoscale_ansible]# cat roles/infoscale/tasks/create_dg_vol.yml
[root@ansible infoscale_ansible]# cat roles/infoscale/tasks/create_dg_vol.yml --- - name: Facters veritas_infoscale: module: site_facters register: facts - name: Create DG, Volume veritas_infoscale: module: vxvm_dgvolfs state: present dg1: dgname: dg1 dgtype: shared disks: ['sdb','sdc'] volinfo: - - testvol1 - 1g - layout=concat seednode: 172.16.209.51 taginfo: null facters: "{{ groups['all'] |map('extract', hostvars, ['facts','infoscale_facts'])| select()|list }}"
I removed fss
I kept dgtype as shared even though the documentation says you can leave it blank if you're not created a shared diskgroup which I am not since I do not have a cluster.
I modified the disks to be disks: ['sdb','sdc']
I modified the volume to create to a a single volume of 1GB
I modified the seednode: 172.16.209.51
I execute the play
[root@ansible infoscale_ansible]# ansible-playbook infoscale_dg_create.yml -v Using /root/ansible/infoscale_ansible/infoscale_ansible/ansible.cfg as config file PLAY [Create Disk Groups and Volumes] ************************************************************************************************************************************************************************ TASK [Facters] *********************************************************************************************************************************************************************************************** ok: [172.16.209.51] => {"changed": 0, "infoscale_facts": {"infoscale": "{\"dg_info\": \"\", \"haconf_writable\": 1, \"cluster_id\": \"\", \"vxfenmode\": \"N/A\", \"padv\": \"rhel7_x86_64\", \"cluster_uuid\": \"\", \"llt_info\": {\"status\": \"unhealthy\", \"running\": \"No\"}, \"free_disks\": [], \"onenode_cluster\": 0, \"CFSSG_SVC_GRP\": \"\", \"asymmetry_value\": \"asymmetric\", \"cluster_name\": \"\", \"gab_info\": {\"status\": \"unhealthy\", \"running\": \"No\"}, \"version\": \"7.4.2.0000\", \"product\": \"enterprise\", \"vxdisk_list\": [{\"info\": \"format=LVM\", \"Disk\": \"sda\", \"udid\": \"VMware%5FVirtual%20disk%5FOTHER%5FDISKS%5Finfoscale%5F%2Fdev%2Fsda\", \"site\": \"-\", \"dgid\": \"\", \"hostid\": \"\", \"flags\": \"LVM online ready private autoconfig invalid\", \"dgname\": \"\", \"guid\": \"-\", \"type\": \"auto\", \"diskid\": \"\"}, {\"info\": \"format=none\", \"Disk\": \"sdb\", \"udid\": \"VMware%5FVirtual%20disk%5FOTHER%5FDISKS%5Finfoscale%5F%2Fdev%2Fsdb\", \"site\": \"-\", \"dgid\": \"\", \"hostid\": \"\", \"flags\": \"online ready private autoconfig invalid\", \"dgname\": \"\", \"guid\": \"-\", \"type\": \"auto\", \"diskid\": \"\"}, {\"info\": \"format=none\", \"Disk\": \"sdc\", \"udid\": \"VMware%5FVirtual%20disk%5FOTHER%5FDISKS%5Finfoscale%5F%2Fdev%2Fsdc\", \"site\": \"-\", \"dgid\": \"\", \"hostid\": \"\", \"flags\": \"online ready private autoconfig invalid\", \"dgname\": \"\", \"guid\": \"-\", \"type\": \"auto\", \"diskid\": \"\"}], \"all_nodes\": [], \"component\": \"SF\", \"system_state\": \"stopped\", \"license\": [{\"Version\": \"7.4.1\", \"Product Name\": \"Veritas InfoScale Storage\", \"License Type\": \"KEYLESS\"}], \"configuredcomponents\": [\"SF\"], \"shared_dg_mounts\": [], \"scsi3pr\": \"on\", \"veritas\": \"infoscale\"}"}, "msg": "facter created\nAnsbile logs are saved at:/opt/VRTS/install/ansible/logs/ansible_play_20201120033100/", "rc": 0} TASK [Create DG, Volume] ************************************************************************************************************************************************************************************* ok: [172.16.209.51] => {"changed": 0, "msg": "\nAnsbile logs are saved at:/opt/VRTS/install/ansible/logs/ansible_play_20201120033105/", "rc": 0} PLAY RECAP *************************************************************************************************************************************************************************************************** 172.16.209.51 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
The results
[root@infoscale ~]# vxdisk list DEVICE TYPE DISK GROUP STATUS sda auto:LVM - - LVM sdb auto:none - - online invalid sdc auto:none - - online invalid [root@infoscale ~]# vxdg list NAME STATE ID [root@infoscale ~]#
The documentation doesn't state whether the disks should be setup or not, but I would have hoped it would do this since the point of using an automated tool is, well, automation....
I setup the disks manually and rerun the play.
[root@ansible infoscale_ansible]# ansible-playbook infoscale_dg_create.yml -v Using /root/ansible/infoscale_ansible/infoscale_ansible/ansible.cfg as config file PLAY [Create Disk Groups and Volumes] ************************************************************************************************************************************************************************ TASK [Facters] *********************************************************************************************************************************************************************************************** ok: [172.16.209.51] => {"changed": 0, "infoscale_facts": {"infoscale": "{\"dg_info\": \"\", \"haconf_writable\": 1, \"cluster_id\": \"\", \"vxfenmode\": \"N/A\", \"padv\": \"rhel7_x86_64\", \"cluster_uuid\": \"\", \"llt_info\": {\"status\": \"unhealthy\", \"running\": \"No\"}, \"free_disks\": [\"sdb\", \"sdc\"], \"onenode_cluster\": 0, \"CFSSG_SVC_GRP\": \"\", \"asymmetry_value\": \"asymmetric\", \"cluster_name\": \"\", \"gab_info\": {\"status\": \"unhealthy\", \"running\": \"No\"}, \"version\": \"7.4.2.0000\", \"product\": \"enterprise\", \"vxdisk_list\": [{\"info\": \"format=LVM\", \"Disk\": \"sda\", \"udid\": \"VMware%5FVirtual%20disk%5FOTHER%5FDISKS%5Finfoscale%5F%2Fdev%2Fsda\", \"site\": \"-\", \"dgid\": \"\", \"hostid\": \"\", \"flags\": \"LVM online ready private autoconfig invalid\", \"dgname\": \"\", \"guid\": \"-\", \"type\": \"auto\", \"diskid\": \"\"}, {\"info\": \"format=cdsdisk,privoffset=256,pubslice=3,privslice=3\", \"Disk\": \"sdb\", \"udid\": \"VMware%5FVirtual%20disk%5FOTHER%5FDISKS%5Finfoscale%5F%2Fdev%2Fsdb\", \"site\": \"-\", \"dgid\": \"\", \"hostid\": \"\", \"flags\": \"online ready private autoconfig autoimport\", \"dgname\": \"\", \"guid\": \"{ba466918-2b0b-11eb-a5ba-d086294e8b80}\", \"type\": \"auto\", \"diskid\": \"1605861493.6.infoscale\"}, {\"info\": \"format=cdsdisk,privoffset=256,pubslice=3,privslice=3\", \"Disk\": \"sdc\", \"udid\": \"VMware%5FVirtual%20disk%5FOTHER%5FDISKS%5Finfoscale%5F%2Fdev%2Fsdc\", \"site\": \"-\", \"dgid\": \"\", \"hostid\": \"\", \"flags\": \"online ready private autoconfig autoimport\", \"dgname\": \"\", \"guid\": \"{bbd35c0a-2b0b-11eb-847c-7ab0542c754c}\", \"type\": \"auto\", \"diskid\": \"1605861496.8.infoscale\"}], \"all_nodes\": [], \"component\": \"SF\", \"system_state\": \"stopped\", \"license\": [{\"Version\": \"7.4.1\", \"Product Name\": \"Veritas InfoScale Storage\", \"License Type\": \"KEYLESS\"}], \"configuredcomponents\": [\"SF\"], \"shared_dg_mounts\": [], \"scsi3pr\": \"on\", \"veritas\": \"infoscale\"}"}, "msg": "facter created\nAnsbile logs are saved at:/opt/VRTS/install/ansible/logs/ansible_play_20201120033827/", "rc": 0} TASK [Create DG, Volume] ************************************************************************************************************************************************************************************* ok: [172.16.209.51] => {"changed": 0, "msg": "\nAnsbile logs are saved at:/opt/VRTS/install/ansible/logs/ansible_play_20201120033832/", "rc": 0} PLAY RECAP *************************************************************************************************************************************************************************************************** 172.16.209.51 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
I now notice the two disks are shown as free \"free_disks\": [\"sdb\", \"sdc\"]
The result on the server however remains the same.
[root@infoscale ~]# vxdisk list DEVICE TYPE DISK GROUP STATUS sda auto:LVM - - LVM sdb auto:cdsdisk - - online sdc auto:cdsdisk - - online [root@infoscale ~]# vxdg list NAME STATE ID [root@infoscale ~]#
Logs from the server show
[root@infoscale ~]# cat /opt/VRTS/install/ansible/logs/ansible_play_20201120033832/infoscale-vxvm_dgvolfs-20201120033832.log 20 Nov 2020 03:38:32 INFO cmd LC_ALL=C LANG=C vxprint -g dg1 -f | /bin/grep ^dg | /bin/awk '{print $2}' 20 Nov 2020 03:38:32 INFO cmd exit=0 (duration: 0 second) Error:VxVM vxprint ERROR V-5-1-582 Disk group dg1: No such disk group 20 Nov 2020 03:38:32 INFO #Out of if [root@infoscale ~]# cat /opt/VRTS/install/ansible/logs/ansible_play_20201120033832/infoscale.log 20 Nov 2020 03:38:32 INFO self.hostname connect status: True 20 Nov 2020 03:38:32 INFO cmd LC_ALL=C LANG=C LC_ALL=C LANG=C /bin/uname 20 Nov 2020 03:38:32 INFO cmd exit=0 Linux (duration: 0 second) 20 Nov 2020 03:38:32 INFO cmd LC_ALL=C LANG=C /bin/uname -r | /bin/cut -d 'l' -f2 | /bin/cut -d '.' -f1 20 Nov 2020 03:38:32 INFO cmd exit=0 7 (duration: 0 second) 20 Nov 2020 03:38:32 DEBUG Padv_linux found 20 Nov 2020 03:38:32 INFO cmd LC_ALL=C LANG=C /usr/bin/which dnsdomainname 20 Nov 2020 03:38:32 INFO cmd exit=0 /usr/bin/dnsdomainname (duration: 0 second) 20 Nov 2020 03:38:32 INFO cmd LC_ALL=C LANG=C /usr/bin/dnsdomainname 20 Nov 2020 03:38:32 INFO cmd exit=0 (duration: 0 second) 20 Nov 2020 03:38:32 INFO nofqdninfoscale 20 Nov 2020 03:38:32 DEBUG Host_facters:sys:infoscale hostname:infoscale 20 Nov 2020 03:38:32 DEBUG Host_facters:{'dg_info': '', 'haconf_writable': 1, 'cluster_id': '', 'vxfenmode': 'N/A', 'padv': 'rhel7_x86_64', 'cluster_uuid': '', 'llt_info': {'status': 'unhealthy', 'running': 'No'}, 'free_disks': ['sdb', 'sdc'], 'onenode_cluster': 0, 'CFSSG_SVC_GRP': '', 'asymmetry_value': 'asymmetric', 'cluster_name': '', 'gab_info': {'status': 'unhealthy', 'running': 'No'}, 'version': '7.4.2.0000', 'product': 'enterprise', 'vxdisk_list': [{'site': '-', 'dgname': '', 'guid': '-', 'info': 'format=LVM', 'hostid': '', 'udid': 'VMware%5FVirtual%20disk%5FOTHER%5FDISKS%5Finfoscale%5F%2Fdev%2Fsda', 'flags': 'LVM online ready private autoconfig invalid', 'dgid': '', 'Disk': 'sda', 'type': 'auto', 'diskid': ''}, {'site': '-', 'dgname': '', 'guid': '{ba466918-2b0b-11eb-a5ba-d086294e8b80}', 'info': 'format=cdsdisk,privoffset=256,pubslice=3,privslice=3', 'hostid': '', 'udid': 'VMware%5FVirtual%20disk%5FOTHER%5FDISKS%5Finfoscale%5F%2Fdev%2Fsdb', 'flags': 'online ready private autoconfig autoimport', 'dgid': '', 'Disk': 'sdb', 'type': 'auto', 'diskid': '1605861493.6.infoscale'}, {'site': '-', 'dgname': '', 'guid': '{bbd35c0a-2b0b-11eb-847c-7ab0542c754c}', 'info': 'format=cdsdisk,privoffset=256,pubslice=3,privslice=3', 'hostid': '', 'udid': 'VMware%5FVirtual%20disk%5FOTHER%5FDISKS%5Finfoscale%5F%2Fdev%2Fsdc', 'flags': 'online ready private autoconfig autoimport', 'dgid': '', 'Disk': 'sdc', 'type': 'auto', 'diskid': '1605861496.8.infoscale'}], 'all_nodes': [], 'component': 'SF', 'system_state': 'stopped', 'license': [{'Version': '7.4.1', 'Product Name': 'Veritas InfoScale Storage', 'License Type': 'KEYLESS'}], 'configuredcomponents': ['SF'], 'shared_dg_mounts': [], 'scsi3pr': 'on', 'veritas': 'infoscale'}
Please let me know what I've done incorrectly, or not done.
Thanks
Riaan