> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sambanova.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# グループ管理

グループは、一括操作のためにラックを論理的な集合としてまとめるものです。本番環境、ステージング環境、テスト環境など、関連するインフラストラクチャの管理にグループを活用してください。

## グループコマンド

グループの作成と管理には、以下のコマンドを使用します。

### グループの作成

新しいグループを作成します。

```bash theme={}
snctl group create <group_name> --description <description>
```

**パラメータ:**

| パラメータ | 説明 |
| - | - |
| `<group_name>` | グループの名前 (英数字のみ) |
| `--description` | グループの説明 (必須) |

**例:**

```bash theme={}
snctl group create g1 --description "Production"
snctl group create g2 --description "Staging"
```

### グループ説明の更新

既存のグループの説明を編集します。

```bash theme={}
snctl group create <group_name> --description <new_description>
```

**例:**

```bash theme={}
snctl group create production --description "Updated: Production infrastructure (High Priority)"
```

### グループの削除

インベントリからグループを削除します。

```bash theme={}
snctl group delete <group_name>
```

**例:**

```bash theme={}
snctl group delete staging
```

<Note>
  グループを削除しても、グループ内のラックは削除されません。ラックは SambaRack Manager インベントリに残ります。
</Note>

### グループの一覧表示

設定済みのすべてのグループと、それぞれのラック数を表示します。

```bash theme={}
snctl group list
```

**出力例:**

```text theme={}
Group Name  Description  Rack Count
----------  -----------  ----------
g1          Production   1
```

`-o wide` を使用すると、所属ラックの ID を一覧表示する **Racks** 列が追加されます。

```bash theme={}
snctl group list -o wide
```

```text theme={}
Group Name  Description  Rack Count  Racks
----------  -----------  ----------  --------
g1          Production   2           001, 002
```

### グループ詳細の表示

すべてのラックを含む、特定のグループの詳細を表示します。

```bash theme={}
snctl group show <group_name>
```

**例:**

```bash theme={}
snctl group show g1
```

**出力例 - 4-PDU ラック:**

```text theme={}
Group: g1
├── Description: Group 1
└── Racks
    ├── 001 (part number: 1001934)
    └── 002 (part number: 1001934)
```

**出力例 - 混在構成:**

```text theme={}
Group: g1
├── Description: Group 1
└── Racks
    ├── 001 (part number: 1001934)
    └── 002 (part number: 1002331)
```

## ラックの所属管理コマンド

グループに対するラックの所属を管理するには、以下のコマンドを使用します。

### グループへのラックの追加

1 つ以上のラックをグループに追加します。

```bash theme={}
snctl group add-rack <group_name> --rack-id <rack_id>[,<rack_id>,...]
```

**例 – 単一のラックを追加:**

```bash theme={}
snctl group add-rack production --rack-id 001

#Expected output
✓ Rack 001 added to group production
```

**例 – 複数のラックを追加:**

```bash theme={}
snctl group add-rack production --rack-id 001,002,003
```

### グループからのラックの削除

グループからラックを削除します。

```bash theme={}
snctl group remove-rack <group_name> --rack-id <rack_id>
```

**例:**

```bash theme={}
snctl group remove-rack production --rack-id 001

#Expected output
✓ Rack 001 removed from group production
```

<Note>
  グループからラックを削除しても、ラック自体は SambaRack Manager インベントリから削除されません。
</Note>

## 他のコマンドでのグループの利用

グループは、ファームウェア操作と電源操作の対象として指定でき、多数のラックに対する操作を一度に実行できます。

### ファームウェア操作

```bash theme={}
# Audit firmware across every rack in a group
snctl firmware version --group production --device-type all

# Upgrade BMC firmware across every rack in a group
snctl firmware upgrade --group production --device-type bmc
```

詳細は [ファームウェア更新](srm-firmware-updates) をご参照ください。

### 電源操作

```bash theme={}
# Check power state of all nodes in a group
snctl power state --group production --type node

# Power on all nodes in a group
snctl power on --group production --type node

# Power off all nodes in a group
snctl power off --group production --type node

# Power cycle all nodes in a group
snctl power cycle --group production
```

対象タイプと並列度の制御については、[電源操作](srm-power-admin) をご参照ください。

<Note>
  グループへの一括展開の同時実行数は、`--parallelism-racks` と `--parallelism-devices` で制限されます。管理ネットワークに対する IPMI、Redfish、SSH の同時セッションの総数を制限するには、`--parallelism-devices` を使用してください。
</Note>

***

## 次のステップ

グループ内のすべてのラックに対して、電源状態の確認、電源オン、電源オフ、パワーサイクルを一括展開できます。詳細は [電源操作](srm-power-admin) をご参照ください。
