# ストレージ、ディスク、およびボリュームの調査

### ディスク <a href="#investigatingstorage-disksandvolumes-disk" id="investigatingstorage-disksandvolumes-disk"></a>

ディスクとは、コンピュータの物理的なストレージデバイスを指します。 ただし、論理的なストレージデバイスを表すこともでき、これが1つ以上の物理ディスクにまたがる場合があります。 例えば、RAID（Redundant Array of Independent Disks）構成は、複数の物理ディスクを組み合わせて単一の論理ディスクを形成し、パフォーマンスの向上や冗長性、あるいはその両方を提供します。

**Windows**

Disk Managementアプリケーションでは、システムが物理ドライブをディスクと呼び、`Disk 0`、`Disk 1`、...というラベルを付けます。 このPCでは、システムがこれらのストレージデバイスにドライブ文字（`C:`、`D:`、...）を割り当てます。

これらのデバイスは、ローカルディスク、USBドライブ、または仮想ディスクなどの種類が異なることがあります。

<figure><img src="/files/ZHYrOutygqC6zzCU193K" alt="" width="544"><figcaption></figcaption></figure>

<figure><img src="/files/XvQIiIhPweO6SFEIwQaQ" alt="" width="340"><figcaption></figcaption></figure>

**macOS**

Disk Utilityアプリケーションでは、システムが物理ドライブをメディアと呼び、トップレベルのエントリとして表示されます。 システムはそれらを内部または外部として分類し、`disk0`、`disk1`、...というラベルを付けます。

<figure><img src="/files/TPlU9tTsJGfs2PvDcccT" alt="" width="544"><figcaption></figcaption></figure>

`diskutil list`コマンドを使用して、すべてのデバイスを`/dev/disk0`、`/dev/disk1`、...のように表示できます。

<figure><img src="/files/UvIQPzLoxkfn1NXvoggF" alt=""><figcaption></figcaption></figure>

### ボリューム <a href="#investigatingstorage-disksandvolumes-volume" id="investigatingstorage-disksandvolumes-volume"></a>

ボリュームは、データを整理および管理するためにディスク内の記憶単位を指します。 それは論理パーティションとして機能し、ファイルシステムでフォーマットすることができ、ユーザーがファイルを保存およびアクセス可能にします。 単一のディスクに複数のボリュームが含まれる場合がありますが、各ボリュームは独立して動作し、ストレージシステムに追加の柔軟性と整理を提供します。

**Windows**

Windowsでは、Disk Managementアプリケーションで、システムがボリュームをボリュームとして一覧表示します。

<figure><img src="/files/lh2HgWTEfgxbgVoYIGUh" alt=""><figcaption></figcaption></figure>

**macOS**

Disk Utilityアプリケーションでは、システムがそれらが属するメディアの下にボリュームを表示します。

<figure><img src="/files/3vFTXrAD2Xrst3vUzqd0" alt="" width="544"><figcaption></figcaption></figure>

macOSでの`diskutil list`コマンドを使用すると、ボリュームがそれぞれのディスクドライブの下に表示され、`/dev/disk0s1`、`/dev/disk0s2`のような識別子が付けられます。

<figure><img src="/files/UvIQPzLoxkfn1NXvoggF" alt=""><figcaption></figcaption></figure>

### NQL例 <a href="#investigatingstorage-disksandvolumes-nqlexamples" id="investigatingstorage-disksandvolumes-nqlexamples"></a>

<details>

<summary>デバイス上のシステムドライブ（ボリューム/パーティション）の空きスペースを一覧表示します。</summary>

{% code overflow="wrap" lineNumbers="true" %}

```
過去7日間のデバイス
| ボリュームを含む
| システム == true の場合
| system_drive_free_space = capacity.sum() * (1 - usage.sum()) を計算
| device.name, system_drive_free_space をリスト
```

{% endcode %}

</details>

<details>

<summary>デバイス上のシステムドライブの使用状況を一覧表示します。</summary>

{% code overflow="wrap" lineNumbers="true" %}

```
過去7日間のデバイス
| 過去7日間のデバイスパフォーマンスイベントを含む
| system_drive_used = event.system_drive_usage.avg() を計算
| device.name, system_drive_used をリスト
| system_drive_used を降順に並べ替え
```

{% endcode %}

</details>

<details>

<summary>システムドライブに空きが5GB未満のデバイスを一覧表示します。</summary>

{% code overflow="wrap" lineNumbers="true" %}

```
過去7日間のデバイス
| ボリュームを含む 
| system == true の場合 
| compute system_drive_free_space = capacity.sum() * (1 - usage.sum()) 
| system_drive_free_space < 5000000000 の場合 
| device.name と system_drive_free_space をリスト
```

{% endcode %}

</details>

<details>

<summary>デバイスのディスクとボリュームの概要を一覧表示します。</summary>

{% code overflow="wrap" lineNumbers="true" %}

```
過去7日間のデバイス
| device.name, disks, volumes をリスト
```

{% endcode %}

</details>

<details>

<summary>すべてのデバイスからのすべてのディスクのサイズ、起動可能状態、およびタイプ（SSDまたはHDD）を一覧表示します。</summary>

{% code overflow="wrap" lineNumbers="true" %}

```
ディスク
| device.name、name、is_bootable、capacity、type をリスト
```

{% endcode %}

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nexthink.com/platform/ja/references/investigating-storage-disks-and-volumes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
