Ejecting disks and internal server tests

You can use the storpool disk command to eject and test disks in the cluster. For more information about other parameters of this command see Disk.

Ejecting disks

To mark a device as temporarily unavailable:

# storpool disk 1111 eject
OK

Ejecting a disk from the cluster will stop the data replication for this disk, but will keep the metadata about the placement groups in which it participated and the volume objects from these groups it contained (see Placement groups and Volumes).

Note

The command above will refuse to eject the disk if this operation would lead to volumes or snapshots going into the down state (usually when the last up-to-date copy for some parts of a volume/snapshot is on this disk).

This disk will be shown as missing in the storpool disk list output, see Listings disks.

Attention

This operation leads to degraded redundancy for all volumes and snapshots that have data on the ejected disk.

Such a disk will not return by itself back into the cluster, and would have to be manually reinserted by removing its EJECTED flag with storpool_initdisk -r /dev/$path (see Device preparation options (storpool_initdisk)).

Soft ejecting

To mark a disk as unavailable by first rebalancing all data out to the other disks in the cluster and only then eject it:

# storpool disk 1422 softEject
OK
Balancer auto mode currently OFF. Must be ON for soft-eject to complete.

Note

This option requires StorPool balancer to be started after the above was issued; for details, see Balancer.

Internal server tests

When a server controlling a disk notices some issues with it (like a write error, or stalled request above a predefined threshold), the disk is also marked as “test pending”. This happens when there are many transient errors when a disk drive (or its controller) stalls a request for more than a predefined threshold.

Note

See also Automatic drive tests.

An eject option is available for manually initiating such a test, which will flag the disk that it requires test and will eject it. The server instance will then perform a quick set of non-intrusive read-write tests on this disk and will return it back into the cluster if all tests did well; for example:

# storpool disk 2331 eject test
OK

The tests are done usually couple of seconds up to a minute, to check the results from the last test:

# storpool disk 2331 testInfo
 times tested  |   test pending  |  read speed   |  write speed  |  read max latency   |  write max latency  | failed
            1  |             no  |  1.0 GiB/sec  |  971 MiB/sec  |  8 msec             |  4 msec             |     no

If the disk was already marked for testing the option “now” will skip the test on the next attempt to re-open the disk:

# storpool disk 2301 eject now
OK

Attention

Note that this is exactly the same as “eject”, the disk would have to be manually returned into the cluster.