简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

更换驱动器

下面概述了更换集群中的故障驱动器所需的步骤。

  • 通过 SSH 连接到节点

    • 获取活动驱动器列表。

    • 获取链接到此节点的所有驱动器的列表。

  • 确定可用驱动器。

  • 请注意驱动器自定义资源( CR )发生故障。

  • 更换驱动器。

  • 验证驱动器是否已成功更换并在集群 CR 中处于活动状态。

步骤
  1. 获取集群详细信息:

     kubectl describe <cluster_ID> -n

    示例:

     kubectl describe adscl -n astrads-system
  2. 通过 SSH 连接到节点:

     ssh root@<ip_address>
  3. 列出该节点上的所有活动驱动器:

     runc exec -t firetap /sf/packages/netapp-photon/cmd_firestorm.py -c 'disk show'

    响应:

     DISK   OWNER        POOL   SERIAL  HOME        DR HOME
     -----  ----------   -----  ------  ---------   -------
     v0.0   fires-9(09)  Pool0  1234   fires-9(09)
     v0.1   fires-9(09)  Pool0  5678   fires-9(09)
     v0.2   fires-9(09)  Pool0  9101   fires-9(09)
     v0.3   fires-9(09)  Pool0  1213   fires-9(09)
  4. 列出该节点上的所有驱动器:

     lsblk -o NAME,SERIAL,SIZE
    kubectl describe adscl -n astrads-system
  5. 通过 SSH 连接到节点:

    ssh root@<ip_address>
  6. 列出该节点上的所有活动驱动器:

    runc exec -t firetap /sf/packages/netapp-photon/cmd_firestorm.py -c 'disk show'

    响应:

     DISK    OWNER        POOL   SERIAL  HOME        DR HOME
     ------  ----------   -----  ------  ---------   -------
     v0.0    fires-9(09)  Pool0  1234   fires-9(09)
     v0.1    fires-9(09)  Pool0  5678   fires-9(09)
     v0.2    fires-9(09)  Pool0  9101   fires-9(09)
     v0.3    fires-9(09)  Pool0  1213   fires-9(09)
  7. 列出该节点上的所有驱动器:

    - lsblk -o NAME,SERIAL,SIZE
  8. 创建故障驱动器 CR :

     kubectl get adsfd -n astrads-system

    响应:

     NAME                                   AGE
     158c66c5-3e84-5530-8ede-d8e3cbbf67af   37s
  9. 获取故障驱动器详细信息:

     Name:         158c66c5-3e84-5530-8ede-d8e3cbbf67af
    Namespace:    astrads-system
    Labels:       <none>
    Annotations:  <none>
    API Version:  astrads.netapp.io/v1alpha1
    Kind:         AstraDSFailedDrive
    Metadata:
     Creation Timestamp:  2021-10-26T06:36:12Z
     Generation:          1
     Managed Fields:
       API Version:  astrads.netapp.io/v1alpha1
       Fields Type:  FieldsV1
       fieldsV1:
         f:spec:
           .:
           f:executeReplace:
           f:replaceWith:
         f:status:
           .:
           f:cluster:
           f:failedDriveInfo:
             .:
             f:failureReason:
             f:firetapUUID:
             f:inUse:
             f:name:
             f:node:
             f:path:
             f:present:
             f:serial:
             f:sizeBytes:
           f:state:
       Manager:         cluster-controller
       Operation:       Update
       Time:            2021-10-26T06:36:12Z
     Resource Version:  4110227
     UID:               14a2c23b-fcd8-4b04-ae25-48c75abc0682
    Spec:
     Execute Replace:  false
     Replace With:
    Status:
     Cluster:  astrads-cluster-493a7f8
     Failed Drive Info:
       Failure Reason:  AdminFailed
       Firetap UUID:    158c66c5-3e84-5530-8ede-d8e3cbbf67af
       In Use:          false
       Name:            scsi-36000c29abd71fd0dad31270af16bb1bc
       Node:            sti-b200-0214b.ctl.gdl.englab.netapp.com
       Path:            /dev/disk/by-id/scsi-36000c29abd71fd0dad31270af16bb1bc
       Present:         false
       Serial:          6000c29abd71fd0dad31270af16bb1bc
       Size Bytes:      107374182400
     State:             ReadyToReplace
    Events:              <none>
  10. 编辑故障驱动器 CR 并将其更换为可用驱动器。

     kubectl edit adsfd -n astrads-system

    响应:

     astradsfaileddrive.astrads.netapp.io/158c66c5-3e84-5530-8ede-d8e3cbbf67af edited
    ...
    Spec:
      Execute Replace:  true
      Replace With:     6000c2949046697ae1c738208ffc6620
    ...
  11. 确认驱动器在集群 CR 和节点中处于活动状态。

 kubectl describe adscl -n astrads-system
 ...
 Status:              Added
    Drive Statuses:
      Drive ID:       d6a4383b-305f-54d9-8264-990ff2964c15
      Drive Name:     scsi-36000c2949046697ae1c738208ffc6620
      Drive Serial:   6000c2949046697ae1c738208ffc6620
      Drives Status:  Available
      Drive ID:       55389866-fb73-57fd-9db8-96d5c78ea650
      Drive Name:     scsi-36000c29e16433c39e4d888b1dbbab6cf
      Drive Serial:   6000c29e16433c39e4d888b1dbbab6cf
      Drives Status:  Active
      Drive ID:       fc9b555d-0752-5497-ac79-a6e79d9a9ad0
      Drive Name:     scsi-36000c29fdafda4ab8852cc636c86b3c4
      Drive Serial:   6000c29fdafda4ab8852cc636c86b3c4
      Drives Status:  Active
      Drive ID:       a8bfd69b-c234-508b-882a-947508416d4f
      Drive Name:     scsi-36000c29339215b755d777ae20593e23b
      Drive Serial:   6000c29339215b755d777ae20593e23b
      Drives Status:  Active
    Maintenance Status:
      State:             Disabled
      Variant:           None
    Node HA:             true
    Node ID:             4
    Node Is Reachable:   true
    Node Management IP:  10.224.8.75
    Node Name:           sti-b200-0214b.ctl.gdl.englab.netapp.com
    Node Role:           Storage
    Node UUID:           29998974-a619-5269-86e2-f2aaaaaae107
    Node Version:        12.75.0.6169843
    Status:              Added
...