(storage-powerstore)=
# Dell PowerStore - `powerstore`

Dell PowerStore is a storage solution from [Dell Technologies](https://www.dell.com/).
It offers the consumption of block storage across the network.

LXD supports connecting to PowerStore storage through {abbr}`iSCSI` (Internet Small Computer Systems Interface) or {abbr}`FC` (Fibre Channel).

For iSCSI, ensure that the required kernel modules and the iSCSI CLI (`iscsiadm`) are installed on your host system.

## Terminology

PowerStore does not have a concept of storage pools.
Instead, LXD scopes its volumes to a storage pool by prefixing each volume name with a deterministic storage pool identifier.
This prefix prevents name conflicts between volumes belonging to different LXD storage pools on the same PowerStore array.

LXD creates volumes on the PowerStore array and maps them to the respective LXD host.
When the first volume needs to be mapped to a specific LXD host, LXD discovers and connects to the available targets provided by PowerStore.

## The `powerstore` driver in LXD

The `powerstore` driver in LXD uses PowerStore volumes for custom storage volumes, instances, and snapshots.
All volumes created by LXD using the `powerstore` driver are thin-provisioned block volumes. If required (for example, for containers and custom file system volumes), LXD formats the volume with a desired file system.

LXD expects PowerStore to be pre-configured and accessible. When creating the LXD storage pool, the user must specify authentication credentials that allow LXD to connect to PowerStore. LXD also assumes that it has full control over the volumes it manages.

This driver provides remote storage.
As a result, and depending on the internal network, storage access might be a bit slower compared to local storage.
On the other hand, using remote storage has significant advantages in a cluster setup: all cluster members have access to the same storage pools with the exact same contents, without requiring the storage pools to be synchronized between members.

For iSCSI, when a volume is first mapped to the LXD host, LXD discovers the available targets from the PowerStore array and connects to them.
You can optionally restrict connections to specific targets using {config:option}`storage-powerstore-pool-conf:powerstore.target`.
For Fibre Channel, targets are discovered automatically through the FC {abbr}`HBA` (Host Bus Adapter). The {config:option}`storage-powerstore-pool-conf:powerstore.target` option does not apply to FC mode.

Volume snapshots are supported by PowerStore.
When a volume with at least one snapshot is copied, LXD sequentially creates snapshots on the destination volume from snapshots on the source volume.
Finally, once all snapshots are copied, the source volume is copied into the destination volume.

(storage-powerstore-volume-names)=
### Volume names

The driver uses the volume's {config:option}`storage-powerstore-volume-conf:volatile.uuid` to generate a volume name.
The pool-scoped prefix `lxd-<pool_name_hash>-` is prepended to all volume names along with special identifiers, such as `c_` or `v_`, to distinguish volume types.
Additional identifiers, such as `.i` or `.b`, may also be appended to further distinguish volume types.

Type                       | Identifier   | Example
:--                        | :---         | :----------
Container                  | `c_`         | `c_5a2504b0-6a6c-4849-8ee7-ddb0b674fd14`
Virtual machine            | `v_`         | `v_5a2504b0-6a6c-4849-8ee7-ddb0b674fd14.b` (block volume) and `v_5a2504b0-6a6c-4849-8ee7-ddb0b674fd14` (file system volume)
Image (ISO)                | `i_`         | `i_5a2504b0-6a6c-4849-8ee7-ddb0b674fd14.i`
Custom volume              | `u_`         | `u_5a2504b0-6a6c-4849-8ee7-ddb0b674fd14` (file system volume) or `u_5a2504b0-6a6c-4849-8ee7-ddb0b674fd14.b` (block volume)
Mountable snapshot clone   | `s`          | `sc_5a2504b0-6a6c-4849-8ee7-ddb0b674fd14` (container), `sv_5a2504b0-6a6c-4849-8ee7-ddb0b674fd14.b` (VM), or `su_5a2504b0-6a6c-4849-8ee7-ddb0b674fd14` (custom volume)

Snapshots in PowerStore are native children of their parent volume. Each snapshot is named using the snapshot's own UUID with the same type prefix as the parent volume.
Mountable snapshot clones are temporary volumes created by LXD when a snapshot needs to be directly accessed (for example, during export). The `s` prefix is prepended to the volume type identifier to distinguish them from regular volumes.

(storage-powerstore-limitations)=
### Limitations

The `powerstore` driver has the following limitations:

Volume size constraints
: The minimum volume size (quota) is `1MiB` and must be a multiple of `1MiB`. The maximum volume size is `256TiB`.

Volume shrinking
: The PowerStore driver does not allow shrinking volumes.

Sharing custom volumes between instances
: The PowerStore driver "simulates" volumes with content type `filesystem` by putting a file system on top of a PowerStore volume.
  Therefore, custom storage volumes can only be assigned to a single instance at a time.

Sharing a PowerStore storage pool between multiple LXD installations
: Sharing the same PowerStore storage pool between multiple LXD installations is not supported.

Recovering PowerStore storage pools
: Recovery of PowerStore storage pools using `lxd recover` is not supported.

(storage-powerstore-options)=
## Configuration options

The following configuration options are available for storage pools that use the `powerstore` driver, as well as storage volumes in these pools.

(storage-powerstore-pool-config)=
### Storage pool configuration

% Include content from [../metadata.txt](../metadata.txt)
```{include} ../metadata.txt
    :start-after: <!-- config group storage-powerstore-pool-conf start -->
    :end-before: <!-- config group storage-powerstore-pool-conf end -->
```

{{volume_configuration}}

(storage-powerstore-vol-config)=
### Storage volume configuration

% Include content from [../metadata.txt](../metadata.txt)
```{include} ../metadata.txt
    :start-after: <!-- config group storage-powerstore-volume-conf start -->
    :end-before: <!-- config group storage-powerstore-volume-conf end -->
```
