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

# Rack administration

This guide covers adding, viewing, and managing racks and their devices using SambaRack Manager. It includes tasks for both new installations and ongoing management.

The complete setup process is:

1. Install SambaRack Manager software
2. Initial setup and verification
3. **Add SambaRack to the SambaRack Manager inventory** (this page)
4. Configure device credentials in SambaRack Manager

## For new installations

If you are setting up SambaRack Manager for the first time, complete the following steps.

### Adding racks

Use the `snctl rack add` command to add all installed SambaRack units to the inventory. See [Add rack](#add-rack) for details.

### Next step

After successfully adding racks to SambaRack Manager, configure your [Device Credentials](/en/v1.2.0/sambastack/hardware-admin/sambarack-manager/srm-device-credentials).

## Rack commands

Use the following commands to manage racks in the SambaRack Manager inventory.

### Add rack

Add a new rack to the inventory based on a partnumber configuration.

<Note>
  Racks must be powered on and fully functional before adding them to the inventory.
</Note>

```bash theme={null}
snctl rack add <rack_id> --type <partnumber>
```

**Parameters:**

| Parameter   | Description                                                                               |
| ----------- | ----------------------------------------------------------------------------------------- |
| `<rack_id>` | The ID of the rack to add (e.g., `001`)                                                   |
| `--type`    | Rack partnumber. Supported values: `1001934` (4-PDU SN40L-16), `1002331` (2-PDU SN40L-16) |

<Note>
  To identify the correct part number for your installed SambaRack, refer to the relevant SambaNova Support Portal knowledge base article.
</Note>

**Part numbers:**

| Part number | Configuration                  |
| ----------- | ------------------------------ |
| `1001934`   | SambaRack SN40L-16 with 4 PDUs |
| `1002331`   | SambaRack SN40L-16 with 2 PDUs |

**Example – 4-PDU rack:**

```bash theme={null}
snctl rack add 001 --type 1001934
```

**Example – 2-PDU rack:**

```bash theme={null}
snctl rack add 001 --type 1002331
```

This creates a rack with the following components based on the partnumber configuration:

* Nodes
* PDUs (2 or 4, depending on configuration)
* XRDUs per node (typically 8 per node)
* Access switches
* Data switches
* Serial terminals

### List racks

Display all configured racks in the inventory:

```bash theme={null}
snctl rack list
```

**Example output – 4-PDU racks:**

```text theme={null}
                              Configured Racks
+---------+----------------+-------+------+-------+------------+-------------+-----+
| Rack ID | Type           | Nodes | PDUs | XRDUs | Acc Switch | Data Switch | SCS |
+---------+----------------+-------+------+-------+------------+-------------+-----+
| 001     | 1001934        | 1     | 4    | 8     | 1          | 1           | 1   |
| 002     | 1001934        | 1     | 4    | 8     | 1          | 1           | 1   |
+---------+----------------+-------+------+-------+------------+-------------+-----+
```

**Example output – 2-PDU rack:**

```text theme={null}
                              Configured Racks
+---------+----------------+-------+------+-------+------------+-------------+-----+
| Rack ID | Type           | Nodes | PDUs | XRDUs | Acc Switch | Data Switch | SCS |
+---------+----------------+-------+------+-------+------------+-------------+-----+
| 001     | 1002331        | 1     | 2    | 8     | 1          | 1           | 1   |
+---------+----------------+-------+------+-------+------------+-------------+-----+
```

### Show rack details

View detailed information about a specific rack and its components:

```bash theme={null}
snctl rack show <rack_id>
```

**Example:**

```bash theme={null}
snctl rack show 001
```

**Example output – 4-PDU rack:**

```text theme={null}
                                       Rack Details: 001
+---------------------------+--------------------+----------------+------+----------+
| Component                 | Hostname           | IP             | Port | Username |
+---------------------------+--------------------+----------------+------+----------+
| Rack/001/AccessSwitch/0   | SN40L-16-ACCSW     | 192.168.10.240 | 3001 | root     |
| Rack/001/DataSwitch/0     | SN40L-16-DATASW    | 192.168.10.241 | 3002 | root     |
| Rack/001/PDU/1            | SN40L-16-PDU1      | 192.168.10.20  | 3003 | admin    |
| Rack/001/PDU/2            | SN40L-16-PDU2      | 192.168.10.21  | 3004 | admin    |
| Rack/001/PDU/3            | SN40L-16-PDU3      | 192.168.10.22  | 3005 | admin    |
| Rack/001/PDU/4            | SN40L-16-PDU4      | 192.168.10.23  | 3006 | admin    |
| Rack/001/SerialTerminal/0 | SN40L-16-SCS       | 192.168.10.20  |      | sysadmin |
| Rack/001/Node/0/Host      | SFT-SN40L-16-H-1   | 192.168.4.1    | 3024 | root     |
| Rack/001/Node/0/BMC       | SN40L-16-H-1-SP    | 192.168.5.1    |      | admin    |
| Rack/001/Node/0/XRDU/0    | SN40L-16-H-1-XRDU0 | 192.168.6.1    | 3026 | root     |
| Rack/001/Node/0/XRDU/1    | SN40L-16-H-1-XRDU1 | 192.168.7.1    | 3025 | root     |
| Rack/001/Node/0/XRDU/2    | SN40L-16-H-1-XRDU2 | 192.168.8.1    | 3023 | root     |
| Rack/001/Node/0/XRDU/3    | SN40L-16-H-1-XRDU3 | 192.168.9.1    | 3023 | root     |
| Rack/001/Node/0/XRDU/4    | SN40L-16-H-1-XRDU4 | 192.168.10.1   | 3016 | root     |
| Rack/001/Node/0/XRDU/5    | SN40L-16-H-1-XRDU5 | 192.168.11.1   | 3015 | root     |
| Rack/001/Node/0/XRDU/6    | SN40L-16-H-1-XRDU6 | 192.168.12.1   | 3013 | root     |
| Rack/001/Node/0/XRDU/7    | SN40L-16-H-1-XRDU7 | 192.168.13.1   | 3012 | root     |
+---------------------------+--------------------+----------------+------+----------+
```

**Example output – 2-PDU rack:**

```text theme={null}
                                       Rack Details: 001
+---------------------------+--------------------+----------------+------+----------+
| Component                 | Hostname           | IP             | Port | Username |
+---------------------------+--------------------+----------------+------+----------+
| Rack/001/AccessSwitch/0   | SN40L-16-ACCSW     | 192.168.10.240 | 3001 | root     |
| Rack/001/DataSwitch/0     | SN40L-16-DATASW    | 192.168.10.241 | 3002 | root     |
| Rack/001/PDU/1            | SN40L-16-PDU1      | 192.168.10.20  | 3003 | admin    |
| Rack/001/PDU/2            | SN40L-16-PDU2      | 192.168.10.21  | 3004 | admin    |
| Rack/001/SerialTerminal/0 | SN40L-16-SCS       | 192.168.10.20  |      | sysadmin |
| Rack/001/Node/0/Host      | SFT-SN40L-16-H-1   | 192.168.4.1    | 3024 | root     |
| Rack/001/Node/0/BMC       | SN40L-16-H-1-SP    | 192.168.5.1    |      | admin    |
| Rack/001/Node/0/XRDU/0    | SN40L-16-H-1-XRDU0 | 192.168.6.1    | 3026 | root     |
| Rack/001/Node/0/XRDU/1    | SN40L-16-H-1-XRDU1 | 192.168.7.1    | 3025 | root     |
| Rack/001/Node/0/XRDU/2    | SN40L-16-H-1-XRDU2 | 192.168.8.1    | 3023 | root     |
| Rack/001/Node/0/XRDU/3    | SN40L-16-H-1-XRDU3 | 192.168.9.1    | 3023 | root     |
| Rack/001/Node/0/XRDU/4    | SN40L-16-H-1-XRDU4 | 192.168.10.1   | 3016 | root     |
| Rack/001/Node/0/XRDU/5    | SN40L-16-H-1-XRDU5 | 192.168.11.1   | 3015 | root     |
| Rack/001/Node/0/XRDU/6    | SN40L-16-H-1-XRDU6 | 192.168.12.1   | 3013 | root     |
| Rack/001/Node/0/XRDU/7    | SN40L-16-H-1-XRDU7 | 192.168.13.1   | 3012 | root     |
+---------------------------+--------------------+----------------+------+----------+
```

### Delete rack

Remove a rack and its associated nodes from the SambaRack Manager inventory:

```bash theme={null}
snctl rack delete <rack_id>
```

<Warning>
  This permanently deletes the rack, its nodes, and all associated devices from the SambaRack Manager inventory. Deleting a rack from SambaRack Manager does **not** remove it from your SambaStack cluster.
</Warning>

**Example:**

```bash theme={null}
snctl rack delete 001
```

## Device commands

Use the following commands to manage individual devices within racks.

### Add or update device

Add a new device or update an existing device in a rack:

```bash theme={null}
snctl rack add-device <device_path> \
  [--ip <ip_address>] \
  [--user <username>] \
  [--password <password>] \
  [--hostname <hostname>] \
  [--port <port>] \
  [--index <index>] \
  [--ask-pass] \
  [--use-global-secret]
```

**Parameters:**

| Parameter             | Description                                                                                                                                                           |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `<device_path>`       | Path to the device. See [Device path formats](#device-path-formats).                                                                                                  |
| `--ip`                | Device IP address                                                                                                                                                     |
| `--user`              | Username for the device                                                                                                                                               |
| `--password`          | Password for the device (uses placeholder if not provided)                                                                                                            |
| `--hostname`          | Device hostname                                                                                                                                                       |
| `--port`              | Connection port for the device. If not provided when adding a new device, port is set to `None`. If not provided when updating, the existing port value is preserved. |
| `--index`             | Device index. See [Device indexing](#device-indexing).                                                                                                                |
| `--ask-pass`          | Prompt for password securely                                                                                                                                          |
| `--use-global-secret` | Force use of global secret placeholder                                                                                                                                |

**Examples:**

Add a PDU with port:

```bash theme={null}
snctl rack add-device Rack/001/PDU/1 \
  --ip 192.168.10.20 \
  --user admin \
  --hostname SN40L-16-PDU1 \
  --port 3003
```

Add an XRDU with port:

```bash theme={null}
snctl rack add-device Rack/001/Node/0/XRDU/0 \
  --ip 192.168.6.1 \
  --user root \
  --hostname SN40L-16-H-1-XRDU0 \
  --port 3026
```

Update an existing device port:

```bash theme={null}
snctl rack add-device Rack/001/PDU/1 \
  --port 3004
```

### Delete device

Remove a device from a rack:

```bash theme={null}
snctl rack delete-device <target_id> \
  --device-type <device_type> \
  [--index <index>]
```

**Parameters:**

| Parameter       | Description                                                  |
| --------------- | ------------------------------------------------------------ |
| `<target_id>`   | Rack ID or node name                                         |
| `--device-type` | Type of device to delete. See [Device types](#device-types). |
| `--index`       | Device index. See [Device indexing](#device-indexing).       |

**Examples:**

Remove a PDU:

```bash theme={null}
snctl rack delete-device 001 \
  --device-type pdu \
  --index 1
```

Remove an XRDU:

```bash theme={null}
snctl rack delete-device 001 \
  --device-type xrdu \
  --index 0
```

## Device reference

This section provides reference information for device commands.

### Device path formats

Use these path formats when specifying devices:

| Format                                                   | Description                                      | Example                  |
| -------------------------------------------------------- | ------------------------------------------------ | ------------------------ |
| `Rack/<rack_id>/<device_type>/<index>`                   | Rack-level devices                               | `Rack/001/PDU/1`         |
| `Rack/<rack_id>/Node/<node_index>/<device_type>/<index>` | Node-level devices with index                    | `Rack/001/Node/0/XRDU/1` |
| `Rack/<rack_id>/Node/<node_index>/<device_type>`         | Node-level devices without index (defaults to 0) | `Rack/001/Node/0/Host`   |

### Device types

The following device types are available:

**Rack-level devices:**

| Type             | Description             |
| ---------------- | ----------------------- |
| `AccessSwitch`   | Access switch           |
| `DataSwitch`     | Data switch             |
| `PDU`            | Power Distribution Unit |
| `SerialTerminal` | Serial console server   |

**Node-level devices:**

| Type   | Description                                                   |
| ------ | ------------------------------------------------------------- |
| `Host` | Host module                                                   |
| `BMC`  | Baseboard Management Controller                               |
| `XRDU` | Accelerator module with two Reconfigurable Data Units™ (RDUs) |

### Device indexing

Different device types use different indexing schemes:

| Device type   | Index range                              | Notes                                     |
| ------------- | ---------------------------------------- | ----------------------------------------- |
| PDU           | 1–4 (4-PDU config) or 1–2 (2-PDU config) | 1-indexed                                 |
| XRDU          | 0–7                                      | 0-indexed                                 |
| Other devices | 0+                                       | 0-indexed, defaults to 0 if not specified |
