Configuration Files and Metadata

In this chapter, you can learn:

  • how the information about xiRAID RAID objects is stored;
  • how to use this information to import a RAID to another system;
  • how to restore the configuration if a system disk fails;
  • how to restore a RAID.

xiRAID RAID Configuration

After creating a xiRAID RAID device, the information about the created device automatically goes to the following locations in the system:

  • the current configuration file /etc/xiraid/raid.conf;
  • the metadata on the disks included in the created xiRAID RAID device.

Additionally, before changing the current configuration file, the system automatically creates a backup file of the current configuration /etc/xiraid/raid.conf.bak. Thus, if necessary, you can restore the previous version of the device configuration.

The current configurations file

The current configurations file stores the most recent changes to the xiRAID RAID devices and is used when working with created xiRAID RAID devices.

The example of the configuration file:

{
    "raids": {
        "raid_one": {
            "name": "raid_one",
            "uuid": "C2875DCE-971E-4401-9D2C-7EBC36422B6A",
            "level": "0",
            "synd_cnt": 0,
            "strip_size": 16,
            "block_size": 4096,
            "drives": [
                "drive-scsi9"
            ],
            "size": 20578304,
            "group_size": 1
        },
        "raid_two": {
            "name": "raid_two",
            "uuid": "3967F298-893A-45E3-A79F-051FE6C499F7",
            "level": "1",
            "synd_cnt": 0,
            "strip_size": 16,
            "block_size": 4096,
            "drives": [
                "drive-scsi8",
                "drive-scsi7"
            ],
            "size": 20578304,
            "group_size": 2
        }
    },
    "drives": {
        "drive-scsi8": "1",
        "drive-scsi7": "2"
    },
    "faulty_count_threshold": 3,
    "version": "4.0.1",
    "timestamp": 1648628802.796359
}

The "raids" object contains the settings of the created xiRAID RAIDs.

The "drives" object contains the serial numbers of the drives with an error count greater than 0.

The "faulty_count_threshold" object contains the value of the error threshold value for the drives.

The "timestamp" object contains the creation date of this configuration file in timestamp format.

Configurations metadata on disks

Since the current configurations file is stored on the system disk, to protect against system disk failure, the configuration information is also stored on the disks that belong to the xiRAID RAID devices.

Each disk contains data that enables a complete copy of the configuration file to be restored.

Restoring the RAID

The RAID restores automatically after any failure.

If this does not happen and the RAID state is "None", you can restore such RAIDs from the current configuration file using

# xicli raid restore <arg>
Table 1. Arguments for the restore subcommand

Mutually exclusive required arguments

-n --name

The name of the RAID.

-a --all

Restore all available xiRAID RAIDs.

Argument takes no value.