Skip to content

8.6 Диск

Описание объекта Физический диск представлено в таблице ниже.

Таблица 1. Описание объекта Физический диск
namevaluetype
Временные отметки
created1671028577unix time
last_seen1671029008unix time
Физическое расположение
node_id5integer
enclosure_device/dev/ses0string
enclosure_id500605b0000272bflong
device_index2integer
device/dev/da1string
LED на панели
led_fault0boolean
led_locate0boolean
Свойства самого диска
modelATA Patriot Burststring
serialBB04078C1B5300064733string
size480103981056long
status1integer
Свойства ZFS
pool_namez01string
vdev_pool_namez01string
vdev_guid2315344995137412128long
vdev_pool_guid5210166094835362280long

Методы

8.6.1 pd-list()

Метод pd-list() позволяет получить список физических дисков.

Запрос:

{
        "jsonrpc":      "2.0",
        "id":           "48876c80-81dc-11ed-9357-fc28b0b91e77",
        "method":       "pd-list"
}

Ответ:

{
   "id" : "48876c80-81dc-11ed-9357-fc28b0b91e77",
   "jsonrpc" : "2.0",
   "result" : {
      "code" : 1,
      "data" : {
         "2030E4087DE0        " : {
            "created" : 1671028577,
            "device" : "/dev/da6",
            "device_index" : 7,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA CT480BX500SSD1",
            "node_id" : 2,
            "pool_name" : null,
            "serial" : "2030E4087DE0        ",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : null,
            "vdev_pool_guid" : null,
            "vdev_pool_name" : null
         },
         "2030E408828B        " : {
            "created" : 1671028577,
            "device" : "/dev/da6",
            "device_index" : 7,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA CT480BX500SSD1",
            "node_id" : 3,
            "pool_name" : null,
            "serial" : "2030E408828B        ",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "8786772227900271938",
            "vdev_pool_guid" : "12284873295761094057",
            "vdev_pool_name" : "streams_test"
         },
         "B73607891A5300098420" : {
            "created" : 1671028577,
            "device" : "/dev/da0",
            "device_index" : 1,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 1,
            "pool_name" : null,
            "serial" : "B73607891A5300098420",
            "size" : 240057409536,
            "status" : 1,
            "vdev_guid" : null,
            "vdev_pool_guid" : null,
            "vdev_pool_name" : null
         },
         "B73607891A5300098422" : {
            "created" : 1671028577,
            "device" : "/dev/da0",
            "device_index" : 1,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 5,
            "pool_name" : null,
            "serial" : "B73607891A5300098422",
            "size" : 240057409536,
            "status" : 1,
            "vdev_guid" : null,
            "vdev_pool_guid" : null,
            "vdev_pool_name" : null
         },
         "B73607891A5300098446" : {
            "created" : 1671028577,
            "device" : "/dev/da0",
            "device_index" : 1,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 2,
            "pool_name" : null,
            "serial" : "B73607891A5300098446",
            "size" : 240057409536,
            "status" : 1,
            "vdev_guid" : null,
            "vdev_pool_guid" : null,
            "vdev_pool_name" : null
         },
         "B7A3078C1B5300064531" : {
            "created" : 1671028577,
            "device" : "/dev/da4",
            "device_index" : 6,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 3,
            "pool_name" : "z04",
            "serial" : "B7A3078C1B5300064531",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "14832060988344922167",
            "vdev_pool_guid" : "9286176334769597033",
            "vdev_pool_name" : "z04"
         },
         "B7A3078C1B5300064700" : {
            "created" : 1671028577,
            "device" : "/dev/da2",
            "device_index" : 4,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 3,
            "pool_name" : "z02",
            "serial" : "B7A3078C1B5300064700",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "7526555874398430544",
            "vdev_pool_guid" : "16231361151942834019",
            "vdev_pool_name" : "z02"
         },
         "B7A3078C1B5300065084" : {
            "created" : 1671028577,
            "device" : "/dev/da4",
            "device_index" : 5,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 4,
            "pool_name" : "z04",
            "serial" : "B7A3078C1B5300065084",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "1775351653277684088",
            "vdev_pool_guid" : "9286176334769597033",
            "vdev_pool_name" : "z04"
         },
         "B7A3078C1B5300065089" : {
            "created" : 1671028577,
            "device" : "/dev/da3",
            "device_index" : 3,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 3,
            "pool_name" : "z03",
            "serial" : "B7A3078C1B5300065089",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "14369618978648068186",
            "vdev_pool_guid" : "14523019082101348142",
            "vdev_pool_name" : "z03"
         },
         "B7A3078C1B5300065090" : {
            "created" : 1671028577,
            "device" : "/dev/da2",
            "device_index" : 3,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 1,
            "pool_name" : "z02",
            "serial" : "B7A3078C1B5300065090",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "6499822660377174564",
            "vdev_pool_guid" : "16231361151942834019",
            "vdev_pool_name" : "z02"
         },
         "B7E0078C1B5300063418" : {
            "created" : 1671028577,
            "device" : "/dev/da5",
            "device_index" : 5,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 3,
            "pool_name" : "z05",
            "serial" : "B7E0078C1B5300063418",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "5454340047382711887",
            "vdev_pool_guid" : "4182847010042355858",
            "vdev_pool_name" : "z05"
         },
         "B7E0078C1B5300063419" : {
            "created" : 1671028577,
            "device" : "/dev/da5",
            "device_index" : 3,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 2,
            "pool_name" : "z05",
            "serial" : "B7E0078C1B5300063419",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "7817034242584068442",
            "vdev_pool_guid" : "4182847010042355858",
            "vdev_pool_name" : "z05"
         },
         "B7E0078C1B5300063423" : {
            "created" : 1671028577,
            "device" : "/dev/da1",
            "device_index" : 2,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 3,
            "pool_name" : "z01",
            "serial" : "B7E0078C1B5300063423",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "5531929770882538828",
            "vdev_pool_guid" : "5210166094835362280",
            "vdev_pool_name" : "z01"
         },
         "B7E0078C1B5300063606" : {
            "created" : 1671028577,
            "device" : "/dev/da6",
            "device_index" : 7,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 1,
            "pool_name" : null,
            "serial" : "B7E0078C1B5300063606",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : null,
            "vdev_pool_guid" : null,
            "vdev_pool_name" : null
         },
         "BA1B07891A5300080856" : {
            "created" : 1671028577,
            "device" : "/dev/da0",
            "device_index" : 1,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 4,
            "pool_name" : null,
            "serial" : "BA1B07891A5300080856",
            "size" : 240057409536,
            "status" : 1,
            "vdev_guid" : null,
            "vdev_pool_guid" : null,
            "vdev_pool_name" : null
         },
         "BA1B07891A5300080860" : {
            "created" : 1671028577,
            "device" : "/dev/da0",
            "device_index" : 1,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 3,
            "pool_name" : null,
            "serial" : "BA1B07891A5300080860",
            "size" : 240057409536,
            "status" : 1,
            "vdev_guid" : null,
            "vdev_pool_guid" : null,
            "vdev_pool_name" : null
         },
         "BB04078C1B5300063922" : {
            "created" : 1671028577,
            "device" : "/dev/da5",
            "device_index" : 6,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 4,
            "pool_name" : "z05",
            "serial" : "BB04078C1B5300063922",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "4439204358505149454",
            "vdev_pool_guid" : "4182847010042355858",
            "vdev_pool_name" : "z05"
         },
         "BB04078C1B5300063923" : {
            "created" : 1671028577,
            "device" : "/dev/da4",
            "device_index" : 5,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 2,
            "pool_name" : "z04",
            "serial" : "BB04078C1B5300063923",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "7272539805432321976",
            "vdev_pool_guid" : "9286176334769597033",
            "vdev_pool_name" : "z04"
         },
         "BB04078C1B5300063926" : {
            "created" : 1671028577,
            "device" : "/dev/da2",
            "device_index" : 6,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 2,
            "pool_name" : "z02",
            "serial" : "BB04078C1B5300063926",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "15162287170609411523",
            "vdev_pool_guid" : "16231361151942834019",
            "vdev_pool_name" : "z02"
         },
         "BB04078C1B5300063927" : {
            "created" : 1671028577,
            "device" : "/dev/da2",
            "device_index" : 3,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 4,
            "pool_name" : "z02",
            "serial" : "BB04078C1B5300063927",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "4312274102687665708",
            "vdev_pool_guid" : "16231361151942834019",
            "vdev_pool_name" : "z02"
         },
         "BB04078C1B5300064113" : {
            "created" : 1671028577,
            "device" : "/dev/da1",
            "device_index" : 2,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 1,
            "pool_name" : "z01",
            "serial" : "BB04078C1B5300064113",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "9939580095802490800",
            "vdev_pool_guid" : "5210166094835362280",
            "vdev_pool_name" : "z01"
         },
         "BB04078C1B5300064115" : {
            "created" : 1671028577,
            "device" : "/dev/da5",
            "device_index" : 5,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 1,
            "pool_name" : "z05",
            "serial" : "BB04078C1B5300064115",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "15591906887639509986",
            "vdev_pool_guid" : "4182847010042355858",
            "vdev_pool_name" : "z05"
         },
         "BB04078C1B5300064116" : {
            "created" : 1671028577,
            "device" : "/dev/da3",
            "device_index" : 4,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 5,
            "pool_name" : "z03",
            "serial" : "BB04078C1B5300064116",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "16288905412231005582",
            "vdev_pool_guid" : "14523019082101348142",
            "vdev_pool_name" : "z03"
         },
         "BB04078C1B5300064117" : {
            "created" : 1671028577,
            "device" : "/dev/da3",
            "device_index" : 4,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 4,
            "pool_name" : "z03",
            "serial" : "BB04078C1B5300064117",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "10860525596323559850",
            "vdev_pool_guid" : "14523019082101348142",
            "vdev_pool_name" : "z03"
         },
         "BB04078C1B5300064118" : {
            "created" : 1671028577,
            "device" : "/dev/da3",
            "device_index" : 4,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 1,
            "pool_name" : "z03",
            "serial" : "BB04078C1B5300064118",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "1421887101468179701",
            "vdev_pool_guid" : "14523019082101348142",
            "vdev_pool_name" : "z03"
         },
         "BB04078C1B5300064119" : {
            "created" : 1671028577,
            "device" : "/dev/da1",
            "device_index" : 4,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 2,
            "pool_name" : "z01",
            "serial" : "BB04078C1B5300064119",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "16664824540535422525",
            "vdev_pool_guid" : "5210166094835362280",
            "vdev_pool_name" : "z01"
         },
         "BB04078C1B5300064121" : {
            "created" : 1671028577,
            "device" : "/dev/da3",
            "device_index" : 2,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 2,
            "pool_name" : "z03",
            "serial" : "BB04078C1B5300064121",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "6257807090953818556",
            "vdev_pool_guid" : "14523019082101348142",
            "vdev_pool_name" : "z03"
         },
         "BB04078C1B5300064122" : {
            "created" : 1671028577,
            "device" : "/dev/da4",
            "device_index" : 6,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 1,
            "pool_name" : "z04",
            "serial" : "BB04078C1B5300064122",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "7720734607694419991",
            "vdev_pool_guid" : "9286176334769597033",
            "vdev_pool_name" : "z04"
         },
         "BB04078C1B5300064125" : {
            "created" : 1671028577,
            "device" : "/dev/da5",
            "device_index" : 6,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 5,
            "pool_name" : "z05",
            "serial" : "BB04078C1B5300064125",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "8796952001056078619",
            "vdev_pool_guid" : "4182847010042355858",
            "vdev_pool_name" : "z05"
         },
         "BB04078C1B5300064307" : {
            "created" : 1671028577,
            "device" : "/dev/da4",
            "device_index" : 5,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 5,
            "pool_name" : "z04",
            "serial" : "BB04078C1B5300064307",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "12823323144493037917",
            "vdev_pool_guid" : "9286176334769597033",
            "vdev_pool_name" : "z04"
         },
         "BB04078C1B5300064311" : {
            "created" : 1671028577,
            "device" : "/dev/da2",
            "device_index" : 3,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 5,
            "pool_name" : "z02",
            "serial" : "BB04078C1B5300064311",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "7043449630677706498",
            "vdev_pool_guid" : "16231361151942834019",
            "vdev_pool_name" : "z02"
         },
         "BB04078C1B5300064522" : {
            "created" : 1671028577,
            "device" : "/dev/da1",
            "device_index" : 2,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 4,
            "pool_name" : "z01",
            "serial" : "BB04078C1B5300064522",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "17445792474287282197",
            "vdev_pool_guid" : "5210166094835362280",
            "vdev_pool_name" : "z01"
         },
         "BB04078C1B5300064733" : {
            "created" : 1671028577,
            "device" : "/dev/da1",
            "device_index" : 2,
            "enclosure_device" : "/dev/ses0",
            "enclosure_id" : "500605b0000272bf",
            "last_seen" : 1671029008,
            "led_fault" : 0,
            "led_locate" : 0,
            "model" : "ATA Patriot Burst",
            "node_id" : 5,
            "pool_name" : "z01",
            "serial" : "BB04078C1B5300064733",
            "size" : 480103981056,
            "status" : 1,
            "vdev_guid" : "2315344995137412128",
            "vdev_pool_guid" : "5210166094835362280",
            "vdev_pool_name" : "z01"
         }
      }
   }
}

