162306a36Sopenharmony_ciRAID arrays
262306a36Sopenharmony_ci===========
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciBoot time assembly of RAID arrays
562306a36Sopenharmony_ci---------------------------------
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciTools that manage md devices can be found at
862306a36Sopenharmony_ci   https://www.kernel.org/pub/linux/utils/raid/
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciYou can boot with your md device with the following kernel command
1262306a36Sopenharmony_cilines:
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_cifor old raid arrays without persistent superblocks::
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci  md=<md device no.>,<raid level>,<chunk size factor>,<fault level>,dev0,dev1,...,devn
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_cifor raid arrays with persistent superblocks::
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci  md=<md device no.>,dev0,dev1,...,devn
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_cior, to assemble a partitionable array::
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci  md=d<md device no.>,dev0,dev1,...,devn
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci``md device no.``
2762306a36Sopenharmony_ci+++++++++++++++++
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ciThe number of the md device
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci================= =========
3262306a36Sopenharmony_ci``md device no.`` device
3362306a36Sopenharmony_ci================= =========
3462306a36Sopenharmony_ci              0		md0
3562306a36Sopenharmony_ci	      1		md1
3662306a36Sopenharmony_ci	      2		md2
3762306a36Sopenharmony_ci	      3		md3
3862306a36Sopenharmony_ci	      4		md4
3962306a36Sopenharmony_ci================= =========
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci``raid level``
4262306a36Sopenharmony_ci++++++++++++++
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_cilevel of the RAID array
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci=============== =============
4762306a36Sopenharmony_ci``raid level``  level
4862306a36Sopenharmony_ci=============== =============
4962306a36Sopenharmony_ci-1		linear mode
5062306a36Sopenharmony_ci0		striped mode
5162306a36Sopenharmony_ci=============== =============
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ciother modes are only supported with persistent super blocks
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ci``chunk size factor``
5662306a36Sopenharmony_ci+++++++++++++++++++++
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci(raid-0 and raid-1 only)
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ciSet  the chunk size as 4k << n.
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ci``fault level``
6362306a36Sopenharmony_ci+++++++++++++++
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ciTotally ignored
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci``dev0`` to ``devn``
6862306a36Sopenharmony_ci++++++++++++++++++++
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_cie.g. ``/dev/hda1``, ``/dev/hdc1``, ``/dev/sda1``, ``/dev/sdb1``
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ciA possible loadlin line (Harald Hoyer <HarryH@Royal.Net>)  looks like this::
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_ci	e:\loadlin\loadlin e:\zimage root=/dev/md0 md=0,0,4,0,/dev/hdb2,/dev/hdc3 ro
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ciBoot time autodetection of RAID arrays
7862306a36Sopenharmony_ci--------------------------------------
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ciWhen md is compiled into the kernel (not as module), partitions of
8162306a36Sopenharmony_citype 0xfd are scanned and automatically assembled into RAID arrays.
8262306a36Sopenharmony_ciThis autodetection may be suppressed with the kernel parameter
8362306a36Sopenharmony_ci``raid=noautodetect``.  As of kernel 2.6.9, only drives with a type 0
8462306a36Sopenharmony_cisuperblock can be autodetected and run at boot time.
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ciThe kernel parameter ``raid=partitionable`` (or ``raid=part``) means
8762306a36Sopenharmony_cithat all auto-detected arrays are assembled as partitionable.
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ciBoot time assembly of degraded/dirty arrays
9062306a36Sopenharmony_ci-------------------------------------------
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ciIf a raid5 or raid6 array is both dirty and degraded, it could have
9362306a36Sopenharmony_ciundetectable data corruption.  This is because the fact that it is
9462306a36Sopenharmony_ci``dirty`` means that the parity cannot be trusted, and the fact that it
9562306a36Sopenharmony_ciis degraded means that some datablocks are missing and cannot reliably
9662306a36Sopenharmony_cibe reconstructed (due to no parity).
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ciFor this reason, md will normally refuse to start such an array.  This
9962306a36Sopenharmony_cirequires the sysadmin to take action to explicitly start the array
10062306a36Sopenharmony_cidespite possible corruption.  This is normally done with::
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci   mdadm --assemble --force ....
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ciThis option is not really available if the array has the root
10562306a36Sopenharmony_cifilesystem on it.  In order to support this booting from such an
10662306a36Sopenharmony_ciarray, md supports a module parameter ``start_dirty_degraded`` which,
10762306a36Sopenharmony_ciwhen set to 1, bypassed the checks and will allows dirty degraded
10862306a36Sopenharmony_ciarrays to be started.
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ciSo, to boot with a root filesystem of a dirty degraded raid 5 or 6, use::
11162306a36Sopenharmony_ci
11262306a36Sopenharmony_ci   md-mod.start_dirty_degraded=1
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ciSuperblock formats
11662306a36Sopenharmony_ci------------------
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ciThe md driver can support a variety of different superblock formats.
11962306a36Sopenharmony_ciCurrently, it supports superblock formats ``0.90.0`` and the ``md-1`` format
12062306a36Sopenharmony_ciintroduced in the 2.5 development series.
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ciThe kernel will autodetect which format superblock is being used.
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ciSuperblock format ``0`` is treated differently to others for legacy
12562306a36Sopenharmony_cireasons - it is the original superblock format.
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ciGeneral Rules - apply for all superblock formats
12962306a36Sopenharmony_ci------------------------------------------------
13062306a36Sopenharmony_ci
13162306a36Sopenharmony_ciAn array is ``created`` by writing appropriate superblocks to all
13262306a36Sopenharmony_cidevices.
13362306a36Sopenharmony_ci
13462306a36Sopenharmony_ciIt is ``assembled`` by associating each of these devices with an
13562306a36Sopenharmony_ciparticular md virtual device.  Once it is completely assembled, it can
13662306a36Sopenharmony_cibe accessed.
13762306a36Sopenharmony_ci
13862306a36Sopenharmony_ciAn array should be created by a user-space tool.  This will write
13962306a36Sopenharmony_cisuperblocks to all devices.  It will usually mark the array as
14062306a36Sopenharmony_ci``unclean``, or with some devices missing so that the kernel md driver
14162306a36Sopenharmony_cican create appropriate redundancy (copying in raid 1, parity
14262306a36Sopenharmony_cicalculation in raid 4/5).
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ciWhen an array is assembled, it is first initialized with the
14562306a36Sopenharmony_ciSET_ARRAY_INFO ioctl.  This contains, in particular, a major and minor
14662306a36Sopenharmony_civersion number.  The major version number selects which superblock
14762306a36Sopenharmony_ciformat is to be used.  The minor number might be used to tune handling
14862306a36Sopenharmony_ciof the format, such as suggesting where on each device to look for the
14962306a36Sopenharmony_cisuperblock.
15062306a36Sopenharmony_ci
15162306a36Sopenharmony_ciThen each device is added using the ADD_NEW_DISK ioctl.  This
15262306a36Sopenharmony_ciprovides, in particular, a major and minor number identifying the
15362306a36Sopenharmony_cidevice to add.
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ciThe array is started with the RUN_ARRAY ioctl.
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_ciOnce started, new devices can be added.  They should have an
15862306a36Sopenharmony_ciappropriate superblock written to them, and then be passed in with
15962306a36Sopenharmony_ciADD_NEW_DISK.
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_ciDevices that have failed or are not yet active can be detached from an
16262306a36Sopenharmony_ciarray using HOT_REMOVE_DISK.
16362306a36Sopenharmony_ci
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ciSpecific Rules that apply to format-0 super block arrays, and arrays with no superblock (non-persistent)
16662306a36Sopenharmony_ci--------------------------------------------------------------------------------------------------------
16762306a36Sopenharmony_ci
16862306a36Sopenharmony_ciAn array can be ``created`` by describing the array (level, chunksize
16962306a36Sopenharmony_cietc) in a SET_ARRAY_INFO ioctl.  This must have ``major_version==0`` and
17062306a36Sopenharmony_ci``raid_disks != 0``.
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ciThen uninitialized devices can be added with ADD_NEW_DISK.  The
17362306a36Sopenharmony_cistructure passed to ADD_NEW_DISK must specify the state of the device
17462306a36Sopenharmony_ciand its role in the array.
17562306a36Sopenharmony_ci
17662306a36Sopenharmony_ciOnce started with RUN_ARRAY, uninitialized spares can be added with
17762306a36Sopenharmony_ciHOT_ADD_DISK.
17862306a36Sopenharmony_ci
17962306a36Sopenharmony_ci
18062306a36Sopenharmony_ciMD devices in sysfs
18162306a36Sopenharmony_ci-------------------
18262306a36Sopenharmony_ci
18362306a36Sopenharmony_cimd devices appear in sysfs (``/sys``) as regular block devices,
18462306a36Sopenharmony_cie.g.::
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ci   /sys/block/md0
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ciEach ``md`` device will contain a subdirectory called ``md`` which
18962306a36Sopenharmony_cicontains further md-specific information about the device.
19062306a36Sopenharmony_ci
19162306a36Sopenharmony_ciAll md devices contain:
19262306a36Sopenharmony_ci
19362306a36Sopenharmony_ci  level
19462306a36Sopenharmony_ci     a text file indicating the ``raid level``. e.g. raid0, raid1,
19562306a36Sopenharmony_ci     raid5, linear, multipath, faulty.
19662306a36Sopenharmony_ci     If no raid level has been set yet (array is still being
19762306a36Sopenharmony_ci     assembled), the value will reflect whatever has been written
19862306a36Sopenharmony_ci     to it, which may be a name like the above, or may be a number
19962306a36Sopenharmony_ci     such as ``0``, ``5``, etc.
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ci  raid_disks
20262306a36Sopenharmony_ci     a text file with a simple number indicating the number of devices
20362306a36Sopenharmony_ci     in a fully functional array.  If this is not yet known, the file
20462306a36Sopenharmony_ci     will be empty.  If an array is being resized this will contain
20562306a36Sopenharmony_ci     the new number of devices.
20662306a36Sopenharmony_ci     Some raid levels allow this value to be set while the array is
20762306a36Sopenharmony_ci     active.  This will reconfigure the array.   Otherwise it can only
20862306a36Sopenharmony_ci     be set while assembling an array.
20962306a36Sopenharmony_ci     A change to this attribute will not be permitted if it would
21062306a36Sopenharmony_ci     reduce the size of the array.  To reduce the number of drives
21162306a36Sopenharmony_ci     in an e.g. raid5, the array size must first be reduced by
21262306a36Sopenharmony_ci     setting the ``array_size`` attribute.
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci  chunk_size
21562306a36Sopenharmony_ci     This is the size in bytes for ``chunks`` and is only relevant to
21662306a36Sopenharmony_ci     raid levels that involve striping (0,4,5,6,10). The address space
21762306a36Sopenharmony_ci     of the array is conceptually divided into chunks and consecutive
21862306a36Sopenharmony_ci     chunks are striped onto neighbouring devices.
21962306a36Sopenharmony_ci     The size should be at least PAGE_SIZE (4k) and should be a power
22062306a36Sopenharmony_ci     of 2.  This can only be set while assembling an array
22162306a36Sopenharmony_ci
22262306a36Sopenharmony_ci  layout
22362306a36Sopenharmony_ci     The ``layout`` for the array for the particular level.  This is
22462306a36Sopenharmony_ci     simply a number that is interpreted differently by different
22562306a36Sopenharmony_ci     levels.  It can be written while assembling an array.
22662306a36Sopenharmony_ci
22762306a36Sopenharmony_ci  array_size
22862306a36Sopenharmony_ci     This can be used to artificially constrain the available space in
22962306a36Sopenharmony_ci     the array to be less than is actually available on the combined
23062306a36Sopenharmony_ci     devices.  Writing a number (in Kilobytes) which is less than
23162306a36Sopenharmony_ci     the available size will set the size.  Any reconfiguration of the
23262306a36Sopenharmony_ci     array (e.g. adding devices) will not cause the size to change.
23362306a36Sopenharmony_ci     Writing the word ``default`` will cause the effective size of the
23462306a36Sopenharmony_ci     array to be whatever size is actually available based on
23562306a36Sopenharmony_ci     ``level``, ``chunk_size`` and ``component_size``.
23662306a36Sopenharmony_ci
23762306a36Sopenharmony_ci     This can be used to reduce the size of the array before reducing
23862306a36Sopenharmony_ci     the number of devices in a raid4/5/6, or to support external
23962306a36Sopenharmony_ci     metadata formats which mandate such clipping.
24062306a36Sopenharmony_ci
24162306a36Sopenharmony_ci  reshape_position
24262306a36Sopenharmony_ci     This is either ``none`` or a sector number within the devices of
24362306a36Sopenharmony_ci     the array where ``reshape`` is up to.  If this is set, the three
24462306a36Sopenharmony_ci     attributes mentioned above (raid_disks, chunk_size, layout) can
24562306a36Sopenharmony_ci     potentially have 2 values, an old and a new value.  If these
24662306a36Sopenharmony_ci     values differ, reading the attribute returns::
24762306a36Sopenharmony_ci
24862306a36Sopenharmony_ci        new (old)
24962306a36Sopenharmony_ci
25062306a36Sopenharmony_ci     and writing will effect the ``new`` value, leaving the ``old``
25162306a36Sopenharmony_ci     unchanged.
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_ci  component_size
25462306a36Sopenharmony_ci     For arrays with data redundancy (i.e. not raid0, linear, faulty,
25562306a36Sopenharmony_ci     multipath), all components must be the same size - or at least
25662306a36Sopenharmony_ci     there must a size that they all provide space for.  This is a key
25762306a36Sopenharmony_ci     part or the geometry of the array.  It is measured in sectors
25862306a36Sopenharmony_ci     and can be read from here.  Writing to this value may resize
25962306a36Sopenharmony_ci     the array if the personality supports it (raid1, raid5, raid6),
26062306a36Sopenharmony_ci     and if the component drives are large enough.
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_ci  metadata_version
26362306a36Sopenharmony_ci     This indicates the format that is being used to record metadata
26462306a36Sopenharmony_ci     about the array.  It can be 0.90 (traditional format), 1.0, 1.1,
26562306a36Sopenharmony_ci     1.2 (newer format in varying locations) or ``none`` indicating that
26662306a36Sopenharmony_ci     the kernel isn't managing metadata at all.
26762306a36Sopenharmony_ci     Alternately it can be ``external:`` followed by a string which
26862306a36Sopenharmony_ci     is set by user-space.  This indicates that metadata is managed
26962306a36Sopenharmony_ci     by a user-space program.  Any device failure or other event that
27062306a36Sopenharmony_ci     requires a metadata update will cause array activity to be
27162306a36Sopenharmony_ci     suspended until the event is acknowledged.
27262306a36Sopenharmony_ci
27362306a36Sopenharmony_ci  resync_start
27462306a36Sopenharmony_ci     The point at which resync should start.  If no resync is needed,
27562306a36Sopenharmony_ci     this will be a very large number (or ``none`` since 2.6.30-rc1).  At
27662306a36Sopenharmony_ci     array creation it will default to 0, though starting the array as
27762306a36Sopenharmony_ci     ``clean`` will set it much larger.
27862306a36Sopenharmony_ci
27962306a36Sopenharmony_ci  new_dev
28062306a36Sopenharmony_ci     This file can be written but not read.  The value written should
28162306a36Sopenharmony_ci     be a block device number as major:minor.  e.g. 8:0
28262306a36Sopenharmony_ci     This will cause that device to be attached to the array, if it is
28362306a36Sopenharmony_ci     available.  It will then appear at md/dev-XXX (depending on the
28462306a36Sopenharmony_ci     name of the device) and further configuration is then possible.
28562306a36Sopenharmony_ci
28662306a36Sopenharmony_ci  safe_mode_delay
28762306a36Sopenharmony_ci     When an md array has seen no write requests for a certain period
28862306a36Sopenharmony_ci     of time, it will be marked as ``clean``.  When another write
28962306a36Sopenharmony_ci     request arrives, the array is marked as ``dirty`` before the write
29062306a36Sopenharmony_ci     commences.  This is known as ``safe_mode``.
29162306a36Sopenharmony_ci     The ``certain period`` is controlled by this file which stores the
29262306a36Sopenharmony_ci     period as a number of seconds.  The default is 200msec (0.200).
29362306a36Sopenharmony_ci     Writing a value of 0 disables safemode.
29462306a36Sopenharmony_ci
29562306a36Sopenharmony_ci  array_state
29662306a36Sopenharmony_ci     This file contains a single word which describes the current
29762306a36Sopenharmony_ci     state of the array.  In many cases, the state can be set by
29862306a36Sopenharmony_ci     writing the word for the desired state, however some states
29962306a36Sopenharmony_ci     cannot be explicitly set, and some transitions are not allowed.
30062306a36Sopenharmony_ci
30162306a36Sopenharmony_ci     Select/poll works on this file.  All changes except between
30262306a36Sopenharmony_ci     Active_idle and active (which can be frequent and are not
30362306a36Sopenharmony_ci     very interesting) are notified.  active->active_idle is
30462306a36Sopenharmony_ci     reported if the metadata is externally managed.
30562306a36Sopenharmony_ci
30662306a36Sopenharmony_ci     clear
30762306a36Sopenharmony_ci         No devices, no size, no level
30862306a36Sopenharmony_ci
30962306a36Sopenharmony_ci         Writing is equivalent to STOP_ARRAY ioctl
31062306a36Sopenharmony_ci
31162306a36Sopenharmony_ci     inactive
31262306a36Sopenharmony_ci         May have some settings, but array is not active
31362306a36Sopenharmony_ci         all IO results in error
31462306a36Sopenharmony_ci
31562306a36Sopenharmony_ci         When written, doesn't tear down array, but just stops it
31662306a36Sopenharmony_ci
31762306a36Sopenharmony_ci     suspended (not supported yet)
31862306a36Sopenharmony_ci         All IO requests will block. The array can be reconfigured.
31962306a36Sopenharmony_ci
32062306a36Sopenharmony_ci         Writing this, if accepted, will block until array is quiescent
32162306a36Sopenharmony_ci
32262306a36Sopenharmony_ci     readonly
32362306a36Sopenharmony_ci         no resync can happen.  no superblocks get written.
32462306a36Sopenharmony_ci
32562306a36Sopenharmony_ci         Write requests fail
32662306a36Sopenharmony_ci
32762306a36Sopenharmony_ci     read-auto
32862306a36Sopenharmony_ci         like readonly, but behaves like ``clean`` on a write request.
32962306a36Sopenharmony_ci
33062306a36Sopenharmony_ci     clean
33162306a36Sopenharmony_ci         no pending writes, but otherwise active.
33262306a36Sopenharmony_ci
33362306a36Sopenharmony_ci         When written to inactive array, starts without resync
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_ci         If a write request arrives then
33662306a36Sopenharmony_ci         if metadata is known, mark ``dirty`` and switch to ``active``.
33762306a36Sopenharmony_ci         if not known, block and switch to write-pending
33862306a36Sopenharmony_ci
33962306a36Sopenharmony_ci         If written to an active array that has pending writes, then fails.
34062306a36Sopenharmony_ci     active
34162306a36Sopenharmony_ci         fully active: IO and resync can be happening.
34262306a36Sopenharmony_ci         When written to inactive array, starts with resync
34362306a36Sopenharmony_ci
34462306a36Sopenharmony_ci     write-pending
34562306a36Sopenharmony_ci         clean, but writes are blocked waiting for ``active`` to be written.
34662306a36Sopenharmony_ci
34762306a36Sopenharmony_ci     active-idle
34862306a36Sopenharmony_ci         like active, but no writes have been seen for a while (safe_mode_delay).
34962306a36Sopenharmony_ci
35062306a36Sopenharmony_ci  bitmap/location
35162306a36Sopenharmony_ci     This indicates where the write-intent bitmap for the array is
35262306a36Sopenharmony_ci     stored.
35362306a36Sopenharmony_ci
35462306a36Sopenharmony_ci     It can be one of ``none``, ``file`` or ``[+-]N``.
35562306a36Sopenharmony_ci     ``file`` may later be extended to ``file:/file/name``
35662306a36Sopenharmony_ci     ``[+-]N`` means that many sectors from the start of the metadata.
35762306a36Sopenharmony_ci
35862306a36Sopenharmony_ci     This is replicated on all devices.  For arrays with externally
35962306a36Sopenharmony_ci     managed metadata, the offset is from the beginning of the
36062306a36Sopenharmony_ci     device.
36162306a36Sopenharmony_ci
36262306a36Sopenharmony_ci  bitmap/chunksize
36362306a36Sopenharmony_ci     The size, in bytes, of the chunk which will be represented by a
36462306a36Sopenharmony_ci     single bit.  For RAID456, it is a portion of an individual
36562306a36Sopenharmony_ci     device. For RAID10, it is a portion of the array.  For RAID1, it
36662306a36Sopenharmony_ci     is both (they come to the same thing).
36762306a36Sopenharmony_ci
36862306a36Sopenharmony_ci  bitmap/time_base
36962306a36Sopenharmony_ci     The time, in seconds, between looking for bits in the bitmap to
37062306a36Sopenharmony_ci     be cleared. In the current implementation, a bit will be cleared
37162306a36Sopenharmony_ci     between 2 and 3 times ``time_base`` after all the covered blocks
37262306a36Sopenharmony_ci     are known to be in-sync.
37362306a36Sopenharmony_ci
37462306a36Sopenharmony_ci  bitmap/backlog
37562306a36Sopenharmony_ci     When write-mostly devices are active in a RAID1, write requests
37662306a36Sopenharmony_ci     to those devices proceed in the background - the filesystem (or
37762306a36Sopenharmony_ci     other user of the device) does not have to wait for them.
37862306a36Sopenharmony_ci     ``backlog`` sets a limit on the number of concurrent background
37962306a36Sopenharmony_ci     writes.  If there are more than this, new writes will by
38062306a36Sopenharmony_ci     synchronous.
38162306a36Sopenharmony_ci
38262306a36Sopenharmony_ci  bitmap/metadata
38362306a36Sopenharmony_ci     This can be either ``internal`` or ``external``.
38462306a36Sopenharmony_ci
38562306a36Sopenharmony_ci     ``internal``
38662306a36Sopenharmony_ci       is the default and means the metadata for the bitmap
38762306a36Sopenharmony_ci       is stored in the first 256 bytes of the allocated space and is
38862306a36Sopenharmony_ci       managed by the md module.
38962306a36Sopenharmony_ci
39062306a36Sopenharmony_ci     ``external``
39162306a36Sopenharmony_ci       means that bitmap metadata is managed externally to
39262306a36Sopenharmony_ci       the kernel (i.e. by some userspace program)
39362306a36Sopenharmony_ci
39462306a36Sopenharmony_ci  bitmap/can_clear
39562306a36Sopenharmony_ci     This is either ``true`` or ``false``.  If ``true``, then bits in the
39662306a36Sopenharmony_ci     bitmap will be cleared when the corresponding blocks are thought
39762306a36Sopenharmony_ci     to be in-sync.  If ``false``, bits will never be cleared.
39862306a36Sopenharmony_ci     This is automatically set to ``false`` if a write happens on a
39962306a36Sopenharmony_ci     degraded array, or if the array becomes degraded during a write.
40062306a36Sopenharmony_ci     When metadata is managed externally, it should be set to true
40162306a36Sopenharmony_ci     once the array becomes non-degraded, and this fact has been
40262306a36Sopenharmony_ci     recorded in the metadata.
40362306a36Sopenharmony_ci
40462306a36Sopenharmony_ci  consistency_policy
40562306a36Sopenharmony_ci     This indicates how the array maintains consistency in case of unexpected
40662306a36Sopenharmony_ci     shutdown. It can be:
40762306a36Sopenharmony_ci
40862306a36Sopenharmony_ci     none
40962306a36Sopenharmony_ci       Array has no redundancy information, e.g. raid0, linear.
41062306a36Sopenharmony_ci
41162306a36Sopenharmony_ci     resync
41262306a36Sopenharmony_ci       Full resync is performed and all redundancy is regenerated when the
41362306a36Sopenharmony_ci       array is started after unclean shutdown.
41462306a36Sopenharmony_ci
41562306a36Sopenharmony_ci     bitmap
41662306a36Sopenharmony_ci       Resync assisted by a write-intent bitmap.
41762306a36Sopenharmony_ci
41862306a36Sopenharmony_ci     journal
41962306a36Sopenharmony_ci       For raid4/5/6, journal device is used to log transactions and replay
42062306a36Sopenharmony_ci       after unclean shutdown.
42162306a36Sopenharmony_ci
42262306a36Sopenharmony_ci     ppl
42362306a36Sopenharmony_ci       For raid5 only, Partial Parity Log is used to close the write hole and
42462306a36Sopenharmony_ci       eliminate resync.
42562306a36Sopenharmony_ci
42662306a36Sopenharmony_ci     The accepted values when writing to this file are ``ppl`` and ``resync``,
42762306a36Sopenharmony_ci     used to enable and disable PPL.
42862306a36Sopenharmony_ci
42962306a36Sopenharmony_ci  uuid
43062306a36Sopenharmony_ci     This indicates the UUID of the array in the following format:
43162306a36Sopenharmony_ci     xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
43262306a36Sopenharmony_ci
43362306a36Sopenharmony_ci
43462306a36Sopenharmony_ciAs component devices are added to an md array, they appear in the ``md``
43562306a36Sopenharmony_cidirectory as new directories named::
43662306a36Sopenharmony_ci
43762306a36Sopenharmony_ci      dev-XXX
43862306a36Sopenharmony_ci
43962306a36Sopenharmony_ciwhere ``XXX`` is a name that the kernel knows for the device, e.g. hdb1.
44062306a36Sopenharmony_ciEach directory contains:
44162306a36Sopenharmony_ci
44262306a36Sopenharmony_ci      block
44362306a36Sopenharmony_ci        a symlink to the block device in /sys/block, e.g.::
44462306a36Sopenharmony_ci
44562306a36Sopenharmony_ci	     /sys/block/md0/md/dev-hdb1/block -> ../../../../block/hdb/hdb1
44662306a36Sopenharmony_ci
44762306a36Sopenharmony_ci      super
44862306a36Sopenharmony_ci        A file containing an image of the superblock read from, or
44962306a36Sopenharmony_ci        written to, that device.
45062306a36Sopenharmony_ci
45162306a36Sopenharmony_ci      state
45262306a36Sopenharmony_ci	A file recording the current state of the device in the array
45362306a36Sopenharmony_ci	which can be a comma separated list of:
45462306a36Sopenharmony_ci
45562306a36Sopenharmony_ci	      faulty
45662306a36Sopenharmony_ci			device has been kicked from active use due to
45762306a36Sopenharmony_ci			a detected fault, or it has unacknowledged bad
45862306a36Sopenharmony_ci			blocks
45962306a36Sopenharmony_ci
46062306a36Sopenharmony_ci	      in_sync
46162306a36Sopenharmony_ci			device is a fully in-sync member of the array
46262306a36Sopenharmony_ci
46362306a36Sopenharmony_ci	      writemostly
46462306a36Sopenharmony_ci			device will only be subject to read
46562306a36Sopenharmony_ci			requests if there are no other options.
46662306a36Sopenharmony_ci
46762306a36Sopenharmony_ci			This applies only to raid1 arrays.
46862306a36Sopenharmony_ci
46962306a36Sopenharmony_ci	      blocked
47062306a36Sopenharmony_ci			device has failed, and the failure hasn't been
47162306a36Sopenharmony_ci			acknowledged yet by the metadata handler.
47262306a36Sopenharmony_ci
47362306a36Sopenharmony_ci			Writes that would write to this device if
47462306a36Sopenharmony_ci			it were not faulty are blocked.
47562306a36Sopenharmony_ci
47662306a36Sopenharmony_ci	      spare
47762306a36Sopenharmony_ci			device is working, but not a full member.
47862306a36Sopenharmony_ci
47962306a36Sopenharmony_ci			This includes spares that are in the process
48062306a36Sopenharmony_ci			of being recovered to
48162306a36Sopenharmony_ci
48262306a36Sopenharmony_ci	      write_error
48362306a36Sopenharmony_ci			device has ever seen a write error.
48462306a36Sopenharmony_ci
48562306a36Sopenharmony_ci	      want_replacement
48662306a36Sopenharmony_ci			device is (mostly) working but probably
48762306a36Sopenharmony_ci			should be replaced, either due to errors or
48862306a36Sopenharmony_ci			due to user request.
48962306a36Sopenharmony_ci
49062306a36Sopenharmony_ci	      replacement
49162306a36Sopenharmony_ci			device is a replacement for another active
49262306a36Sopenharmony_ci			device with same raid_disk.
49362306a36Sopenharmony_ci
49462306a36Sopenharmony_ci
49562306a36Sopenharmony_ci	This list may grow in future.
49662306a36Sopenharmony_ci
49762306a36Sopenharmony_ci	This can be written to.
49862306a36Sopenharmony_ci
49962306a36Sopenharmony_ci	Writing ``faulty``  simulates a failure on the device.
50062306a36Sopenharmony_ci
50162306a36Sopenharmony_ci	Writing ``remove`` removes the device from the array.
50262306a36Sopenharmony_ci
50362306a36Sopenharmony_ci	Writing ``writemostly`` sets the writemostly flag.
50462306a36Sopenharmony_ci
50562306a36Sopenharmony_ci	Writing ``-writemostly`` clears the writemostly flag.
50662306a36Sopenharmony_ci
50762306a36Sopenharmony_ci	Writing ``blocked`` sets the ``blocked`` flag.
50862306a36Sopenharmony_ci
50962306a36Sopenharmony_ci	Writing ``-blocked`` clears the ``blocked`` flags and allows writes
51062306a36Sopenharmony_ci	to complete and possibly simulates an error.
51162306a36Sopenharmony_ci
51262306a36Sopenharmony_ci	Writing ``in_sync`` sets the in_sync flag.
51362306a36Sopenharmony_ci
51462306a36Sopenharmony_ci	Writing ``write_error`` sets writeerrorseen flag.
51562306a36Sopenharmony_ci
51662306a36Sopenharmony_ci	Writing ``-write_error`` clears writeerrorseen flag.
51762306a36Sopenharmony_ci
51862306a36Sopenharmony_ci	Writing ``want_replacement`` is allowed at any time except to a
51962306a36Sopenharmony_ci	replacement device or a spare.  It sets the flag.
52062306a36Sopenharmony_ci
52162306a36Sopenharmony_ci	Writing ``-want_replacement`` is allowed at any time.  It clears
52262306a36Sopenharmony_ci	the flag.
52362306a36Sopenharmony_ci
52462306a36Sopenharmony_ci	Writing ``replacement`` or ``-replacement`` is only allowed before
52562306a36Sopenharmony_ci	starting the array.  It sets or clears the flag.
52662306a36Sopenharmony_ci
52762306a36Sopenharmony_ci
52862306a36Sopenharmony_ci	This file responds to select/poll. Any change to ``faulty``
52962306a36Sopenharmony_ci	or ``blocked`` causes an event.
53062306a36Sopenharmony_ci
53162306a36Sopenharmony_ci      errors
53262306a36Sopenharmony_ci	An approximate count of read errors that have been detected on
53362306a36Sopenharmony_ci	this device but have not caused the device to be evicted from
53462306a36Sopenharmony_ci	the array (either because they were corrected or because they
53562306a36Sopenharmony_ci	happened while the array was read-only).  When using version-1
53662306a36Sopenharmony_ci	metadata, this value persists across restarts of the array.
53762306a36Sopenharmony_ci
53862306a36Sopenharmony_ci	This value can be written while assembling an array thus
53962306a36Sopenharmony_ci	providing an ongoing count for arrays with metadata managed by
54062306a36Sopenharmony_ci	userspace.
54162306a36Sopenharmony_ci
54262306a36Sopenharmony_ci      slot
54362306a36Sopenharmony_ci        This gives the role that the device has in the array.  It will
54462306a36Sopenharmony_ci	either be ``none`` if the device is not active in the array
54562306a36Sopenharmony_ci        (i.e. is a spare or has failed) or an integer less than the
54662306a36Sopenharmony_ci	``raid_disks`` number for the array indicating which position
54762306a36Sopenharmony_ci	it currently fills.  This can only be set while assembling an
54862306a36Sopenharmony_ci	array.  A device for which this is set is assumed to be working.
54962306a36Sopenharmony_ci
55062306a36Sopenharmony_ci      offset
55162306a36Sopenharmony_ci        This gives the location in the device (in sectors from the
55262306a36Sopenharmony_ci        start) where data from the array will be stored.  Any part of
55362306a36Sopenharmony_ci        the device before this offset is not touched, unless it is
55462306a36Sopenharmony_ci        used for storing metadata (Formats 1.1 and 1.2).
55562306a36Sopenharmony_ci
55662306a36Sopenharmony_ci      size
55762306a36Sopenharmony_ci        The amount of the device, after the offset, that can be used
55862306a36Sopenharmony_ci        for storage of data.  This will normally be the same as the
55962306a36Sopenharmony_ci	component_size.  This can be written while assembling an
56062306a36Sopenharmony_ci        array.  If a value less than the current component_size is
56162306a36Sopenharmony_ci        written, it will be rejected.
56262306a36Sopenharmony_ci
56362306a36Sopenharmony_ci      recovery_start
56462306a36Sopenharmony_ci        When the device is not ``in_sync``, this records the number of
56562306a36Sopenharmony_ci	sectors from the start of the device which are known to be
56662306a36Sopenharmony_ci	correct.  This is normally zero, but during a recovery
56762306a36Sopenharmony_ci	operation it will steadily increase, and if the recovery is
56862306a36Sopenharmony_ci	interrupted, restoring this value can cause recovery to
56962306a36Sopenharmony_ci	avoid repeating the earlier blocks.  With v1.x metadata, this
57062306a36Sopenharmony_ci	value is saved and restored automatically.
57162306a36Sopenharmony_ci
57262306a36Sopenharmony_ci	This can be set whenever the device is not an active member of
57362306a36Sopenharmony_ci	the array, either before the array is activated, or before
57462306a36Sopenharmony_ci	the ``slot`` is set.
57562306a36Sopenharmony_ci
57662306a36Sopenharmony_ci	Setting this to ``none`` is equivalent to setting ``in_sync``.
57762306a36Sopenharmony_ci	Setting to any other value also clears the ``in_sync`` flag.
57862306a36Sopenharmony_ci
57962306a36Sopenharmony_ci      bad_blocks
58062306a36Sopenharmony_ci	This gives the list of all known bad blocks in the form of
58162306a36Sopenharmony_ci	start address and length (in sectors respectively). If output
58262306a36Sopenharmony_ci	is too big to fit in a page, it will be truncated. Writing
58362306a36Sopenharmony_ci	``sector length`` to this file adds new acknowledged (i.e.
58462306a36Sopenharmony_ci	recorded to disk safely) bad blocks.
58562306a36Sopenharmony_ci
58662306a36Sopenharmony_ci      unacknowledged_bad_blocks
58762306a36Sopenharmony_ci	This gives the list of known-but-not-yet-saved-to-disk bad
58862306a36Sopenharmony_ci	blocks in the same form of ``bad_blocks``. If output is too big
58962306a36Sopenharmony_ci	to fit in a page, it will be truncated. Writing to this file
59062306a36Sopenharmony_ci	adds bad blocks without acknowledging them. This is largely
59162306a36Sopenharmony_ci	for testing.
59262306a36Sopenharmony_ci
59362306a36Sopenharmony_ci      ppl_sector, ppl_size
59462306a36Sopenharmony_ci        Location and size (in sectors) of the space used for Partial Parity Log
59562306a36Sopenharmony_ci        on this device.
59662306a36Sopenharmony_ci
59762306a36Sopenharmony_ci
59862306a36Sopenharmony_ciAn active md device will also contain an entry for each active device
59962306a36Sopenharmony_ciin the array.  These are named::
60062306a36Sopenharmony_ci
60162306a36Sopenharmony_ci    rdNN
60262306a36Sopenharmony_ci
60362306a36Sopenharmony_ciwhere ``NN`` is the position in the array, starting from 0.
60462306a36Sopenharmony_ciSo for a 3 drive array there will be rd0, rd1, rd2.
60562306a36Sopenharmony_ciThese are symbolic links to the appropriate ``dev-XXX`` entry.
60662306a36Sopenharmony_ciThus, for example::
60762306a36Sopenharmony_ci
60862306a36Sopenharmony_ci       cat /sys/block/md*/md/rd*/state
60962306a36Sopenharmony_ci
61062306a36Sopenharmony_ciwill show ``in_sync`` on every line.
61162306a36Sopenharmony_ci
61262306a36Sopenharmony_ci
61362306a36Sopenharmony_ci
61462306a36Sopenharmony_ciActive md devices for levels that support data redundancy (1,4,5,6,10)
61562306a36Sopenharmony_cialso have
61662306a36Sopenharmony_ci
61762306a36Sopenharmony_ci   sync_action
61862306a36Sopenharmony_ci     a text file that can be used to monitor and control the rebuild
61962306a36Sopenharmony_ci     process.  It contains one word which can be one of:
62062306a36Sopenharmony_ci
62162306a36Sopenharmony_ci       resync
62262306a36Sopenharmony_ci		redundancy is being recalculated after unclean
62362306a36Sopenharmony_ci                shutdown or creation
62462306a36Sopenharmony_ci
62562306a36Sopenharmony_ci       recover
62662306a36Sopenharmony_ci		a hot spare is being built to replace a
62762306a36Sopenharmony_ci		failed/missing device
62862306a36Sopenharmony_ci
62962306a36Sopenharmony_ci       idle
63062306a36Sopenharmony_ci		nothing is happening
63162306a36Sopenharmony_ci       check
63262306a36Sopenharmony_ci		A full check of redundancy was requested and is
63362306a36Sopenharmony_ci                happening.  This reads all blocks and checks
63462306a36Sopenharmony_ci                them. A repair may also happen for some raid
63562306a36Sopenharmony_ci                levels.
63662306a36Sopenharmony_ci
63762306a36Sopenharmony_ci       repair
63862306a36Sopenharmony_ci		A full check and repair is happening.  This is
63962306a36Sopenharmony_ci		similar to ``resync``, but was requested by the
64062306a36Sopenharmony_ci                user, and the write-intent bitmap is NOT used to
64162306a36Sopenharmony_ci		optimise the process.
64262306a36Sopenharmony_ci
64362306a36Sopenharmony_ci      This file is writable, and each of the strings that could be
64462306a36Sopenharmony_ci      read are meaningful for writing.
64562306a36Sopenharmony_ci
64662306a36Sopenharmony_ci	``idle`` will stop an active resync/recovery etc.  There is no
64762306a36Sopenharmony_ci	guarantee that another resync/recovery may not be automatically
64862306a36Sopenharmony_ci	started again, though some event will be needed to trigger
64962306a36Sopenharmony_ci	this.
65062306a36Sopenharmony_ci
65162306a36Sopenharmony_ci	``resync`` or ``recovery`` can be used to restart the
65262306a36Sopenharmony_ci        corresponding operation if it was stopped with ``idle``.
65362306a36Sopenharmony_ci
65462306a36Sopenharmony_ci	``check`` and ``repair`` will start the appropriate process
65562306a36Sopenharmony_ci	providing the current state is ``idle``.
65662306a36Sopenharmony_ci
65762306a36Sopenharmony_ci      This file responds to select/poll.  Any important change in the value
65862306a36Sopenharmony_ci      triggers a poll event.  Sometimes the value will briefly be
65962306a36Sopenharmony_ci      ``recover`` if a recovery seems to be needed, but cannot be
66062306a36Sopenharmony_ci      achieved. In that case, the transition to ``recover`` isn't
66162306a36Sopenharmony_ci      notified, but the transition away is.
66262306a36Sopenharmony_ci
66362306a36Sopenharmony_ci   degraded
66462306a36Sopenharmony_ci      This contains a count of the number of devices by which the
66562306a36Sopenharmony_ci      arrays is degraded.  So an optimal array will show ``0``.  A
66662306a36Sopenharmony_ci      single failed/missing drive will show ``1``, etc.
66762306a36Sopenharmony_ci
66862306a36Sopenharmony_ci      This file responds to select/poll, any increase or decrease
66962306a36Sopenharmony_ci      in the count of missing devices will trigger an event.
67062306a36Sopenharmony_ci
67162306a36Sopenharmony_ci   mismatch_count
67262306a36Sopenharmony_ci      When performing ``check`` and ``repair``, and possibly when
67362306a36Sopenharmony_ci      performing ``resync``, md will count the number of errors that are
67462306a36Sopenharmony_ci      found.  The count in ``mismatch_cnt`` is the number of sectors
67562306a36Sopenharmony_ci      that were re-written, or (for ``check``) would have been
67662306a36Sopenharmony_ci      re-written.  As most raid levels work in units of pages rather
67762306a36Sopenharmony_ci      than sectors, this may be larger than the number of actual errors
67862306a36Sopenharmony_ci      by a factor of the number of sectors in a page.
67962306a36Sopenharmony_ci
68062306a36Sopenharmony_ci   bitmap_set_bits
68162306a36Sopenharmony_ci      If the array has a write-intent bitmap, then writing to this
68262306a36Sopenharmony_ci      attribute can set bits in the bitmap, indicating that a resync
68362306a36Sopenharmony_ci      would need to check the corresponding blocks. Either individual
68462306a36Sopenharmony_ci      numbers or start-end pairs can be written.  Multiple numbers
68562306a36Sopenharmony_ci      can be separated by a space.
68662306a36Sopenharmony_ci
68762306a36Sopenharmony_ci      Note that the numbers are ``bit`` numbers, not ``block`` numbers.
68862306a36Sopenharmony_ci      They should be scaled by the bitmap_chunksize.
68962306a36Sopenharmony_ci
69062306a36Sopenharmony_ci   sync_speed_min, sync_speed_max
69162306a36Sopenharmony_ci     This are similar to ``/proc/sys/dev/raid/speed_limit_{min,max}``
69262306a36Sopenharmony_ci     however they only apply to the particular array.
69362306a36Sopenharmony_ci
69462306a36Sopenharmony_ci     If no value has been written to these, or if the word ``system``
69562306a36Sopenharmony_ci     is written, then the system-wide value is used.  If a value,
69662306a36Sopenharmony_ci     in kibibytes-per-second is written, then it is used.
69762306a36Sopenharmony_ci
69862306a36Sopenharmony_ci     When the files are read, they show the currently active value
69962306a36Sopenharmony_ci     followed by ``(local)`` or ``(system)`` depending on whether it is
70062306a36Sopenharmony_ci     a locally set or system-wide value.
70162306a36Sopenharmony_ci
70262306a36Sopenharmony_ci   sync_completed
70362306a36Sopenharmony_ci     This shows the number of sectors that have been completed of
70462306a36Sopenharmony_ci     whatever the current sync_action is, followed by the number of
70562306a36Sopenharmony_ci     sectors in total that could need to be processed.  The two
70662306a36Sopenharmony_ci     numbers are separated by a ``/``  thus effectively showing one
70762306a36Sopenharmony_ci     value, a fraction of the process that is complete.
70862306a36Sopenharmony_ci
70962306a36Sopenharmony_ci     A ``select`` on this attribute will return when resync completes,
71062306a36Sopenharmony_ci     when it reaches the current sync_max (below) and possibly at
71162306a36Sopenharmony_ci     other times.
71262306a36Sopenharmony_ci
71362306a36Sopenharmony_ci   sync_speed
71462306a36Sopenharmony_ci     This shows the current actual speed, in K/sec, of the current
71562306a36Sopenharmony_ci     sync_action.  It is averaged over the last 30 seconds.
71662306a36Sopenharmony_ci
71762306a36Sopenharmony_ci   suspend_lo, suspend_hi
71862306a36Sopenharmony_ci     The two values, given as numbers of sectors, indicate a range
71962306a36Sopenharmony_ci     within the array where IO will be blocked.  This is currently
72062306a36Sopenharmony_ci     only supported for raid4/5/6.
72162306a36Sopenharmony_ci
72262306a36Sopenharmony_ci   sync_min, sync_max
72362306a36Sopenharmony_ci     The two values, given as numbers of sectors, indicate a range
72462306a36Sopenharmony_ci     within the array where ``check``/``repair`` will operate. Must be
72562306a36Sopenharmony_ci     a multiple of chunk_size. When it reaches ``sync_max`` it will
72662306a36Sopenharmony_ci     pause, rather than complete.
72762306a36Sopenharmony_ci     You can use ``select`` or ``poll`` on ``sync_completed`` to wait for
72862306a36Sopenharmony_ci     that number to reach sync_max.  Then you can either increase
72962306a36Sopenharmony_ci     ``sync_max``, or can write ``idle`` to ``sync_action``.
73062306a36Sopenharmony_ci
73162306a36Sopenharmony_ci     The value of ``max`` for ``sync_max`` effectively disables the limit.
73262306a36Sopenharmony_ci     When a resync is active, the value can only ever be increased,
73362306a36Sopenharmony_ci     never decreased.
73462306a36Sopenharmony_ci     The value of ``0`` is the minimum for ``sync_min``.
73562306a36Sopenharmony_ci
73662306a36Sopenharmony_ci
73762306a36Sopenharmony_ci
73862306a36Sopenharmony_ciEach active md device may also have attributes specific to the
73962306a36Sopenharmony_cipersonality module that manages it.
74062306a36Sopenharmony_ciThese are specific to the implementation of the module and could
74162306a36Sopenharmony_cichange substantially if the implementation changes.
74262306a36Sopenharmony_ci
74362306a36Sopenharmony_ciThese currently include:
74462306a36Sopenharmony_ci
74562306a36Sopenharmony_ci  stripe_cache_size  (currently raid5 only)
74662306a36Sopenharmony_ci      number of entries in the stripe cache.  This is writable, but
74762306a36Sopenharmony_ci      there are upper and lower limits (32768, 17).  Default is 256.
74862306a36Sopenharmony_ci
74962306a36Sopenharmony_ci  strip_cache_active (currently raid5 only)
75062306a36Sopenharmony_ci      number of active entries in the stripe cache
75162306a36Sopenharmony_ci
75262306a36Sopenharmony_ci  preread_bypass_threshold (currently raid5 only)
75362306a36Sopenharmony_ci      number of times a stripe requiring preread will be bypassed by
75462306a36Sopenharmony_ci      a stripe that does not require preread.  For fairness defaults
75562306a36Sopenharmony_ci      to 1.  Setting this to 0 disables bypass accounting and
75662306a36Sopenharmony_ci      requires preread stripes to wait until all full-width stripe-
75762306a36Sopenharmony_ci      writes are complete.  Valid values are 0 to stripe_cache_size.
75862306a36Sopenharmony_ci
75962306a36Sopenharmony_ci  journal_mode (currently raid5 only)
76062306a36Sopenharmony_ci      The cache mode for raid5. raid5 could include an extra disk for
76162306a36Sopenharmony_ci      caching. The mode can be "write-throuth" and "write-back". The
76262306a36Sopenharmony_ci      default is "write-through".
76362306a36Sopenharmony_ci
76462306a36Sopenharmony_ci  ppl_write_hint
76562306a36Sopenharmony_ci      NVMe stream ID to be set for each PPL write request.
766