DG Import/Export in SupremeRAID™ HE for High Availability
Introduction
This feature allows users to implement a basic active-standby high availability (HA) setup using SupremeRAID™ HE. To gracefully migrate services from node A to node B, users can export the Drive Group (DG) on node A, then import it on node B and resume the service. The following sections explain how this process works.
Key Concepts
- Foreign PD: A physical drive (PD) containing valid Graid metadata that belongs to a different system/config UUID.
- Foreign Config: Configuration metadata on a foreign PD.
- Foreign DG: A Drive Group defined by a foreign config.
- Foreign Hotspare: A hotspare PD described in a foreign config.
Feature Details
PD States
A new state, PDS_FOREIGN, represents PDs with foreign configurations.
Creating a PD
By default, creating a PD will not wipe its metadata. If foreign metadata is found, the PD is marked as foreign.
Use -w or --wipe-meta to explicitly erase existing metadata:
$ graidctl create pd 0 -w
PD Data Protection
To protect against concurrent writes, non-foreign PDs acquire an exclusive-write NVMe reservation if supported.
If this reservation is lost (preempted), the PD is marked as foreign.
Exporting a DG
Before migrating a DG, use the following command to cleanly take it offline:
$ graidctl export dg 0
This operation transitions all member PDs to foreign state and marks the DG as offline.
Example Output:
$ sudo graidctl export dg 0
✔ Export drive group successfully.
$ sudo graidctl ls pd
✔ List physical drive successfully.
┌───────┬───────┬──────────────┬──────────┬───────┬──────────┬─────────┬───────────┬─────────┬───────-─┐
│ PD ID │ DG ID │ DEVICE PATH │ NQN/WWID │ MODEL │ CAPACITY │ SLOT ID │ NUMA NODE │ WEAROUT │ STATE │
├───────┼───────┼──────────────┼──────────┼───────┼──────────┼─────────┼───────────┼─────────┼────────-┤
│ 0 │ 0 │ /dev/nvme5n1 │ uuid.01 │ NVMe │ 932 GiB │ N/A │ N/A │ N/A │ FOREIGN │
│ 1 │ 0 │ /dev/nvme6n1 │ uuid.02 │ NVMe │ 932 GiB │ N/A │ N/A │ N/A │ FOREIGN │
│ 2 │ 1 │ /dev/nvme7n1 │ uuid.03 │ NVMe │ 932 GiB │ N/A │ N/A │ N/A │ FOREIGN │
│ 3 │ 1 │ /dev/nvme8n1 │ uuid.04 │ NVMe │ 932 GiB │ N/A │ N/A │ N/A │ ONLINE │
│ 4 │ 1 │ /dev/nvme9n1 │ uuid.05 │ NVMe │ 932 GiB │ N/A │ N/A │ N/A │ ONLINE │
└───────┴───────┴──────────────┴─────────-┴───────┴──────────┴─────────┴───────────┴─────────┴────────-┘
$ sudo graidctl ls dg
✔ List drive group successfully.
┌────────┬────────┬────────┬──────────┬──────────┬────────┬─────────────────────────────────┐
│ DG ID │ MODE │ VD NUM │ CAPACITY │ FREE │ USED │ STATE │
├────────┼────────┼────────┼──────────┼──────────┼────────┼─────────────────────────────────┤
│ 0 │ RAID5 │ 0 │ 1.8 TiB │ 1.8 TiB │ 0 B │ OFFLINE │
│ 1 │ RAID1 │ 0 │ 931 GiB │ 931 GiB │ 0 B │ INIT (0.38%, 42 mins remaining) │
└────────┴────────┴────────┴──────────┴──────────┴────────┴─────────────────────────────────┘
Scanning Foreign DGs
Use this command to detect foreign DGs available for import:
$ graidctl scan foreign_dg
Example Output:
$ sudo graidctl scan foreign_dg
✔ Scan foreign dg successfully.
┌────────────────────┬────────┬───────────────────────--┬────────────┐
│ DG UUID │ MODE │ PD │ IMPORTABLE │
├────────────────────┼────────┼───────────────────────--┼────────────┤
│ 438184443912393153 │ RAID5 │ uuid.01 (PD0: foreign) │ Yes │
│ │ │ uuid.02 (PD1: foreign) │ │
│ 438184488854358273 │ RAID1 │ uuid.03 (PD2: foreign) │ No │
│ │ │ uuid.04 (PD3: foreign) │ │
│ │ │ uuid.05 (PD-1: unknown) │ │
└────────────────────┴────────┴─────────────────────────┴────────────┘
Info
uuid.05 does not exist or has not been created as a PD.
A DG is not importable if:
- One or more VDs are used in stripe-cache
- One or more VDs are exported via NVMe-oF
- A local active DG has the same UUID
- Any PD is not created or belongs to another config/DG
- Any PD is already part of a local DG
Importing a Foreign DG
Use the following command to import a detected foreign DG:
$ graidctl import foreign_dg 6bb660be-6b8d-4a50-a151-4c55b3cbe413
Example Output:
$ sudo ./gtl import foreign_dg 438184443912393153
✔ Import foreign dg successfully.
$ sudo ./gtl ls dg
✔ List drive group successfully.
┌────────┬────────┬────────┬────────────┬────────────┬────────────┬────────────────────────────────────────────────┐
│ DG ID │ MODE │ VD NUM │ CAPACITY │ FREE │ USED │ STATE │
├────────┼────────┼────────┼────────────┼────────────┼────────────┼────────────────────────────────────────────────┤
│ 0 │ RAID5 │ 0 │ 1.8 TiB │ 1.8 TiB │ 0 B │ INIT (58.06%, 24 mins remaining) │
└────────┴────────┴────────┴────────────┴────────────┴────────────┴────────────────────────────────────────────────┘
Foreign Hotspare Management
To export and import global hotspares:
Export a hotspare PD:
$ graidctl export hotspare 2Scan for available foreign hotspares:
$ graidctl scan foreign_hotspareImport a hotspare:
$ graidctl import foreign_hotspare 1cb70a2b-4e38-4ff2-abc7-f7b830e50835