Initialization

After the RAID is created, the engine starts initializing drives. During the initialization process, RAID parity checksums are calculated and written to the parity area of the drives.. The RAID supports user’s IO while initialization is in progress. If IO goes to uninitialized areas, the parity is being calculated on-demand. Once initialization is completed, the RAID transitions to a fully operational state.

The initialization process impacts IO performance. Without full RAID initialization, consistency checks like silent data corruption detection can't be done properly, as uninitialized areas may appear corrupted. Uninitialized areas do not impact the consistency of already written data or the reconstruct process. However, if the RAID goes into ‘Degraded’ mode, the reconstruct process should be run first, and initialization should be restarted after reconstruction is completed, Otherwise, reconstruct can fail to recover user’s data. Because of these limitations it is recommended to wait until initialization is finished before using the RAID for user’s IO.

On the raid restoration the initialization process is restarted automatically if needed. In case of emergency RAID stop (engine or the storage hardware powered down or restarted unexpectedly) the RAID is marked as possibly corrupted and the initialization process is restarted automatically to fix possible “write holes” at next RAID restore or automatic RAID restart. This process is named as “resync”.

The initialization process can be stopped and restarted manually by the commands:
xnr_cli raid init stop --name xnraid
xnr_cli raid init start --name xnraid

It is possible to force finish raid initialization for performance TEST PURPOSES ONLY by xnr_cli raid init finish --force --name xnraid. This operation marks the RAID as initialized without actually calculating the stripes parity for the RAID stripes. It is strongly NOT RECOMMENDED to force RAID initialization as this can lead inability to recover data and data corruption as a result if the RAID switches to degraded mode due to a drive fail.