ECS:UI 和 REST API 的 ECS 容量单位不同(GiB 与 GB)

Summary: 例如,svc_bucket显示的 10 GB 容量显然直接计入 UI 计量输出(或以相反的方式),即,具有相同值的容量仅以 GiB 显示。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

 

请注意 CLI 和 REST API 命令中的 GB 单位:

admin@ecsnode1:~> svc_bucket info chris-s3-bkt
svc_bucket v1.1.1 (svc_tools v2.20.0)                 Started 2024-11-22 15:51:33

Bucket ID                        chris-ns.chris-s3-bkt

  Name                             chris-s3-bkt
  Namespace                        chris-ns
  Owner User                       chris-s3-user
  Owner VDC Name                   VDC1
  Owner zone/VDC ID                urn:storageos:VirtualDataCenterData:8af5b9c3-9c0c-43b5-9402-14d181ade5bf
  Keypool Hash ID                  43344cc6ad534c4e600dc0a32d90e5104a8f718d99487938bf9f273f2100f248
  Bucket Deletion Status           None

  Replication Group (vpool) Name   local_vdc
  Replication Group (vpool) ID     urn:storageos:ReplicationGroupInfo:9eaa2c9d-4ed5-4f40-90f1-e347f8f3f3fd:global
  Bucket Creation Date             2024-11-22 15:13:33 (1732288413155)
  Temp Failed (TSO)                False

  API Type                         S3
  FS Access Enabled                False
  Encryption Enabled               False
  Versioning State                 Disabled
  ADO Enabled                      False
  ADO Read-Only                    False
  Object Lock Enabled              False
  Auto commit period (seconds)     None
  Enforce Retention                False
  Lifecycle Policy                 None

  Keypool Policy                   None

  Bucket ACL:
    Type       Affects    Name                               
    user       file/dir   chris-s3-user                       FULL_CONTROL

  Object count                     2
  Total Object Size                11 GB


admin@ecsnode1:~> 
admin@ecsnode1:~> svc_rest_cmd /object/billing/buckets/chris-ns/chris-s3-bkt/info | xmllint --format -
svc_rest_cmd 1.0.17

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bucket_billing_info>
  <total_size_deleted>0</total_size_deleted>
  <total_objects_deleted>0</total_objects_deleted>
  <name>chris-s3-bkt</name>
  <uptodate_till>2023-06-15T18:25:45Z</uptodate_till>
  <namespace>chris-ns</namespace>
  <sample_time>2024-11-27T14:23:38Z</sample_time>
  <TagSet/>
  <total_mpu_parts>0</total_mpu_parts>
  <total_mpu_size>0</total_mpu_size>
  <total_objects>2</total_objects>
  <total_size>11</total_size>
  <total_size_unit>GB</total_size_unit>
  <vpool_id>urn:storageos:ReplicationGroupInfo:9eaa2c9d-4ed5-4f40-90f1-e347f8f3f3fd:global</vpool_id>
</bucket_billing_info>
admin@ecsnode1:~> 

但是检查 UI 计量信息时,我们确实看到相同的读数(以 GiB 为单位),而不是以 GB 为单位,这似乎是不正确的:

UI 计量信息

 

如果我们将鼠标悬停在 11.00 GiB 上,它将以字节为单位显示。
在 UI 中将鼠标悬停在 11.00GiB 上会以字节为单位显示。 

 

11 GB = 11 * 1000^3 = 11000000000 字节
11 GiB = 11 * 1024^3 = 11811160064 字节

 

Cause

UI 和命令行中返回的值均为 GiB。在命令行中,单位显示为 GB,而不是 GiB,这是错误的。
因此,计量页面中的 GiB 值是正确的。

Resolution

CLI 或 REST API 命令的容量读数为 true,并且与 UI 计量读数匹配。未来的 ECS 代码版本将修复 CLI/REST API 容量单位(以 GB 为单位)。 

 

 

 

Affected Products

ECS
Article Properties
Article Number: 000273649
Article Type: Solution
Last Modified: 20 Jan 2025
Version:  1
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.