This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Updating a Storage Backend

  • When oceanctl is used to update storage backend information, only the storage backend password can be updated.
  • If the backend account password is updated on the storage device, the CSI plug-in will retry due to login failures. As a result, the account may be locked. If the account is locked, change the password by referring to An Account Is Locked After the Password Is Updated on the Storage Device.

1 - Updating the Password of a Storage Backend Using oceanctl

Example of Updating a Backend

  1. Run the following command to obtain the help information about updating a storage backend.

    oceanctl update backend -h
    

    The following is an example of the command output.

    Update a backend for Ocean Storage in Kubernetes
    
    Usage:
      oceanctl update backend <name> [flags]
    
    Examples:
      # Update backend account information in default(huawei-csi) namespace
      oceanctl update backend <name>  --password
    
      # Update backend account information in specified namespace
      oceanctl update backend <name> -n namespace --password
    
    Flags:
      -h, --help               help for backend
      -n, --namespace string   namespace of resources
          --password           Update account password
    
  2. Run the following command to update a storage backend.

    oceanctl update backend backend-1 --password
    

    Enter the user name and new password as prompted:

    Please enter this backend user name:admin
    Please enter this backend password:
    
    backend/backend-1 updated
    

2 - Manually Updating a Storage Backend

  • PVC provisioning must be based on a configured storage backend. Therefore, if a PVC has been provisioned on a storage backend, do not change the storage backend.
  • The name uniquely identifies a storage backend. The name of a storage backend with a PVC provisioned cannot be changed.
  • After a storage backend is modified, the new configuration applies only to volumes to be provisioned.
  • Do not perform volume management operations during the modification of a storage backend.

Procedure

  1. Delete the storage backend to be modified. For details, see Deleting a Storage Backend.
  2. Create a storage backend with the same name. For details, see Creating a Storage Backend. The storage backend name cannot be changed.