Configuring new storage disks automatically
Limitations
- If the new disk is smaller than the old one, it will not be assigned the Storage role. Instead, you will be alerted about the size difference and will have to assign the role manually (or change the disk to a larger one).
- If the new disk is of a different type than the old one (for example, if you replaced an SSD with an HDD or vice versa), it will not be assigned the Storage role. Instead, you will be alerted about the type difference and will have to assign the role manually (or change the disk to one of the needed type).
- If you enable this feature after a disk fails, its replacement will not be assigned the Storage role.
- If you accidentally remove and then re-attach a healthy Storage disk, its data will be reused.
- If you add a disk that does not replace any failed ones, it will not be assigned the Storage role.
- If you add a disk and one of the CSes is inactive or offline, the disk will be assigned the Storage role and a new CS will be created.
- If you attach multiple replacement disks at once, the Storage role will be assigned to them in no particular order, as long as their size and type fit. They will also be assigned to correct tiers, if applicable.
To have the storage role assigned to new disks automatically
Admin panel
- Go to Settings > System settings > Automatic disk replacement.
- Turn on the toggle switch Enable automatic configuration of new disks.
-
Select tiers to scan for failed disks. If a disk on an unselected tier breaks down, you will have to assign roles to its replacement manually.
- Click Save.
From now on, when you replace a failed Storage disk, the new disk will be detected, formatted, assigned the same role, and placed on the same tier (if applicable). You will see the result on node’s Disks screen.
Command-line interface
Use the following command:
vinfra cluster settings automatic-disk-replacement set [--tier0 {on,off}] [--tier1 {on,off}] [--tier2 {on,off}] [--tier3 {on,off}]
--tier0 {on,off}
- Enable or disable automatic storage disk configuration for tier 0
--tier1 {on,off}
- Enable or disable automatic storage disk configuration for tier 1
--tier2 {on,off}
- Enable or disable automatic storage disk configuration for tier 2
--tier3 {on,off}
- Enable or disable automatic storage disk configuration for tier 3
For example, to enable automatic storage disk configuration for all storage tiers, run:
# vinfra cluster settings automatic-disk-replacement set --tier0 on --tier1 on --tier2 on --tier3 on
You can view the automatic storage disk configuration in the vinfra cluster settings automatic-disk-replacement show
output:
# vinfra cluster settings automatic-disk-replacement show +-------+-------+ | Field | Value | +-------+-------+ | tier0 | True | | tier1 | False | | tier2 | True | | tier3 | False | +-------+-------+