dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
341 stars 163 forks source link

Parameter number_dedicated_hot_spare for raid 1 #129

Open jjeganathan opened 4 years ago

jjeganathan commented 4 years ago

Hello,

I have 3 disks of 278.875GB on location 12/13/14 and all the others locations are used with other disks (1.1TB) I'm trying to initialize a virtual disk with two of them and use the third one as a dedicated hot spare

volumes:
  - name: "System"
    drives:
      id: ["Disk.Bay.12:Enclosure.Internal.0-1:RAID.Integrated.1-1",
           "Disk.Bay.13:Enclosure.Internal.0-1:RAID.Integrated.1-1"]
      span_length: 2
      volume_type: "RAID 1"
      number_dedicated_hot_spare: 1
      capacity: "278.875"

The virtual disk is created but the hot spare is not configured to the virtual disk. Can you please explain me how to configure the hot spare for this virtual disk ?

Thanks, Jeya

ThierryBesancon commented 4 years ago

Hello

I don't have so many disks but here is my recipe for OMAM 2.0.14. This is a DELL server with 4 disks. I build a RAID1 virtual disk with disks 0 and 1. Then my present post will add disk 2 as a dedicated hotspare and disk3 as a global hotspare.

To build the virtual disk:

- dellemc_idrac_storage_volume:
    idrac_ip:           "{{ idrac.ipaddr }}"
    idrac_user:         "{{ idrac.factory_user }}"
    idrac_password:     "{{ idrac.factory_password }}"
    raid_reset_config:      "True"
    raid_init_operation:    "Fast"
    controller_id:      "RAID.Integrated.1-1"
    state:          "create"
    volumes:            "{{ idrac.volumes }}"
  register: command_raid_create

with volumes defined in the host_vars for this server:

...
    volumes:
      - name: "DEMO"
        span_length:  2
        volume_type: "RAID 1"
        drives:
          id:
            - "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1"
            - "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1"
...

To add a disk as a dedicated hot spare disk, documentation in OMAM says to give a volume_id to dedicate the disk to:

- name: iDRAC add dedicated hostspare disk
  idrac_redfish_storage_controller:
    baseuri:                    "{{ idrac.ipaddr }}"
    username:                   "{{ idrac.factory_user }}"
    password:                   "{{ idrac.factory_password }}"
    command:                    "AssignSpare"
    target:                     "Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1"
    volume_id:                  "Disk.Virtual.0:RAID.Integrated.1-1"
  register: command_raid_hotspare

To add a disk as a global hot spare disk, documentation in OMAM says not to give a volume_id:

- name: iDRAC add global hostspare disk
  idrac_redfish_storage_controller:
    baseuri:                    "{{ idrac.ipaddr }}"
    username:                   "{{ idrac.factory_user }}"
    password:                   "{{ idrac.factory_password }}"
    command:                    "AssignSpare"
    target:                     "Disk.Bay.3:Enclosure.Internal.0-1:RAID.Integrated.1-1"
  register: command_raid_hotspare

Works like a charm. My $0.02...

Thierry