跳转到主内容

REST API与CLI结果不同

Views:
1
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
core
Last Updated:

适用场景

  • ONTAP
  • 休息
  • 活动文件系统(AFS)

问题描述

在执行REST调用以获取快照使用情况信息时、它与ONTAP命令行界面中显示的size 字段不匹配

以下示例显示了一个REST和CLI输出示例、展示了报告中的大小差异:

svm1::> snap list -volume svm1_root -snapshot weekly.2024-03-01_1427 -fields blocks, size, usedblocks
vserver volume    snapshot               size  blocks usedblocks
------- --------- ---------------------- ----- ------ ----------
svm1    svm1_root weekly.2024-03-01_1427 220KB 1%     34%

% curl --insecure -u vsadmin -X GET "https://10.61.87.72/api/storage/volumes/4ce95854-cf08-11ed-81ae-005056a034e0/snapshots?svm.name=svm1&fields=size&return_records=true&return_timeout=0" -H "accept: application/json" - "authorization: Basic dnNhZG1pbjpOZXRhcHAxIQ=="
Enter host password for user 'vsadmin':
{
 "records": [
    {
     "uuid": "f22002fa-5626-4976-9ec7-8ecd74be1a4c",
     "svm": {
       "name": "svm1"
      },
     "name": "weekly.2024-03-01_1427",
     "size": 348160
    }
  ],
 "num_records": 1,
 "_links": {
   "self": {
     "href": "/api/storage/volumes/4ce95854-cf08-11ed-81ae-005056a034e0/snapshots?svm.name=svm1&fields=size&return_records=true&return_timeout=0"
    },
   "next": {
     "href": "/api/storage/volumes/4ce95854-cf08-11ed-81ae-005056a034e0/snapshots?start.cpcount=11&start.uuid=f22002fa-5626-4976-9ec7-8ecd74be1a4c&svm.name=svm1&fields=size&return_records=true&return_timeout=0"
    }
  }

 
 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.