11-20-2020 12:44 AM
Hello
I've read the infoscale ansible guide https://sort.veritas.com/public/infoscale/ansible/linux/docs/Infoscale7.4.2_Ansible_Support_Linux_Gu... 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
11-20-2020 07:48 AM
Hi @RiaanBadenhorst ,
Are you using an inventory file? Can you please post your ansible hosts file as well?
Under the seednode key, could you please enter the hostname of the target? As well, please make sure your /etc/hosts file reflects the host/ip mapping.
11-23-2020 04:28 AM
Hi Matthew
Yes, I've used your template and updated the files that believe needed to be updated (btw I've added another node now and configured a cluster)
[root@ansible infoscale_ansible]# cat inventory/hosts [is1] 172.16.209.51 172.16.209.52 [is1:vars] ansible_ssh_user=root
[root@ansible infoscale_ansible]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 172.16.209.181 os-ctrl 172.16.209.51 infoscale-01 172.16.209.52 infoscale-02
[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: ['aluadisk_0','aluadisk_2'] volinfo: - - testvol1 - 1g - layout=concat seednode: infoscale-01 taginfo: null facters: "{{ groups['all'] |map('extract', hostvars, ['facts','infoscale_facts'])| select()|list }}"
The result is however the same
[root@infoscale_01 ~]# cat /opt/VRTS/install/ansible/logs/ansible_play_20201123072237/infoscale_01-vxvm_dgvolfs-20201123072237.log 23 Nov 2020 07:22:37 INFO cmd LC_ALL=C LANG=C vxprint -g dg1 -f | /bin/grep ^dg | /bin/awk '{print $2}' 23 Nov 2020 07:22:37 INFO cmd exit=0 (duration: 0 second) Error:VxVM vxprint ERROR V-5-1-582 Disk group dg1: No such disk group 23 Nov 2020 07:22:37 INFO #Out of if
11-23-2020 11:49 AM
Hi,
It seems seedname given is different than hostname:
hostname: infoscale_01
seednode: infoscale-01
Can you please recheck?
11-24-2020 05:22 AM
Hi,
I noticed that an reconfigured the cluster to match the hostnames i.e. and I also reran the play.
I see that it will now find and setup the disks, but when I try and create a non-shared diskgroup it complains.
TASK [Create DG, Volume] ************************************************************************************************************************************************************************************* fatal: [172.16.209.51]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 172.16.209.51 closed.\r\n", "module_stdout": "{'msg': \"Argument/s ['dgtype'] is/are missing for module vxvm_dgvolfs under dg1. Supported arguments are ['dgtype', 'seednode', 'dgname', 'disks']\", 'changed': 0, 'rc': 1}\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} fatal: [172.16.209.52]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 172.16.209.52 closed.\r\n", "module_stdout": "{'msg': \"Argument/s ['dgtype'] is/are missing for module vxvm_dgvolfs under dg1. Supported arguments are ['dgtype', 'seednode', 'dgname', 'disks']\", 'changed': 0, 'rc': 1}\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
The guide says "Enter shared if you want to configure a shared type of disk group or leave the keyword empty."
I tried
dgtype:
and
dgtype: ''
but both result in the error above.
11-24-2020 12:14 PM
Hi,
Please use dgtype: non-shared for non shared and 'shared' for shared as of now.
This needs to be corrected in documentation and to be handled in module subsequently. Next module upload will have this fix.
Thanks
Vineet
11-26-2020 03:44 AM
Hi Vineet,
Thanks, I'll try this and let you know.