🐧 Как ΠΎΡ‚ΠΎΠ±Ρ€Π°Π·ΠΈΡ‚ΡŒ устройства хранСния Π΄Π°Π½Π½Ρ‹Ρ… Π½Π° Linux

by itisgood

ΠžΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅ устройств хранСния.

ΠžΡ‚ΠΎΠ±Ρ€Π°ΠΆΠ΅Π½ΠΈΠ΅ свСдСний ΠΎΠ± Π°ΠΏΠΏΠ°Ρ€Π°Ρ‚Π½ΠΎΠΌ обСспСчСнии для хранСния.

$ sudo lshw -quiet -class storage -json
[
  {
    "id" : "raid",
    "class" : "storage",
    "claimed" : true,
    "handle" : "PCI:0000:00:0e.0",
    "description" : "RAID bus controller",
    "product" : "Volume Management Device NVMe RAID Controller",
    "vendor" : "Intel Corporation",
    "physid" : "e",
    "businfo" : "pci@0000:00:0e.0",
    "version" : "00",
    "width" : 64,
    "clock" : 33000000,
    "configuration" : {
      "driver" : "vmd",
      "latency" : "0"
    },
    "capabilities" : {
      "raid" : true,
      "msix" : "MSI-X",
      "pciexpress" : "PCI Express",
      "pm" : "Power Management",
      "bus_master" : "bus mastering",
      "cap_list" : "PCI capabilities listing"
    }
  },
  {
    "id" : "nvme",
    "class" : "storage",
    "claimed" : true,
    "handle" : "PCI:0000:e1:00.0",
    "description" : "Non-Volatile memory controller",
    "product" : "SM2P41C3 NVMe SSD (DRAM-less)",
    "vendor" : "ADATA Technology Co., Ltd.",
    "physid" : "0",
    "version" : "03",
    "width" : 64,
    "clock" : 33000000,
    "configuration" : {
      "driver" : "nvme",
      "latency" : "0"
    },
    "capabilities" : {
      "nvme" : true,
      "pm" : "Power Management",
      "msi" : "Message Signalled Interrupts",
      "pciexpress" : "PCI Express",
      "msix" : "MSI-X",
      "nvm_express" : true,
      "bus_master" : "bus mastering",
      "cap_list" : "PCI capabilities listing"
    }
  },
  {
    "id" : "nvme0",
    "class" : "storage",
    "claimed" : true,
    "description" : "NVMe device",
    "product" : "SM2P41C3 NVMe ADATA 512GB",
    "physid" : "3",
    "logicalname" : "/dev/nvme0",
    "version" : "92411141",
    "serial" : "2M4529SH1GGW",
    "configuration" : {
      "nqn" : "nqn.2022-11.com.siliconmotion:nvm-subsystem-sn-2M4529SH1GGW",
      "state" : "live"
    }
  }
]

Π˜Π·Π²Π»Π΅ΠΊΠΈΡ‚Π΅ устройства Π°ΠΏΠΏΠ°Ρ€Π°Ρ‚Π½ΠΎΠ³ΠΎ ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»Π»Π΅Ρ€Π° памяти.

$ sudo lshw -quiet -class storage -json | jq --raw-output '.[] | select(.class == "storage" and (has("logicalname") | not)) | "\(.product) (\(.description)) by \(.vendor)"'
Volume Management Device NVMe RAID Controller (RAID bus controller) by Intel Corporation
SM2P41C3 NVMe SSD (DRAM-less) (Non-Volatile memory controller) by ADATA Technology Co., Ltd.

Π”ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ ΠΏΡ€ΠΈΠΌΠ΅Ρ€Ρ‹ ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»Π»Π΅Ρ€ΠΎΠ².

Smart Storage PQI 12G SAS/PCIe 3 (Serial Attached SCSI controller) by Adaptec
SSSTC CL4-8D512-HP (NVMe device) by Solid State Storage Technology Corporation

Π˜Π·Π²Π»Π΅ΠΊΠΈΡ‚Π΅ Π°ΠΏΠΏΠ°Ρ€Π°Ρ‚Π½Ρ‹Π΅ устройства хранСния Π΄Π°Π½Π½Ρ‹Ρ….

$ sudo lshw -quiet -class storage -json | jq --raw-output '.[] | select(.class == "storage") | select(.logicalname) | "\(.product) (\(.description))"'
SM2P41C3 NVMe ADATA 512GB (NVMe device)

Π”ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½Ρ‹Π΅ устройства хранСния Π΄Π°Π½Π½Ρ‹Ρ… (Π°ΠΏΠΏΠ°Ρ€Π°Ρ‚Π½Ρ‹ΠΉ raid).

UNKNOWN_DISK NO_SERIAL (NVMe disk) [/dev/nvme0n1] 477 GB
LOGICAL VOLUME PWXLK0CRHFA0EP (SCSI Disk) [/dev/sda] 1788 GB

см. Ρ‚Π°ΠΊΠΆΠ΅:

 

Loading

You may also like

Leave a Comment