Plugin/webGui/Array Status

From unRAID
< Plugin‎ | webGui
Revision as of 18:50, 11 July 2011 by Limetech (talk | contribs) ({{SUBPAGENAME}})
Jump to: navigation, search

Array Status

An important concept associated with unRAID is the notion of the array being Started or not. When the array is Started, it means parity-protected I/O to individual devices is enabled and all shares are exported. In other words, when Started, the server is completely on-line. (Exception: see Maintenance Mode below.)

By contrast, when the array is Stopped, all normal I/O is disabled and the only share possibly exported is the flash share. There are a number of maintenance operations that can only be accomplished when the array is Stopped.

Starting and Stopping the array

Normally following system boot up the array is automatically Started; but if there's been a change in disk configuration, such as a new disk added, the array is left Stopped so that you can confirm the configuration is correct. This means that any time you have made a disk configuration change you must log into the WebGui and manually Start the array.

Disk configuration changes

Here are the normal configuration changes you can make:

  • You add one or more new disks.
  • You replace a single disk with a bigger one.
  • You replace a failed disk.
  • You shuffle two or more data disks between slots.
  • You remove one or more data disks
Add one or more new disks

This is the normal case of expanding the capacity of the system by adding one or more new hard drives:

  1. Stop the array.
  2. Power down the unit.
  3. Install your new hard drive(s).
  4. Power up the unit.
  5. Start the array.

When you Start the array, the system may show newly added disks as "Unformatted". If any disk shows as Unformatted a "Format" button will appear on the management interface. You must click this button to format the new disk(s). When this operation finishes, all the data disks, including the new one(s), will be exported and be available for use.

The format operation consists of two phases. First, the the entire contents of the new disk(s) is cleared (written with zeros), and then marked active in the array. Next, a file system is created. unRAID Server uses the ReiserFS journalled file system.

The clearing phase is necessary to preserve the fault tolerance characteristic of the array. If at any time while the new disk(s) is being cleared, one of the other disks fails, you will still be able to recover the data of the failed disk. Unfortunately, the clearing phase can take several hours depending on the size of the new disks(s).

The capacity of any new disk(s) added must be the same size or smaller than your parity disk. If you wish to add a new disk which is larger than your parity disk, then you must instead first replace your parity disk. (You could use your new disk to replace parity, and then use your old parity disk as a new data disk. This is explained below.)

Replace a single disk with a bigger one

This is the case where you are replacing a single small disk with a bigger one:

  1. Stop the array.
  2. Power down the unit.
  3. Replace smaller disk with new bigger disk.
  4. Power up the unit.
  5. Start the array.

When you start the array, the system will reconstruct the contents of the original smaller disk onto the new disk. Upon completion, the disk's file system will be expanded to reflect the new size. You can only expand one disk at a time.

Note: After reconstruct has completed, we recommend starting a non-correcting Parity-Check. This will ensure that all blocks can be read correctly from the new hard drive. To start a non-correcting Parity-Check, uncheck the "Correct" checkbox before clicking Check button.

If you are replacing your existing Parity disk with a bigger one, then when you Start the array, the system will simply start a Parity-Sync onto the new Parity disk.

Note: After Parity-Sync has completed, we recommand starting a (correcting) Parity-Check. This will ensure that all blocks can be read correctly from the new hard drive.

A special case exists when the new bigger disk is also bigger than the existing parity disk. In this case you must use your new disk to first replace parity, and then replace your small disk with your old parity disk:

  1. Stop the array.
  2. Power down the unit.
  3. Replace smaller parity disk with new bigger disk.
  4. Power up the unit.
  5. Start the array.
  6. Wait for Parity-Sync to complete.
  7. Stop the array.
  8. Power down the unit.
  9. Replace smaller data disk with your old parity disk.
  10. Power up the unit.
  11. Start the array.
Replace a failed disk

This is the case where you have replaced a failed disk with a new disk:

  1. Stop the array.
  2. Power down the unit.
  3. Replace the failed hard disk with a new one.
  4. Power up the unit.
  5. Start the array.

When you Start the array after replacing a failed disk, the system will reconstruct the contents of the failed disk onto the new disk; and, if the new disk is bigger, expand the file system.

