Skip to content

Adding and replacing disks

Console: the node’s Disks tab under Admin › Metal, and Admin › Platform › Catalog › Storage for pools and classes.

A node's Disks tab with drive health and pool use.
A node's Disks tab with drive health and pool use.

On a cluster, a disk can also be given to Ceph: see Ceph day 2 to add an OSD or replace a failed one.

Terminal window
stratumctl nodes disks n-abc123 # every block device, its use, and which are free
stratumctl storage-pools list # pools, state, capacity and their disks

A disk is free when nothing is on it: no partition table, filesystem, LVM or MD signature, and not mounted.

Terminal window
stratumctl storage-pools create bulk --disk /dev/disk/by-id/nvme-EXAMPLE_C \
--create-storage-class --storage-class-name bulk

Name disks by /dev/disk/by-id/, never /dev/sdX, which can change between boots. A disk that held something before is refused until it is wiped:

Terminal window
stratumctl nodes disk-wipe n-abc123 nvme1n1 --force-wipe

disk-wipe never touches a mounted disk or one that is part of an active pool.

Terminal window
stratumctl storage-pools extend bulk --disk /dev/disk/by-id/nvme-EXAMPLE_D

The pool then spans both disks without redundancy: losing either loses the pool. For redundancy, build the pool on an MD array at install; see Stage 2: Storage.

Terminal window
stratumctl storage-pools shrink bulk --disk /dev/disk/by-id/nvme-EXAMPLE_D

The disk’s data must fit on the pool’s other disks. Move or delete volumes first if it does not. An empty pool is removed with stratumctl storage-pools delete bulk.

When a drive reports failing or wearing (see Drive health), plan the replacement:

The drive is Do
A pool’s only disk Move the volumes off it while it still reads: snapshot or copy the data out from the instances, then delete the volumes and the pool. Replace the drive and create the pool again.
One of several disks in a pool storage-pools shrink the drive out, replace it, then storage-pools extend the pool onto the new drive.
A member of a data MD array (RAID 1 or 10) The array keeps running degraded and md-raid-degraded fires. Replace the drive and add the new one to the array with mdadm.
One disk of the OS mirror The system keeps running from the other disk. Replace the drive and re-add it to the OS arrays with mdadm.