8.6.2 pd-led()

С помощью pd-led() можно управлять индикаторами физического диска.

Запрос:

{
        "jsonrpc":      "2.0",
        "id":           "1684eaf4-81dd-11ed-a27e-cb46b0b91e77",
        "method":       "pd-led",
        "params": {
                "node_id":              3,
                "enclosure_device":     "/dev/ses0",
                "device_index":         7,
                "locate":               1
        }
}

Ответ:

{
   "id" : "1684eaf4-81dd-11ed-a27e-cb46b0b91e77",
   "jsonrpc" : "2.0",
   "result" : {
      "code" : 1,
      "data" : {
         "device_index" : 7,
         "enclosure_device" : "/dev/ses0",
         "fault" : 0,
         "locate" : 1
      }
   }
}

8.6.3 pd-status-map()

Данный метод позволяет получить словарь состояний физического диска.

Запрос:

{
        "jsonrpc":      "2.0",
        "id":           "ba8c67ae-81eb-11ed-a03a-6230afb91e77",
        "method":       "pd-status-map"
}

Ответ:

{
   "id" : "ba8c67ae-81eb-11ed-a03a-6230afb91e77",
   "jsonrpc" : "2.0",
   "result" : {
      "code" : 1,
      "data" : {
         "0" : "Unsupported",
         "1" : "OK",
         "2" : "Critical",
         "3" : "Noncritical",
         "4" : "Unrecoverable",
         "5" : "Not Installed",
         "6" : "Unknown",
         "7" : "Not Available",
         "8" : "No Access Allowed"
      }
   }
}