You must replace a failed disk with a disk which is as big or bigger than the original and not bigger than the parity disk. If the replacement disk is larger than your parity disk, then the system permits a special configuration change called swap-disable.

For swap-disable, you use your existing parity disk to replace the failed disk, and you install your new big disk as the parity disk:

  1. Stop the array.
  2. Power down the unit.
  3. Replace the parity hard disk with a new bigger one.
  4. Replace the failed hard disk with you old parity disk.
  5. Power up the unit.
  6. Start the array.

When you start the array, the system will first copy the parity information to the new parity disk, and then reconstruct the contents of the failed disk.

Shuffle two or more data disks between slots

This is the case where the system recognizes all the data disks, but notices that they are not in the same slots they used to be in. The Main page will display the disk model/serial numbers both of the actual placement and what the placement used to be.

If you start the array in this state, the system will just record the new positions of the disks. Note however, that if the same parity disk is not in the top slot you can not start the array.

Remove one or more data disks

In this case the missing disk(s) will be identified. If there is only one missing disk when you start the array it will be marked as failed. All data disks will be exported (including the missing one), but the system will be running unprotected; that is, if a disk fails you will lose data.

If there are two or more missing disks, you can not start the array. In this case you must either put the disks back, or click Restore on the Main page to reset the configuration.

Disabled disk

During normal operation where parity is valid for the array, if any disk read operation fails with an uncorrectable error, the system will automatically read parity plus all the other data disks and reconstruct the requested data on-the-fly. The system then follows up by writing the reconstructed data back to the disk which failed. Often, this will result in the hard drive itself reallocating the sector, thus healing the error. However, if any disk write operation fails, the disk is immediately marked Disabled. From this point on, all I/O to the disk is performed using parity-reconstruct, and if another hard drive fails, then you may lose data.

The vital array configuration data is stored in the file config/super.dat on the Flash and is updated directly by the driver in the case of disabling a disk. For this reason, you must always have the Flash installed in your server.

Note: In the case where the system attempts reconstruct on-the-fly, there may be a significant pause in I/O if one or more of the other data disks or parity needs to be spun up.

Maintenance Mode

When operating in Maintenance Mode, the array is Started as usual; however, the array disks and cache disk (if present) are not Mounted, and hence not exported either. The main purpose of Maintenance Mode is to permit you to run the reiserfsck program (or other file system check program) on each of the array disks or cache disk.

Parity-Check

When the array is Started and parity is already valid, there is a button labeled Check which will initiate a background Parity-Check operation. Parity-Check will march through all data disks in parallel, computing parity and checking it against stored parity on the parity disk. Mismatches between computed parity and stored parity are called sync errors. During a Parity-Check the number of sync errors encountered is displayed and the first 100 sync errors are logged in the system log.

Next to the Check button is a check box labeled "Correct any Parity-Sync errors by writing the Parity disk with corrected parity". The default setting is not checked which means that any sync errors encountered are not corrected - their existence is simply counted and logged in the system log. If you check this box and then click Check, any sync errors encountered will be counted, logged, and corrected by writing the parity disk with correct parity.

Note: Be sure to understand the difference between a sync error and a normal uncorrectable read error. A sync error occurs when all data is successfully read, but there is a parity mismatch. The most common cause of sync errors is a power failure or system reset while actively writing data. An uncorrectable read error, on the other hand, results when the hard drive can not recover data from the requested block. In this case, regardless of the "Correct any Parity-Sync errors" check box, the reconstructed data of the failed drive is always re-written to the failed disk block.

Anytime the array is Started, if the system detects that a previous unsafe shutdown occurred, then it automatically initiates a non-correcting Parity-Check.

Other Operations

Operations possible whether array is Started or Stopped:

  • Spin Up
  • Spin Down

Operations possible only when the array is Started:

  • Clear Statistics

Operations possible only when the array is Stopped:

  • Identify - this reads from each disk for a few seconds in sequence starting with parity, then disk1, disk2, etc, finally ending with the cache disk. This is useful if you have disk activity LED's that blink during disk access, letting you visually identify each disk in your chassis.
  • Reboot
  • Power down