Skip to content

Disk Array Topology Design

Xiaowen Jiang edited this page Dec 4, 2017 · 2 revisions

This page introduces the disk array topology, including the configuration and topology rendering in infrasim-compute, information parsing and processing in qemu.

Configuration

Definition of disk array

An example of disk array configuration is shown below. In this type 18 disk array, two expanders are configured as peers, with 8 drives connected to both expanders. Name it enclosure.yml here.

type: 18
expanders:
   - name: lcc-a                
     wwn: 5764611469514216599
     phy_count: 36                     # number of physical PHY
 
     ports:
          - id: pp
            number: 4
            phy: 0
 
          - id: ep
            number: 4
            phy: 4
     side: 0
 
   - name: lcc-b
     wwn: 5764611469514216699
     phy_count: 36
     ports:
          - id: pp
            number: 4
            phy: 0
          - id: ep
            number: 4
            phy: 4
     side: 1
 
drives:
   - slot_number: 0
     file: /dev/nbd{}               # file name of image. parantheses indicates a number suffix when create drive nodes.
     version: B29C
     share-rw: "true"
     wwn: 5764824129059301745
     repeat: 8                      # generate 8 drives in terms of this template. wwn,
                                    # sn and slot_number will be changed automatically.

Reference in infrasim.yml

Include the enclosure.yml under configuration's disk_array section.

compute:
  ...
  storage_backend:
  - type: lsisas3008
    max_drive_per_controller: 32
    connectors:                                    # description about how HBA connect disk array.
      - wwn: 5764824129059291136                   # sas address of port 0 of HBA
        phy: 0                                     # phy id of port 0
        atta_enclosure: enclosure_0                  # attached enclosure name.
        atta_exp: lcc-a                            # attached expander name of enclosure
        atta_port: pp                              # attached port name of expander
 
      - wwn: 5764824129059291137                   # sas address of port 1 of HBA
        phy: 4                    
        atta_enclosure: enclosure_0
        atta_exp: lcc-b
        atta_port: ep
 
    external_connectors:                           # description of connection from outer nodes.
      - wwn: 5764824129059291142                  
        phy: 0
        atta_enclosure: enclosure_0
        atta_exp: lcc-b
        atta_port: pp
 
      - wwn: 5764824129059291142
        phy: 4       
        atta_enclosure: enclosure_1
        atta_exp: lcc-a
        atta_port: ep
 
  - disk_array:                                   # define a disk array node.
      - name: enclosure_0
        enclosure: !include enclosure.yml           # include the template of disk array.
      - connections:                              # connections between expanders, can be across different disk arrays                            
          - link:
             - disk_array: enclosure_0
               exp: lcc-a
               phy: 4
               number: 4
             - disk_array: enclosure_1
               exp: lcc-c
               phy: 0
               number: 4
    type: disk_array                              # define the type of node.

Process of Infrasim-compute

Disk Array Json File

A JSON file is generated to store the topology and drives. Below is an example of JSON file.

{
  "hba": [
    {
      "expanders": [
        {
          "start_scsi_id": 0,
          "max_phy": 36,
          "links": [
            {
              "atta_type": 4,
              "atta_dev_name": 5764824129059291000,
              "atta_phy": 0,
              "atta_slot_id": 0,
              "phy": 0,
              "num": 4,
              "atta_wwn": 5764824129059291000
            },
            {
              "atta_type": 5,
              "atta_dev_name": 5764824129059291000,
              "atta_phy": 4,
              "atta_slot_id": 0,
              "phy": 4,
              "num": 4,
              "atta_wwn": 5764824129059291000
            },
            {
              "atta_type": 1,
              "atta_dev_name": 5764824129059301000,
              "atta_phy": 0,
              "atta_slot_id": 0,
              "phy": 12,
              "num": 1,
              "atta_scsi_id": 12,
              "atta_wwn": 5764824129059301000
            },
            {
              "atta_type": 13,
              "atta_dev_name": 5764611469514216000,
              "atta_phy": 0,
              "atta_slot_id": 0,
              "phy": 36,
              "num": 1,
              "atta_scsi_id": 36,
              "atta_wwn": 5764611469514216000
            }
          ],
          "exp_wwn": 5764611469514216000
        }
      ],
      "atta_type": 2,
      "atta_phy": 0,
      "phy_number": 4,
      "phy": 0,
      "atta_port": 0,
      "wwn": 5764824129059291000,
      "atta_enclosure": "enclosure_0",
      "atta_exp": "lcc-a",
      "atta_wwn": 5764611469514216000
    },
    {
      "expanders": [
        {
          "start_scsi_id": 37,
          "max_phy": 36,
          "links": [
            {
              "atta_type": 4,
              "atta_dev_name": 5764824129059291000,
              "atta_phy": 4,
              "atta_slot_id": 0,
              "phy": 0,
              "num": 4,
              "atta_wwn": 5764824129059291000
            },
            {
              "atta_type": 5,
              "atta_dev_name": 5764824129059291000,
              "atta_phy": 0,
              "atta_slot_id": 0,
              "phy": 4,
              "num": 4,
              "atta_wwn": 5764824129059291000
            },
            {
              "atta_type": 1,
              "atta_dev_name": 5764824129059301000,
              "atta_phy": 1,
              "atta_slot_id": 0,
              "phy": 12,
              "num": 1,
              "atta_scsi_id": 49,
              "atta_wwn": 5764824129059301000
            },
            {
              "atta_type": 13,
              "atta_dev_name": 5764611469514216000,
              "atta_phy": 0,
              "atta_slot_id": 0,
              "phy": 36,
              "num": 1,
              "atta_scsi_id": 73,
              "atta_wwn": 5764611469514216000
            }
          ],
          "exp_wwn": 5764611469514216000
        }
      ],
      "atta_type": 2,
      "atta_phy": 0,
      "phy_number": 4,
      "phy": 4,
      "atta_port": 0,
      "wwn": 5764824129059291000,
      "atta_enclosure": "enclosure_0",
      "atta_exp": "lcc-b",
      "atta_wwn": 5764611469514216000
    }
  ],
  "drives": [
    {
      "device": "scsi-hd,ver=B29C,scsi-id=12,bus=scsi0.0,drive=scsi0-0-12-0,share-rw=true,channel=0,slot_number=0,port_wwn=5764824129059301746,serial=Z4C03000,wwn=5764824129059301745,id=dev-scsi0-0-12-0,lun=0",
      "drive": "format=raw,cache=writeback,id=scsi0-0-12-0,file=/home/infrasim/drives/sda0.img,if=none"
    },
    {
      "device": "scsi-hd,ver=B29C,scsi-id=49,bus=scsi0.0,drive=scsi0-0-49-0,share-rw=true,channel=0,slot_number=0,port_wwn=5764824129059301747,serial=Z4C03000,wwn=5764824129059301745,id=dev-scsi0-0-49-0,lun=0",
      "drive": "format=raw,cache=writeback,id=scsi0-0-49-0,file=/home/infrasim/drives/sda0.img,if=none"
    }
  ]
}