풀을 구성합니다. 풀을 만드는 데 필요한 매개변수에 대해서는 CLI 구성 스토리지 명령을 참조하십시오. 사용 가능한 등록 정보 이름 및 값을 반환하는 풀을 만드는 dry run 요청을 수행할 수 있습니다. 이는 질의 매개변수 등록 정보를 "true"로 설정하여 수행됩니다.
요청 예:
POST /api/storage/v1/pools?props=true HTTP/1.1 Host: zfs-storage.example.com Authorization: Basic abhadbfsMWE= Content-Type: application/json Accept: application/json { "name": "silver", }
응답 예:
HTTP/1.1 200 OK Content-Type: application/json "props": [{ "choices": ["custom" ], "label": "Chassis 0", "name": "0", "type": "ChooseOne" }, { "choices": ["custom"], "label": "Chassis 1", "name": "1", "type": "ChooseOne" }, { "choices": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "label": "Chassis 1 data", "name": "1-data", "type": "ChooseOne" }, { "choices": ["mirror", "mirror3", "raidz1", "raidz2", "raidz3_max", "stripe"], "label": "Data Profile", "name": "profile", "type": "ChooseOne" }] }
섀시 [1]에서 8개의 디스크를 사용하는 풀을 만드는 요청의 예:
POST /api/storage/v1/pools HTTP/1.1 Host: zfs-storage.example.com Authorization: Basic abhadbfsMWE= Content-Type: application/json Accept: application/json { "name": "silver", "profile": "stripe", "1-data": 8 }
응답 예:
HTTP/1.1 201 Created Content-Type: application/json { "pool": { "asn": "314d252e-c42b-e844-dab1-a3bca680b563", "errors": [], "name": "silver", "owner": "zfs-storage", "peer": "00000000-0000-0000-0000-000000000000", "profile": "stripe", "status": "online", "usage": { "available": 1194000466944.0, "dedupratio": 100, "total": 1194000908288.0, "used": 441344.0 } } }