sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}(hhparenthuba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget"/translations/zh_CN/admin-guide/mdmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}(hhhh2ubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/zh_TW/admin-guide/mdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}(hhhhFubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/it_IT/admin-guide/mdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}(hhhhZubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ja_JP/admin-guide/mdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}(hhhhnubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/ko_KR/admin-guide/mdmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}(hhhhubah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget"/translations/sp_SP/admin-guide/mdmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(h RAID arraysh]h RAID arrays}(hhhhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh,,,,dev0,dev1,...,devnh]hTmd=,,,,dev0,dev1,...,devn}(hhhj5ubah}(h]h ]h"]h$]h&] xml:spacepreserveuh1j3hhhKhhhhubh)}(h-for raid arrays with persistent superblocks::h]h,for raid arrays with persistent superblocks:}(h,for raid arrays with persistent superblocks:hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj4)}(h%md=,dev0,dev1,...,devnh]h%md=,dev0,dev1,...,devn}(hhhjTubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhKhhhhubh)}(h'or, to assemble a partitionable array::h]h&or, to assemble a partitionable array:}(h&or, to assemble a partitionable array:hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubj4)}(h&md=d,dev0,dev1,...,devnh]h&md=d,dev0,dev1,...,devn}(hhhjqubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhKhhhhubh)}(hhh](h)}(h``md device no.``h]hliteral)}(hjh]h md device no.}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hThe number of the md deviceh]hThe number of the md device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(h``md device no.``h]j)}(hjh]h md device no.}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hdeviceh]hdevice}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(h0h]h0}(hj%hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hmd0h]hmd0}(hj<hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hj7ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h1h]h1}(hj\hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjWubah}(h]h ]h"]h$]h&]uh1jhjTubj)}(hhh]h)}(hmd1h]hmd1}(hjshjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjnubah}(h]h ]h"]h$]h&]uh1jhjTubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h2h]h2}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hmd2h]hmd2}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h3h]h3}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hmd3h]hmd3}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h4h]h4}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hmd4h]hmd4}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] md-device-noah ]h"] md device no.ah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h``raid level``h]j)}(hjPh]h raid level}(hhhjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1hhjKhhhhhK*ubh)}(hlevel of the RAID arrayh]hlevel of the RAID array}(hjghjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjKhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjvubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhjvubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h``raid level``h]j)}(hjh]h raid level}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hlevelh]hlevel}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjvubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h-1h]h-1}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h linear modeh]h linear mode}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hj%h]h0}(hj%hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h striped modeh]h striped mode}(hj.hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hj)ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjvubeh}(h]h ]h"]h$]h&]colsKuh1jhjsubah}(h]h ]h"]h$]h&]uh1jhjKhhhhhNubh)}(h;other modes are only supported with persistent super blocksh]h;other modes are only supported with persistent super blocks}(hj[hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjKhhubeh}(h] raid-levelah ]h"] raid levelah$]h&]uh1hhhhhhhhK*ubh)}(hhh](h)}(h``chunk size factor``h]j)}(hjth]hchunk size factor}(hhhjvhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1hhjohhhhhK8ubh)}(h(raid-0 and raid-1 only)h]h(raid-0 and raid-1 only)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjohhubh)}(hSet the chunk size as 4k << n.h]hSet the chunk size as 4k << n.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK) looks like this::h](h'A possible loadlin line (Harald Hoyer <}(h'A possible loadlin line (Harald Hoyer ) looks like this:}(h>) looks like this:hj`hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKHhjhhubj4)}(hLe:\loadlin\loadlin e:\zimage root=/dev/md0 md=0,0,4,0,/dev/hdb2,/dev/hdc3 roh]hLe:\loadlin\loadlin e:\zimage root=/dev/md0 md=0,0,4,0,/dev/hdb2,/dev/hdc3 ro}(hhhjubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhKJhjhhubeh}(h] dev0-to-devnah ]h"] dev0 to devnah$]h&]uh1hhhhhhhhKDubeh}(h]!boot-time-assembly-of-raid-arraysah ]h"]!boot time assembly of raid arraysah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h&Boot time autodetection of RAID arraysh]h&Boot time autodetection of RAID arrays}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKNubh)}(hX@When md is compiled into the kernel (not as module), partitions of type 0xfd are scanned and automatically assembled into RAID arrays. This autodetection may be suppressed with the kernel parameter ``raid=noautodetect``. As of kernel 2.6.9, only drives with a type 0 superblock can be autodetected and run at boot time.h](hWhen md is compiled into the kernel (not as module), partitions of type 0xfd are scanned and automatically assembled into RAID arrays. This autodetection may be suppressed with the kernel parameter }(hWhen md is compiled into the kernel (not as module), partitions of type 0xfd are scanned and automatically assembled into RAID arrays. This autodetection may be suppressed with the kernel parameter hjhhhNhNubj)}(h``raid=noautodetect``h]hraid=noautodetect}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhe. As of kernel 2.6.9, only drives with a type 0 superblock can be autodetected and run at boot time.}(he. As of kernel 2.6.9, only drives with a type 0 superblock can be autodetected and run at boot time.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKPhjhhubh)}(hThe kernel parameter ``raid=partitionable`` (or ``raid=part``) means that all auto-detected arrays are assembled as partitionable.h](hThe kernel parameter }(hThe kernel parameter hjhhhNhNubj)}(h``raid=partitionable``h]hraid=partitionable}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (or }(h (or hjhhhNhNubj)}(h ``raid=part``h]h raid=part}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhE) means that all auto-detected arrays are assembled as partitionable.}(hE) means that all auto-detected arrays are assembled as partitionable.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKVhjhhubeh}(h]&boot-time-autodetection-of-raid-arraysah ]h"]&boot time autodetection of raid arraysah$]h&]uh1hhhhhhhhKNubh)}(hhh](h)}(h+Boot time assembly of degraded/dirty arraysh]h+Boot time assembly of degraded/dirty arrays}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKZubh)}(hX:If a raid5 or raid6 array is both dirty and degraded, it could have undetectable data corruption. This is because the fact that it is ``dirty`` means that the parity cannot be trusted, and the fact that it is degraded means that some datablocks are missing and cannot reliably be reconstructed (due to no parity).h](hIf a raid5 or raid6 array is both dirty and degraded, it could have undetectable data corruption. This is because the fact that it is }(hIf a raid5 or raid6 array is both dirty and degraded, it could have undetectable data corruption. This is because the fact that it is hj#hhhNhNubj)}(h ``dirty``h]hdirty}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh means that the parity cannot be trusted, and the fact that it is degraded means that some datablocks are missing and cannot reliably be reconstructed (due to no parity).}(h means that the parity cannot be trusted, and the fact that it is degraded means that some datablocks are missing and cannot reliably be reconstructed (due to no parity).hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK\hjhhubh)}(hFor this reason, md will normally refuse to start such an array. This requires the sysadmin to take action to explicitly start the array despite possible corruption. This is normally done with::h]hFor this reason, md will normally refuse to start such an array. This requires the sysadmin to take action to explicitly start the array despite possible corruption. This is normally done with:}(hFor this reason, md will normally refuse to start such an array. This requires the sysadmin to take action to explicitly start the array despite possible corruption. This is normally done with:hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjhhubj4)}(hmdadm --assemble --force ....h]hmdadm --assemble --force ....}(hhhjTubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhKfhjhhubh)}(hXThis option is not really available if the array has the root filesystem on it. In order to support this booting from such an array, md supports a module parameter ``start_dirty_degraded`` which, when set to 1, bypassed the checks and will allows dirty degraded arrays to be started.h](hThis option is not really available if the array has the root filesystem on it. In order to support this booting from such an array, md supports a module parameter }(hThis option is not really available if the array has the root filesystem on it. In order to support this booting from such an array, md supports a module parameter hjbhhhNhNubj)}(h``start_dirty_degraded``h]hstart_dirty_degraded}(hhhjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubh_ which, when set to 1, bypassed the checks and will allows dirty degraded arrays to be started.}(h_ which, when set to 1, bypassed the checks and will allows dirty degraded arrays to be started.hjbhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhjhhubh)}(hISo, to boot with a root filesystem of a dirty degraded raid 5 or 6, use::h]hHSo, to boot with a root filesystem of a dirty degraded raid 5 or 6, use:}(hHSo, to boot with a root filesystem of a dirty degraded raid 5 or 6, use:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhjhhubj4)}(hmd-mod.start_dirty_degraded=1h]hmd-mod.start_dirty_degraded=1}(hhhjubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhKphjhhubeh}(h]+boot-time-assembly-of-degraded-dirty-arraysah ]h"]+boot time assembly of degraded/dirty arraysah$]h&]uh1hhhhhhhhKZubh)}(hhh](h)}(hSuperblock formatsh]hSuperblock formats}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKtubh)}(hThe md driver can support a variety of different superblock formats. Currently, it supports superblock formats ``0.90.0`` and the ``md-1`` format introduced in the 2.5 development series.h](hoThe md driver can support a variety of different superblock formats. Currently, it supports superblock formats }(hoThe md driver can support a variety of different superblock formats. Currently, it supports superblock formats hjhhhNhNubj)}(h ``0.90.0``h]h0.90.0}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and the }(h and the hjhhhNhNubj)}(h``md-1``h]hmd-1}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh1 format introduced in the 2.5 development series.}(h1 format introduced in the 2.5 development series.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKvhjhhubh)}(hAThe kernel will autodetect which format superblock is being used.h]hAThe kernel will autodetect which format superblock is being used.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjhhubh)}(hsSuperblock format ``0`` is treated differently to others for legacy reasons - it is the original superblock format.h](hSuperblock format }(hSuperblock format hjhhhNhNubj)}(h``0``h]h0}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh\ is treated differently to others for legacy reasons - it is the original superblock format.}(h\ is treated differently to others for legacy reasons - it is the original superblock format.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK|hjhhubeh}(h]superblock-formatsah ]h"]superblock formatsah$]h&]uh1hhhhhhhhKtubh)}(hhh](h)}(h0General Rules - apply for all superblock formatsh]h0General Rules - apply for all superblock formats}(hj,hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj'hhhhhKubh)}(hJAn array is ``created`` by writing appropriate superblocks to all devices.h](h An array is }(h An array is hj8hhhNhNubj)}(h ``created``h]hcreated}(hhhjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh3 by writing appropriate superblocks to all devices.}(h3 by writing appropriate superblocks to all devices.hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubh)}(hIt is ``assembled`` by associating each of these devices with an particular md virtual device. Once it is completely assembled, it can be accessed.h](hIt is }(hIt is hjZhhhNhNubj)}(h ``assembled``h]h assembled}(hhhjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZubh by associating each of these devices with an particular md virtual device. Once it is completely assembled, it can be accessed.}(h by associating each of these devices with an particular md virtual device. Once it is completely assembled, it can be accessed.hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubh)}(hXAn array should be created by a user-space tool. This will write superblocks to all devices. It will usually mark the array as ``unclean``, or with some devices missing so that the kernel md driver can create appropriate redundancy (copying in raid 1, parity calculation in raid 4/5).h](hAn array should be created by a user-space tool. This will write superblocks to all devices. It will usually mark the array as }(hAn array should be created by a user-space tool. This will write superblocks to all devices. It will usually mark the array as hj|hhhNhNubj)}(h ``unclean``h]hunclean}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj|ubh, or with some devices missing so that the kernel md driver can create appropriate redundancy (copying in raid 1, parity calculation in raid 4/5).}(h, or with some devices missing so that the kernel md driver can create appropriate redundancy (copying in raid 1, parity calculation in raid 4/5).hj|hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubh)}(hX`When an array is assembled, it is first initialized with the SET_ARRAY_INFO ioctl. This contains, in particular, a major and minor version number. The major version number selects which superblock format is to be used. The minor number might be used to tune handling of the format, such as suggesting where on each device to look for the superblock.h]hX`When an array is assembled, it is first initialized with the SET_ARRAY_INFO ioctl. This contains, in particular, a major and minor version number. The major version number selects which superblock format is to be used. The minor number might be used to tune handling of the format, such as suggesting where on each device to look for the superblock.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubh)}(hThen each device is added using the ADD_NEW_DISK ioctl. This provides, in particular, a major and minor number identifying the device to add.h]hThen each device is added using the ADD_NEW_DISK ioctl. This provides, in particular, a major and minor number identifying the device to add.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubh)}(h.The array is started with the RUN_ARRAY ioctl.h]h.The array is started with the RUN_ARRAY ioctl.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubh)}(hOnce started, new devices can be added. They should have an appropriate superblock written to them, and then be passed in with ADD_NEW_DISK.h]hOnce started, new devices can be added. They should have an appropriate superblock written to them, and then be passed in with ADD_NEW_DISK.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubh)}(hcDevices that have failed or are not yet active can be detached from an array using HOT_REMOVE_DISK.h]hcDevices that have failed or are not yet active can be detached from an array using HOT_REMOVE_DISK.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj'hhubeh}(h].general-rules-apply-for-all-superblock-formatsah ]h"]0general rules - apply for all superblock formatsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hhSpecific Rules that apply to format-0 super block arrays, and arrays with no superblock (non-persistent)h]hhSpecific Rules that apply to format-0 super block arrays, and arrays with no superblock (non-persistent)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hAn array can be ``created`` by describing the array (level, chunksize etc) in a SET_ARRAY_INFO ioctl. This must have ``major_version==0`` and ``raid_disks != 0``.h](hAn array can be }(hAn array can be hjhhhNhNubj)}(h ``created``h]hcreated}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh[ by describing the array (level, chunksize etc) in a SET_ARRAY_INFO ioctl. This must have }(h[ by describing the array (level, chunksize etc) in a SET_ARRAY_INFO ioctl. This must have hjhhhNhNubj)}(h``major_version==0``h]hmajor_version==0}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(h and hjhhhNhNubj)}(h``raid_disks != 0``h]hraid_disks != 0}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(h.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThen uninitialized devices can be added with ADD_NEW_DISK. The structure passed to ADD_NEW_DISK must specify the state of the device and its role in the array.h]hThen uninitialized devices can be added with ADD_NEW_DISK. The structure passed to ADD_NEW_DISK must specify the state of the device and its role in the array.}(hjGhjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hQOnce started with RUN_ARRAY, uninitialized spares can be added with HOT_ADD_DISK.h]hQOnce started with RUN_ARRAY, uninitialized spares can be added with HOT_ADD_DISK.}(hjUhjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]especific-rules-that-apply-to-format-0-super-block-arrays-and-arrays-with-no-superblock-non-persistentah ]h"]hspecific rules that apply to format-0 super block arrays, and arrays with no superblock (non-persistent)ah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hMD devices in sysfsh]hMD devices in sysfs}(hjnhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjihhhhhKubh)}(hFmd devices appear in sysfs (``/sys``) as regular block devices, e.g.::h](hmd devices appear in sysfs (}(hmd devices appear in sysfs (hjzhhhNhNubj)}(h``/sys``h]h/sys}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh!) as regular block devices, e.g.:}(h!) as regular block devices, e.g.:hjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjihhubj4)}(h/sys/block/md0h]h/sys/block/md0}(hhhjubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhKhjihhubh)}(h}Each ``md`` device will contain a subdirectory called ``md`` which contains further md-specific information about the device.h](hEach }(hEach hjhhhNhNubj)}(h``md``h]hmd}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh+ device will contain a subdirectory called }(h+ device will contain a subdirectory called hjhhhNhNubj)}(h``md``h]hmd}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhA which contains further md-specific information about the device.}(hA which contains further md-specific information about the device.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjihhubh)}(hAll md devices contain:h]hAll md devices contain:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjihhubh block_quote)}(hhh]h)}(hhh](h)}(hX4level a text file indicating the ``raid level``. e.g. raid0, raid1, raid5, linear, multipath, faulty. If no raid level has been set yet (array is still being assembled), the value will reflect whatever has been written to it, which may be a name like the above, or may be a number such as ``0``, ``5``, etc. h](h)}(hlevelh]hlevel}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hhh]h)}(hX-a text file indicating the ``raid level``. e.g. raid0, raid1, raid5, linear, multipath, faulty. If no raid level has been set yet (array is still being assembled), the value will reflect whatever has been written to it, which may be a name like the above, or may be a number such as ``0``, ``5``, etc.h](ha text file indicating the }(ha text file indicating the hj hhhNhNubj)}(h``raid level``h]h raid level}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh. e.g. raid0, raid1, raid5, linear, multipath, faulty. If no raid level has been set yet (array is still being assembled), the value will reflect whatever has been written to it, which may be a name like the above, or may be a number such as }(h. e.g. raid0, raid1, raid5, linear, multipath, faulty. If no raid level has been set yet (array is still being assembled), the value will reflect whatever has been written to it, which may be a name like the above, or may be a number such as hj hhhNhNubj)}(h``0``h]h0}(hhhj& hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, }(h, hj hhhNhNubj)}(h``5``h]h5}(hhhj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, etc.}(h, etc.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXfraid_disks a text file with a simple number indicating the number of devices in a fully functional array. If this is not yet known, the file will be empty. If an array is being resized this will contain the new number of devices. Some raid levels allow this value to be set while the array is active. This will reconfigure the array. Otherwise it can only be set while assembling an array. A change to this attribute will not be permitted if it would reduce the size of the array. To reduce the number of drives in an e.g. raid5, the array size must first be reduced by setting the ``array_size`` attribute. h](h)}(h raid_disksh]h raid_disks}(hjd hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj^ ubh)}(hhh]h)}(hXZa text file with a simple number indicating the number of devices in a fully functional array. If this is not yet known, the file will be empty. If an array is being resized this will contain the new number of devices. Some raid levels allow this value to be set while the array is active. This will reconfigure the array. Otherwise it can only be set while assembling an array. A change to this attribute will not be permitted if it would reduce the size of the array. To reduce the number of drives in an e.g. raid5, the array size must first be reduced by setting the ``array_size`` attribute.h](hXAa text file with a simple number indicating the number of devices in a fully functional array. If this is not yet known, the file will be empty. If an array is being resized this will contain the new number of devices. Some raid levels allow this value to be set while the array is active. This will reconfigure the array. Otherwise it can only be set while assembling an array. A change to this attribute will not be permitted if it would reduce the size of the array. To reduce the number of drives in an e.g. raid5, the array size must first be reduced by setting the }(hXAa text file with a simple number indicating the number of devices in a fully functional array. If this is not yet known, the file will be empty. If an array is being resized this will contain the new number of devices. Some raid levels allow this value to be set while the array is active. This will reconfigure the array. Otherwise it can only be set while assembling an array. A change to this attribute will not be permitted if it would reduce the size of the array. To reduce the number of drives in an e.g. raid5, the array size must first be reduced by setting the hjs hhhNhNubj)}(h``array_size``h]h array_size}(hhhj| hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjs ubh attribute.}(h attribute.hjs hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjp ubah}(h]h ]h"]h$]h&]uh1hhj^ ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXtchunk_size This is the size in bytes for ``chunks`` and is only relevant to raid levels that involve striping (0,4,5,6,10). The address space of the array is conceptually divided into chunks and consecutive chunks are striped onto neighbouring devices. The size should be at least PAGE_SIZE (4k) and should be a power of 2. This can only be set while assembling an array h](h)}(h chunk_sizeh]h chunk_size}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubh)}(hhh]h)}(hXhThis is the size in bytes for ``chunks`` and is only relevant to raid levels that involve striping (0,4,5,6,10). The address space of the array is conceptually divided into chunks and consecutive chunks are striped onto neighbouring devices. The size should be at least PAGE_SIZE (4k) and should be a power of 2. This can only be set while assembling an arrayh](hThis is the size in bytes for }(hThis is the size in bytes for hj hhhNhNubj)}(h ``chunks``h]hchunks}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhX@ and is only relevant to raid levels that involve striping (0,4,5,6,10). The address space of the array is conceptually divided into chunks and consecutive chunks are striped onto neighbouring devices. The size should be at least PAGE_SIZE (4k) and should be a power of 2. This can only be set while assembling an array}(hX@ and is only relevant to raid levels that involve striping (0,4,5,6,10). The address space of the array is conceptually divided into chunks and consecutive chunks are striped onto neighbouring devices. The size should be at least PAGE_SIZE (4k) and should be a power of 2. This can only be set while assembling an arrayhj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hlayout The ``layout`` for the array for the particular level. This is simply a number that is interpreted differently by different levels. It can be written while assembling an array. h](h)}(hlayouth]hlayout}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubh)}(hhh]h)}(hThe ``layout`` for the array for the particular level. This is simply a number that is interpreted differently by different levels. It can be written while assembling an array.h](hThe }(hThe hj hhhNhNubj)}(h ``layout``h]hlayout}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh for the array for the particular level. This is simply a number that is interpreted differently by different levels. It can be written while assembling an array.}(h for the array for the particular level. This is simply a number that is interpreted differently by different levels. It can be written while assembling an array.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXarray_size This can be used to artificially constrain the available space in the array to be less than is actually available on the combined devices. Writing a number (in Kilobytes) which is less than the available size will set the size. Any reconfiguration of the array (e.g. adding devices) will not cause the size to change. Writing the word ``default`` will cause the effective size of the array to be whatever size is actually available based on ``level``, ``chunk_size`` and ``component_size``. This can be used to reduce the size of the array before reducing the number of devices in a raid4/5/6, or to support external metadata formats which mandate such clipping. h](h)}(h array_sizeh]h array_size}(hj- hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj' ubh)}(hhh](h)}(hXThis can be used to artificially constrain the available space in the array to be less than is actually available on the combined devices. Writing a number (in Kilobytes) which is less than the available size will set the size. Any reconfiguration of the array (e.g. adding devices) will not cause the size to change. Writing the word ``default`` will cause the effective size of the array to be whatever size is actually available based on ``level``, ``chunk_size`` and ``component_size``.h](hXQThis can be used to artificially constrain the available space in the array to be less than is actually available on the combined devices. Writing a number (in Kilobytes) which is less than the available size will set the size. Any reconfiguration of the array (e.g. adding devices) will not cause the size to change. Writing the word }(hXQThis can be used to artificially constrain the available space in the array to be less than is actually available on the combined devices. Writing a number (in Kilobytes) which is less than the available size will set the size. Any reconfiguration of the array (e.g. adding devices) will not cause the size to change. Writing the word hj< hhhNhNubj)}(h ``default``h]hdefault}(hhhjE hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj< ubh_ will cause the effective size of the array to be whatever size is actually available based on }(h_ will cause the effective size of the array to be whatever size is actually available based on hj< hhhNhNubj)}(h ``level``h]hlevel}(hhhjX hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj< ubh, }(h, hj< hhhNhNubj)}(h``chunk_size``h]h chunk_size}(hhhjk hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj< ubh and }(h and hj< hhhNhNubj)}(h``component_size``h]hcomponent_size}(hhhj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj< ubh.}(hj>hj< hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj9 ubh)}(hThis can be used to reduce the size of the array before reducing the number of devices in a raid4/5/6, or to support external metadata formats which mandate such clipping.h]hThis can be used to reduce the size of the array before reducing the number of devices in a raid4/5/6, or to support external metadata formats which mandate such clipping.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj9 ubeh}(h]h ]h"]h$]h&]uh1hhj' ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXreshape_position This is either ``none`` or a sector number within the devices of the array where ``reshape`` is up to. If this is set, the three attributes mentioned above (raid_disks, chunk_size, layout) can potentially have 2 values, an old and a new value. If these values differ, reading the attribute returns:: new (old) and writing will effect the ``new`` value, leaving the ``old`` unchanged. h](h)}(hreshape_positionh]hreshape_position}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubh)}(hhh](h)}(hX-This is either ``none`` or a sector number within the devices of the array where ``reshape`` is up to. If this is set, the three attributes mentioned above (raid_disks, chunk_size, layout) can potentially have 2 values, an old and a new value. If these values differ, reading the attribute returns::h](hThis is either }(hThis is either hj hhhNhNubj)}(h``none``h]hnone}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh: or a sector number within the devices of the array where }(h: or a sector number within the devices of the array where hj hhhNhNubj)}(h ``reshape``h]hreshape}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh is up to. If this is set, the three attributes mentioned above (raid_disks, chunk_size, layout) can potentially have 2 values, an old and a new value. If these values differ, reading the attribute returns:}(h is up to. If this is set, the three attributes mentioned above (raid_disks, chunk_size, layout) can potentially have 2 values, an old and a new value. If these values differ, reading the attribute returns:hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubj4)}(h new (old)h]h new (old)}(hhhj ubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhKhj ubh)}(hIand writing will effect the ``new`` value, leaving the ``old`` unchanged.h](hand writing will effect the }(hand writing will effect the hj hhhNhNubj)}(h``new``h]hnew}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh value, leaving the }(h value, leaving the hj hhhNhNubj)}(h``old``h]hold}(hhhj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh unchanged.}(h unchanged.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubeh}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hXcomponent_size For arrays with data redundancy (i.e. not raid0, linear, faulty, multipath), all components must be the same size - or at least there must a size that they all provide space for. This is a key part or the geometry of the array. It is measured in sectors and can be read from here. Writing to this value may resize the array if the personality supports it (raid1, raid5, raid6), and if the component drives are large enough. h](h)}(hcomponent_sizeh]hcomponent_size}(hjO hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjI ubh)}(hhh]h)}(hXFor arrays with data redundancy (i.e. not raid0, linear, faulty, multipath), all components must be the same size - or at least there must a size that they all provide space for. This is a key part or the geometry of the array. It is measured in sectors and can be read from here. Writing to this value may resize the array if the personality supports it (raid1, raid5, raid6), and if the component drives are large enough.h]hXFor arrays with data redundancy (i.e. not raid0, linear, faulty, multipath), all components must be the same size - or at least there must a size that they all provide space for. This is a key part or the geometry of the array. It is measured in sectors and can be read from here. Writing to this value may resize the array if the personality supports it (raid1, raid5, raid6), and if the component drives are large enough.}(hj` hj^ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[ ubah}(h]h ]h"]h$]h&]uh1hhjI ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hX&metadata_version This indicates the format that is being used to record metadata about the array. It can be 0.90 (traditional format), 1.0, 1.1, 1.2 (newer format in varying locations) or ``none`` indicating that the kernel isn't managing metadata at all. Alternately it can be ``external:`` followed by a string which is set by user-space. This indicates that metadata is managed by a user-space program. Any device failure or other event that requires a metadata update will cause array activity to be suspended until the event is acknowledged. h](h)}(hmetadata_versionh]hmetadata_version}(hj~ hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjx ubh)}(hhh]h)}(hXThis indicates the format that is being used to record metadata about the array. It can be 0.90 (traditional format), 1.0, 1.1, 1.2 (newer format in varying locations) or ``none`` indicating that the kernel isn't managing metadata at all. Alternately it can be ``external:`` followed by a string which is set by user-space. This indicates that metadata is managed by a user-space program. Any device failure or other event that requires a metadata update will cause array activity to be suspended until the event is acknowledged.h](hThis indicates the format that is being used to record metadata about the array. It can be 0.90 (traditional format), 1.0, 1.1, 1.2 (newer format in varying locations) or }(hThis indicates the format that is being used to record metadata about the array. It can be 0.90 (traditional format), 1.0, 1.1, 1.2 (newer format in varying locations) or hj hhhNhNubj)}(h``none``h]hnone}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhT indicating that the kernel isn’t managing metadata at all. Alternately it can be }(hR indicating that the kernel isn't managing metadata at all. Alternately it can be hj hhhNhNubj)}(h ``external:``h]h external:}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhX followed by a string which is set by user-space. This indicates that metadata is managed by a user-space program. Any device failure or other event that requires a metadata update will cause array activity to be suspended until the event is acknowledged.}(hX followed by a string which is set by user-space. This indicates that metadata is managed by a user-space program. Any device failure or other event that requires a metadata update will cause array activity to be suspended until the event is acknowledged.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1hhjx ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hresync_start The point at which resync should start. If no resync is needed, this will be a very large number (or ``none`` since 2.6.30-rc1). At array creation it will default to 0, though starting the array as ``clean`` will set it much larger. h](h)}(h resync_starth]h resync_start}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hhh]h)}(hThe point at which resync should start. If no resync is needed, this will be a very large number (or ``none`` since 2.6.30-rc1). At array creation it will default to 0, though starting the array as ``clean`` will set it much larger.h](hfThe point at which resync should start. If no resync is needed, this will be a very large number (or }(hfThe point at which resync should start. If no resync is needed, this will be a very large number (or hj hhhNhNubj)}(h``none``h]hnone}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhZ since 2.6.30-rc1). At array creation it will default to 0, though starting the array as }(hZ since 2.6.30-rc1). At array creation it will default to 0, though starting the array as hj hhhNhNubj)}(h ``clean``h]hclean}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh will set it much larger.}(h will set it much larger.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hX>new_dev This file can be written but not read. The value written should be a block device number as major:minor. e.g. 8:0 This will cause that device to be attached to the array, if it is available. It will then appear at md/dev-XXX (depending on the name of the device) and further configuration is then possible. h](h)}(hnew_devh]hnew_dev}(hj* hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ ubh)}(hhh]h)}(hX5This file can be written but not read. The value written should be a block device number as major:minor. e.g. 8:0 This will cause that device to be attached to the array, if it is available. It will then appear at md/dev-XXX (depending on the name of the device) and further configuration is then possible.h]hX5This file can be written but not read. The value written should be a block device number as major:minor. e.g. 8:0 This will cause that device to be attached to the array, if it is available. It will then appear at md/dev-XXX (depending on the name of the device) and further configuration is then possible.}(hj; hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj6 ubah}(h]h ]h"]h$]h&]uh1hhj$ ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXsafe_mode_delay When an md array has seen no write requests for a certain period of time, it will be marked as ``clean``. When another write request arrives, the array is marked as ``dirty`` before the write commences. This is known as ``safe_mode``. The ``certain period`` is controlled by this file which stores the period as a number of seconds. The default is 200msec (0.200). Writing a value of 0 disables safemode. h](h)}(hsafe_mode_delayh]hsafe_mode_delay}(hjY hjW hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjS ubh)}(hhh]h)}(hXWhen an md array has seen no write requests for a certain period of time, it will be marked as ``clean``. When another write request arrives, the array is marked as ``dirty`` before the write commences. This is known as ``safe_mode``. The ``certain period`` is controlled by this file which stores the period as a number of seconds. The default is 200msec (0.200). Writing a value of 0 disables safemode.h](h_When an md array has seen no write requests for a certain period of time, it will be marked as }(h_When an md array has seen no write requests for a certain period of time, it will be marked as hjh hhhNhNubj)}(h ``clean``h]hclean}(hhhjq hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh ubh>. When another write request arrives, the array is marked as }(h>. When another write request arrives, the array is marked as hjh hhhNhNubj)}(h ``dirty``h]hdirty}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh ubh/ before the write commences. This is known as }(h/ before the write commences. This is known as hjh hhhNhNubj)}(h ``safe_mode``h]h safe_mode}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh ubh. The }(h. The hjh hhhNhNubj)}(h``certain period``h]hcertain period}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjh ubh is controlled by this file which stores the period as a number of seconds. The default is 200msec (0.200). Writing a value of 0 disables safemode.}(h is controlled by this file which stores the period as a number of seconds. The default is 200msec (0.200). Writing a value of 0 disables safemode.hjh hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhje ubah}(h]h ]h"]h$]h&]uh1hhjS ubeh}(h]h ]h"]h$]h&]uh1hhhhM%hjubh)}(hXarray_state This file contains a single word which describes the current state of the array. In many cases, the state can be set by writing the word for the desired state, however some states cannot be explicitly set, and some transitions are not allowed. Select/poll works on this file. All changes except between Active_idle and active (which can be frequent and are not very interesting) are notified. active->active_idle is reported if the metadata is externally managed. clear No devices, no size, no level Writing is equivalent to STOP_ARRAY ioctl inactive May have some settings, but array is not active all IO results in error When written, doesn't tear down array, but just stops it suspended (not supported yet) All IO requests will block. The array can be reconfigured. Writing this, if accepted, will block until array is quiescent readonly no resync can happen. no superblocks get written. Write requests fail read-auto like readonly, but behaves like ``clean`` on a write request. clean no pending writes, but otherwise active. When written to inactive array, starts without resync If a write request arrives then if metadata is known, mark ``dirty`` and switch to ``active``. if not known, block and switch to write-pending If written to an active array that has pending writes, then fails. active fully active: IO and resync can be happening. When written to inactive array, starts with resync write-pending clean, but writes are blocked waiting for ``active`` to be written. active-idle like active, but no writes have been seen for a while (safe_mode_delay). h](h)}(h array_stateh]h array_state}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hj ubh)}(hhh](h)}(hThis file contains a single word which describes the current state of the array. In many cases, the state can be set by writing the word for the desired state, however some states cannot be explicitly set, and some transitions are not allowed.h]hThis file contains a single word which describes the current state of the array. In many cases, the state can be set by writing the word for the desired state, however some states cannot be explicitly set, and some transitions are not allowed.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hj ubh)}(hSelect/poll works on this file. All changes except between Active_idle and active (which can be frequent and are not very interesting) are notified. active->active_idle is reported if the metadata is externally managed.h]hSelect/poll works on this file. All changes except between Active_idle and active (which can be frequent and are not very interesting) are notified. active->active_idle is reported if the metadata is externally managed.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj ubh)}(hhh](h)}(hOclear No devices, no size, no level Writing is equivalent to STOP_ARRAY ioctl h](h)}(hclearh]hclear}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj ubh)}(hhh](h)}(hNo devices, no size, no levelh]hNo devices, no size, no level}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hj ubh)}(h)Writing is equivalent to STOP_ARRAY ioctlh]h)Writing is equivalent to STOP_ARRAY ioctl}(hj( hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj ubeh}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhM5hj ubh)}(hinactive May have some settings, but array is not active all IO results in error When written, doesn't tear down array, but just stops it h](h)}(hinactiveh]hinactive}(hjF hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj@ ubh)}(hhh](h)}(hGMay have some settings, but array is not active all IO results in errorh]hGMay have some settings, but array is not active all IO results in error}(hjW hjU hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjR ubh)}(h8When written, doesn't tear down array, but just stops ith]h:When written, doesn’t tear down array, but just stops it}(hje hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjR ubeh}(h]h ]h"]h$]h&]uh1hhj@ ubeh}(h]h ]h"]h$]h&]uh1hhhhM;hj ubh)}(hsuspended (not supported yet) All IO requests will block. The array can be reconfigured. Writing this, if accepted, will block until array is quiescent h](h)}(hsuspended (not supported yet)h]hsuspended (not supported yet)}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hj} ubh)}(hhh](h)}(h:All IO requests will block. The array can be reconfigured.h]h:All IO requests will block. The array can be reconfigured.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM>hj ubh)}(h>Writing this, if accepted, will block until array is quiescenth]h>Writing this, if accepted, will block until array is quiescent}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hj ubeh}(h]h ]h"]h$]h&]uh1hhj} ubeh}(h]h ]h"]h$]h&]uh1hhhhM@hj ubh)}(hQreadonly no resync can happen. no superblocks get written. Write requests fail h](h)}(hreadonlyh]hreadonly}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj ubh)}(hhh](h)}(h2no resync can happen. no superblocks get written.h]h2no resync can happen. no superblocks get written.}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChj ubh)}(hWrite requests failh]hWrite requests fail}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj ubeh}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMEhj ubh)}(hHread-auto like readonly, but behaves like ``clean`` on a write request. h](h)}(h read-autoh]h read-auto}(hj hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj ubh)}(hhh]h)}(h=like readonly, but behaves like ``clean`` on a write request.h](h like readonly, but behaves like }(h like readonly, but behaves like hj hhhNhNubj)}(h ``clean``h]hclean}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh on a write request.}(h on a write request.hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMHhj ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMHhj ubh)}(hX9clean no pending writes, but otherwise active. When written to inactive array, starts without resync If a write request arrives then if metadata is known, mark ``dirty`` and switch to ``active``. if not known, block and switch to write-pending If written to an active array that has pending writes, then fails.h](h)}(hcleanh]hclean}(hj@hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhj:ubh)}(hhh](h)}(h(no pending writes, but otherwise active.h]h(no pending writes, but otherwise active.}(hjQhjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjLubh)}(h5When written to inactive array, starts without resynch]h5When written to inactive array, starts without resync}(hj_hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhjLubh)}(hIf a write request arrives then if metadata is known, mark ``dirty`` and switch to ``active``. if not known, block and switch to write-pendingh](h;If a write request arrives then if metadata is known, mark }(h;If a write request arrives then if metadata is known, mark hjkhhhNhNubj)}(h ``dirty``h]hdirty}(hhhjthhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubh and switch to }(h and switch to hjkhhhNhNubj)}(h ``active``h]hactive}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjkubh1. if not known, block and switch to write-pending}(h1. if not known, block and switch to write-pendinghjkhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMOhjLubh)}(hBIf written to an active array that has pending writes, then fails.h]hBIf written to an active array that has pending writes, then fails.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjLubeh}(h]h ]h"]h$]h&]uh1hhj:ubeh}(h]h ]h"]h$]h&]uh1hhhhMRhj ubh)}(hhactive fully active: IO and resync can be happening. When written to inactive array, starts with resync h](h)}(hactiveh]hactive}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjubh)}(hhh]h)}(h`fully active: IO and resync can be happening. When written to inactive array, starts with resynch]h`fully active: IO and resync can be happening. When written to inactive array, starts with resync}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMVhj ubh)}(hRwrite-pending clean, but writes are blocked waiting for ``active`` to be written. h](h)}(h write-pendingh]h write-pending}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjubh)}(hhh]h)}(hCclean, but writes are blocked waiting for ``active`` to be written.h](h*clean, but writes are blocked waiting for }(h*clean, but writes are blocked waiting for hjhhhNhNubj)}(h ``active``h]hactive}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to be written.}(h to be written.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMYhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMYhj ubh)}(hUactive-idle like active, but no writes have been seen for a while (safe_mode_delay). h](h)}(h active-idleh]h active-idle}(hj2hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hj,ubh)}(hhh]h)}(hHlike active, but no writes have been seen for a while (safe_mode_delay).h]hHlike active, but no writes have been seen for a while (safe_mode_delay).}(hjChjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hj>ubah}(h]h ]h"]h$]h&]uh1hhj,ubeh}(h]h ]h"]h$]h&]uh1hhhhM\hj ubeh}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhM\hjubh)}(hXbitmap/location This indicates where the write-intent bitmap for the array is stored. It can be one of ``none``, ``file`` or ``[+-]N``. ``file`` may later be extended to ``file:/file/name`` ``[+-]N`` means that many sectors from the start of the metadata. This is replicated on all devices. For arrays with externally managed metadata, the offset is from the beginning of the device. h](h)}(hbitmap/locationh]hbitmap/location}(hjshjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhjmubh)}(hhh](h)}(hEThis indicates where the write-intent bitmap for the array is stored.h]hEThis indicates where the write-intent bitmap for the array is stored.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjubh)}(hIt can be one of ``none``, ``file`` or ``[+-]N``. ``file`` may later be extended to ``file:/file/name`` ``[+-]N`` means that many sectors from the start of the metadata.h](hIt can be one of }(hIt can be one of hjhhhNhNubj)}(h``none``h]hnone}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(h, hjhhhNhNubj)}(h``file``h]hfile}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(h or hjhhhNhNubj)}(h ``[+-]N``h]h[+-]N}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. }(h. hjhhhNhNubj)}(h``file``h]hfile}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh may later be extended to }(h may later be extended to hjhhhNhNubj)}(h``file:/file/name``h]hfile:/file/name}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh }(h hjhhhNhNubj)}(h ``[+-]N``h]h[+-]N}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh8 means that many sectors from the start of the metadata.}(h8 means that many sectors from the start of the metadata.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMbhjubh)}(hThis is replicated on all devices. For arrays with externally managed metadata, the offset is from the beginning of the device.h]hThis is replicated on all devices. For arrays with externally managed metadata, the offset is from the beginning of the device.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjubeh}(h]h ]h"]h$]h&]uh1hhjmubeh}(h]h ]h"]h$]h&]uh1hhhhMhhjubh)}(hbitmap/chunksize The size, in bytes, of the chunk which will be represented by a single bit. For RAID456, it is a portion of an individual device. For RAID10, it is a portion of the array. For RAID1, it is both (they come to the same thing). h](h)}(hbitmap/chunksizeh]hbitmap/chunksize}(hj1hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhj+ubh)}(hhh]h)}(hThe size, in bytes, of the chunk which will be represented by a single bit. For RAID456, it is a portion of an individual device. For RAID10, it is a portion of the array. For RAID1, it is both (they come to the same thing).h]hThe size, in bytes, of the chunk which will be represented by a single bit. For RAID456, it is a portion of an individual device. For RAID10, it is a portion of the array. For RAID1, it is both (they come to the same thing).}(hjBhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj=ubah}(h]h ]h"]h$]h&]uh1hhj+ubeh}(h]h ]h"]h$]h&]uh1hhhhMnhjubh)}(hbitmap/time_base The time, in seconds, between looking for bits in the bitmap to be cleared. In the current implementation, a bit will be cleared between 2 and 3 times ``time_base`` after all the covered blocks are known to be in-sync. h](h)}(hbitmap/time_baseh]hbitmap/time_base}(hj`hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthjZubh)}(hhh]h)}(hThe time, in seconds, between looking for bits in the bitmap to be cleared. In the current implementation, a bit will be cleared between 2 and 3 times ``time_base`` after all the covered blocks are known to be in-sync.h](hThe time, in seconds, between looking for bits in the bitmap to be cleared. In the current implementation, a bit will be cleared between 2 and 3 times }(hThe time, in seconds, between looking for bits in the bitmap to be cleared. In the current implementation, a bit will be cleared between 2 and 3 times hjohhhNhNubj)}(h ``time_base``h]h time_base}(hhhjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubh6 after all the covered blocks are known to be in-sync.}(h6 after all the covered blocks are known to be in-sync.hjohhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMqhjlubah}(h]h ]h"]h$]h&]uh1hhjZubeh}(h]h ]h"]h$]h&]uh1hhhhMthjubh)}(hXObitmap/backlog When write-mostly devices are active in a RAID1, write requests to those devices proceed in the background - the filesystem (or other user of the device) does not have to wait for them. ``backlog`` sets a limit on the number of concurrent background writes. If there are more than this, new writes will by synchronous. h](h)}(hbitmap/backlogh]hbitmap/backlog}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjubh)}(hhh]h)}(hX?When write-mostly devices are active in a RAID1, write requests to those devices proceed in the background - the filesystem (or other user of the device) does not have to wait for them. ``backlog`` sets a limit on the number of concurrent background writes. If there are more than this, new writes will by synchronous.h](hWhen write-mostly devices are active in a RAID1, write requests to those devices proceed in the background - the filesystem (or other user of the device) does not have to wait for them. }(hWhen write-mostly devices are active in a RAID1, write requests to those devices proceed in the background - the filesystem (or other user of the device) does not have to wait for them. hjhhhNhNubj)}(h ``backlog``h]hbacklog}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhz sets a limit on the number of concurrent background writes. If there are more than this, new writes will by synchronous.}(hz sets a limit on the number of concurrent background writes. If there are more than this, new writes will by synchronous.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMwhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhM|hjubh)}(hXUbitmap/metadata This can be either ``internal`` or ``external``. ``internal`` is the default and means the metadata for the bitmap is stored in the first 256 bytes of the allocated space and is managed by the md module. ``external`` means that bitmap metadata is managed externally to the kernel (i.e. by some userspace program) h](h)}(hbitmap/metadatah]hbitmap/metadata}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(h0This can be either ``internal`` or ``external``.h](hThis can be either }(hThis can be either hjhhhNhNubj)}(h ``internal``h]hinternal}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(h or hjhhhNhNubj)}(h ``external``h]hexternal}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hj>hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(h``internal`` is the default and means the metadata for the bitmap is stored in the first 256 bytes of the allocated space and is managed by the md module. h](h)}(h ``internal``h]j)}(hj2h]hinternal}(hhhj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubh)}(hhh]h)}(his the default and means the metadata for the bitmap is stored in the first 256 bytes of the allocated space and is managed by the md module.h]his the default and means the metadata for the bitmap is stored in the first 256 bytes of the allocated space and is managed by the md module.}(hjLhjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1hhj,ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj)ubh)}(hm``external`` means that bitmap metadata is managed externally to the kernel (i.e. by some userspace program) h](h)}(h ``external``h]j)}(hjjh]hexternal}(hhhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1hhhhMhjdubh)}(hhh]h)}(h_means that bitmap metadata is managed externally to the kernel (i.e. by some userspace program)h]h_means that bitmap metadata is managed externally to the kernel (i.e. by some userspace program)}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjdubeh}(h]h ]h"]h$]h&]uh1hhhhMhj)ubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXbitmap/can_clear This is either ``true`` or ``false``. If ``true``, then bits in the bitmap will be cleared when the corresponding blocks are thought to be in-sync. If ``false``, bits will never be cleared. This is automatically set to ``false`` if a write happens on a degraded array, or if the array becomes degraded during a write. When metadata is managed externally, it should be set to true once the array becomes non-degraded, and this fact has been recorded in the metadata. h](h)}(hbitmap/can_clearh]hbitmap/can_clear}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(hXThis is either ``true`` or ``false``. If ``true``, then bits in the bitmap will be cleared when the corresponding blocks are thought to be in-sync. If ``false``, bits will never be cleared. This is automatically set to ``false`` if a write happens on a degraded array, or if the array becomes degraded during a write. When metadata is managed externally, it should be set to true once the array becomes non-degraded, and this fact has been recorded in the metadata.h](hThis is either }(hThis is either hjhhhNhNubj)}(h``true``h]htrue}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(h or hjhhhNhNubj)}(h ``false``h]hfalse}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. If }(h. If hjhhhNhNubj)}(h``true``h]htrue}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhg, then bits in the bitmap will be cleared when the corresponding blocks are thought to be in-sync. If }(hg, then bits in the bitmap will be cleared when the corresponding blocks are thought to be in-sync. If hjhhhNhNubj)}(h ``false``h]hfalse}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh;, bits will never be cleared. This is automatically set to }(h;, bits will never be cleared. This is automatically set to hjhhhNhNubj)}(h ``false``h]hfalse}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh if a write happens on a degraded array, or if the array becomes degraded during a write. When metadata is managed externally, it should be set to true once the array becomes non-degraded, and this fact has been recorded in the metadata.}(h if a write happens on a degraded array, or if the array becomes degraded during a write. When metadata is managed externally, it should be set to true once the array becomes non-degraded, and this fact has been recorded in the metadata.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXconsistency_policy This indicates how the array maintains consistency in case of unexpected shutdown. It can be: none Array has no redundancy information, e.g. raid0, linear. resync Full resync is performed and all redundancy is regenerated when the array is started after unclean shutdown. bitmap Resync assisted by a write-intent bitmap. journal For raid4/5/6, journal device is used to log transactions and replay after unclean shutdown. ppl For raid5 only, Partial Parity Log is used to close the write hole and eliminate resync. The accepted values when writing to this file are ``ppl`` and ``resync``, used to enable and disable PPL. h](h)}(hconsistency_policyh]hconsistency_policy}(hjChjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj=ubh)}(hhh](h)}(h]This indicates how the array maintains consistency in case of unexpected shutdown. It can be:h]h]This indicates how the array maintains consistency in case of unexpected shutdown. It can be:}(hjThjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOubh)}(hhh](h)}(h>none Array has no redundancy information, e.g. raid0, linear. h](h)}(hnoneh]hnone}(hjihjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcubh)}(hhh]h)}(h8Array has no redundancy information, e.g. raid0, linear.h]h8Array has no redundancy information, e.g. raid0, linear.}(hjzhjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjuubah}(h]h ]h"]h$]h&]uh1hhjcubeh}(h]h ]h"]h$]h&]uh1hhhhMhj`ubh)}(htresync Full resync is performed and all redundancy is regenerated when the array is started after unclean shutdown. h](h)}(hresynch]hresync}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(hlFull resync is performed and all redundancy is regenerated when the array is started after unclean shutdown.h]hlFull resync is performed and all redundancy is regenerated when the array is started after unclean shutdown.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhj`ubh)}(h1bitmap Resync assisted by a write-intent bitmap. h](h)}(hbitmaph]hbitmap}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(h)Resync assisted by a write-intent bitmap.h]h)Resync assisted by a write-intent bitmap.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhj`ubh)}(hejournal For raid4/5/6, journal device is used to log transactions and replay after unclean shutdown. h](h)}(hjournalh]hjournal}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(h\For raid4/5/6, journal device is used to log transactions and replay after unclean shutdown.h]h\For raid4/5/6, journal device is used to log transactions and replay after unclean shutdown.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhj`ubh)}(h]ppl For raid5 only, Partial Parity Log is used to close the write hole and eliminate resync. h](h)}(hpplh]hppl}(hj%hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(hXFor raid5 only, Partial Parity Log is used to close the write hole and eliminate resync.h]hXFor raid5 only, Partial Parity Log is used to close the write hole and eliminate resync.}(hj6hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhj`ubeh}(h]h ]h"]h$]h&]uh1hhjOubh)}(hiThe accepted values when writing to this file are ``ppl`` and ``resync``, used to enable and disable PPL.h](h2The accepted values when writing to this file are }(h2The accepted values when writing to this file are hjThhhNhNubj)}(h``ppl``h]hppl}(hhhj]hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubh and }(h and hjThhhNhNubj)}(h ``resync``h]hresync}(hhhjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjTubh!, used to enable and disable PPL.}(h!, used to enable and disable PPL.hjThhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjOubeh}(h]h ]h"]h$]h&]uh1hhj=ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hiuuid This indicates the UUID of the array in the following format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx h](h)}(huuidh]huuid}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(hbThis indicates the UUID of the array in the following format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxh]hbThis indicates the UUID of the array in the following format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhjihhhNhNubh)}(hmAs component devices are added to an md array, they appear in the ``md`` directory as new directories named::h](hBAs component devices are added to an md array, they appear in the }(hBAs component devices are added to an md array, they appear in the hjhhhNhNubj)}(h``md``h]hmd}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh$ directory as new directories named:}(h$ directory as new directories named:hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjihhubj4)}(hdev-XXXh]hdev-XXX}(hhhjubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhMhjihhubh)}(hawhere ``XXX`` is a name that the kernel knows for the device, e.g. hdb1. Each directory contains:h](hwhere }(hwhere hjhhhNhNubj)}(h``XXX``h]hXXX}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhT is a name that the kernel knows for the device, e.g. hdb1. Each directory contains:}(hT is a name that the kernel knows for the device, e.g. hdb1. Each directory contains:hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjihhubj)}(hhh]h)}(hhh](h)}(hblock a symlink to the block device in /sys/block, e.g.:: /sys/block/md0/md/dev-hdb1/block -> ../../../../block/hdb/hdb1 h](h)}(hblockh]hblock}(hj.hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj(ubh)}(hhh](h)}(h3a symlink to the block device in /sys/block, e.g.::h]h2a symlink to the block device in /sys/block, e.g.:}(h2a symlink to the block device in /sys/block, e.g.:hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj:ubj4)}(h>/sys/block/md0/md/dev-hdb1/block -> ../../../../block/hdb/hdb1h]h>/sys/block/md0/md/dev-hdb1/block -> ../../../../block/hdb/hdb1}(hhhjLubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhMhj:ubeh}(h]h ]h"]h$]h&]uh1hhj(ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj%ubh)}(hZsuper A file containing an image of the superblock read from, or written to, that device. h](h)}(hsuperh]hsuper}(hjlhjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubh)}(hhh]h)}(hSA file containing an image of the superblock read from, or written to, that device.h]hSA file containing an image of the superblock read from, or written to, that device.}(hj}hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjxubah}(h]h ]h"]h$]h&]uh1hhjfubeh}(h]h ]h"]h$]h&]uh1hhhhMhj%ubh)}(hXstate A file recording the current state of the device in the array which can be a comma separated list of: faulty device has been kicked from active use due to a detected fault, or it has unacknowledged bad blocks in_sync device is a fully in-sync member of the array writemostly device will only be subject to read requests if there are no other options. This applies only to raid1 arrays. blocked device has failed, and the failure hasn't been acknowledged yet by the metadata handler. Writes that would write to this device if it were not faulty are blocked. spare device is working, but not a full member. This includes spares that are in the process of being recovered to write_error device has ever seen a write error. want_replacement device is (mostly) working but probably should be replaced, either due to errors or due to user request. replacement device is a replacement for another active device with same raid_disk. This list may grow in future. This can be written to. Writing ``faulty`` simulates a failure on the device. Writing ``remove`` removes the device from the array. Writing ``writemostly`` sets the writemostly flag. Writing ``-writemostly`` clears the writemostly flag. Writing ``blocked`` sets the ``blocked`` flag. Writing ``-blocked`` clears the ``blocked`` flags and allows writes to complete and possibly simulates an error. Writing ``in_sync`` sets the in_sync flag. Writing ``write_error`` sets writeerrorseen flag. Writing ``-write_error`` clears writeerrorseen flag. Writing ``want_replacement`` is allowed at any time except to a replacement device or a spare. It sets the flag. Writing ``-want_replacement`` is allowed at any time. It clears the flag. Writing ``replacement`` or ``-replacement`` is only allowed before starting the array. It sets or clears the flag. This file responds to select/poll. Any change to ``faulty`` or ``blocked`` causes an event. h](h)}(hstateh]hstate}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(heA file recording the current state of the device in the array which can be a comma separated list of:h]heA file recording the current state of the device in the array which can be a comma separated list of:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh]h)}(hhh](h)}(hkfaulty device has been kicked from active use due to a detected fault, or it has unacknowledged bad blocks h](h)}(hfaultyh]hfaulty}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(hcdevice has been kicked from active use due to a detected fault, or it has unacknowledged bad blocksh]hcdevice has been kicked from active use due to a detected fault, or it has unacknowledged bad blocks}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h6in_sync device is a fully in-sync member of the array h](h)}(hin_synch]hin_sync}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(h-device is a fully in-sync member of the arrayh]h-device is a fully in-sync member of the array}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h|writemostly device will only be subject to read requests if there are no other options. This applies only to raid1 arrays. h](h)}(h writemostlyh]h writemostly}(hj"hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(hKdevice will only be subject to read requests if there are no other options.h]hKdevice will only be subject to read requests if there are no other options.}(hj3hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubh)}(h"This applies only to raid1 arrays.h]h"This applies only to raid1 arrays.}(hjAhj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj.ubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hblocked device has failed, and the failure hasn't been acknowledged yet by the metadata handler. Writes that would write to this device if it were not faulty are blocked. h](h)}(hblockedh]hblocked}(hj_hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYubh)}(hhh](h)}(hXdevice has failed, and the failure hasn't been acknowledged yet by the metadata handler.h]hZdevice has failed, and the failure hasn’t been acknowledged yet by the metadata handler.}(hjphjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjkubh)}(hIWrites that would write to this device if it were not faulty are blocked.h]hIWrites that would write to this device if it were not faulty are blocked.}(hj~hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjkubeh}(h]h ]h"]h$]h&]uh1hhjYubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(htspare device is working, but not a full member. This includes spares that are in the process of being recovered to h](h)}(hspareh]hspare}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(h)device is working, but not a full member.h]h)device is working, but not a full member.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hBThis includes spares that are in the process of being recovered toh]hBThis includes spares that are in the process of being recovered to}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h0write_error device has ever seen a write error. h](h)}(h write_errorh]h write_error}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(h#device has ever seen a write error.h]h#device has ever seen a write error.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hzwant_replacement device is (mostly) working but probably should be replaced, either due to errors or due to user request. h](h)}(hwant_replacementh]hwant_replacement}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh]h)}(hhdevice is (mostly) working but probably should be replaced, either due to errors or due to user request.h]hhdevice is (mostly) working but probably should be replaced, either due to errors or due to user request.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hTreplacement device is a replacement for another active device with same raid_disk. h](h)}(h replacementh]h replacement}(hj7hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubh)}(hhh]h)}(hFdevice is a replacement for another active device with same raid_disk.h]hFdevice is a replacement for another active device with same raid_disk.}(hjHhjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1hhj1ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(hThis list may grow in future.h]hThis list may grow in future.}(hjnhjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hThis can be written to.h]hThis can be written to.}(hj|hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h6Writing ``faulty`` simulates a failure on the device.h](hWriting }(hWriting hjhhhNhNubj)}(h ``faulty``h]hfaulty}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh$ simulates a failure on the device.}(h$ simulates a failure on the device.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h5Writing ``remove`` removes the device from the array.h](hWriting }(hWriting hjhhhNhNubj)}(h ``remove``h]hremove}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh# removes the device from the array.}(h# removes the device from the array.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h2Writing ``writemostly`` sets the writemostly flag.h](hWriting }(hWriting hjhhhNhNubj)}(h``writemostly``h]h writemostly}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh sets the writemostly flag.}(h sets the writemostly flag.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h5Writing ``-writemostly`` clears the writemostly flag.h](hWriting }(hWriting hjhhhNhNubj)}(h``-writemostly``h]h -writemostly}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh clears the writemostly flag.}(h clears the writemostly flag.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h.Writing ``blocked`` sets the ``blocked`` flag.h](hWriting }(hWriting hjhhhNhNubj)}(h ``blocked``h]hblocked}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh sets the }(h sets the hjhhhNhNubj)}(h ``blocked``h]hblocked}(hhhj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flag.}(h flag.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hpWriting ``-blocked`` clears the ``blocked`` flags and allows writes to complete and possibly simulates an error.h](hWriting }(hWriting hjEhhhNhNubj)}(h ``-blocked``h]h-blocked}(hhhjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubh clears the }(h clears the hjEhhhNhNubj)}(h ``blocked``h]hblocked}(hhhjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhjEubhE flags and allows writes to complete and possibly simulates an error.}(hE flags and allows writes to complete and possibly simulates an error.hjEhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h*Writing ``in_sync`` sets the in_sync flag.h](hWriting }(hWriting hjzhhhNhNubj)}(h ``in_sync``h]hin_sync}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjzubh sets the in_sync flag.}(h sets the in_sync flag.hjzhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h1Writing ``write_error`` sets writeerrorseen flag.h](hWriting }(hWriting hjhhhNhNubj)}(h``write_error``h]h write_error}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh sets writeerrorseen flag.}(h sets writeerrorseen flag.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(h4Writing ``-write_error`` clears writeerrorseen flag.h](hWriting }(hWriting hjhhhNhNubj)}(h``-write_error``h]h -write_error}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh clears writeerrorseen flag.}(h clears writeerrorseen flag.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hqWriting ``want_replacement`` is allowed at any time except to a replacement device or a spare. It sets the flag.h](hWriting }(hWriting hjhhhNhNubj)}(h``want_replacement``h]hwant_replacement}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhU is allowed at any time except to a replacement device or a spare. It sets the flag.}(hU is allowed at any time except to a replacement device or a spare. It sets the flag.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hJWriting ``-want_replacement`` is allowed at any time. It clears the flag.h](hWriting }(hWriting hjhhhNhNubj)}(h``-want_replacement``h]h-want_replacement}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh- is allowed at any time. It clears the flag.}(h- is allowed at any time. It clears the flag.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjubh)}(hsWriting ``replacement`` or ``-replacement`` is only allowed before starting the array. It sets or clears the flag.h](hWriting }(hWriting hj$hhhNhNubj)}(h``replacement``h]h replacement}(hhhj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh or }(h or hj$hhhNhNubj)}(h``-replacement``h]h -replacement}(hhhj@hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubhH is only allowed before starting the array. It sets or clears the flag.}(hH is only allowed before starting the array. It sets or clears the flag.hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjubh)}(h[This file responds to select/poll. Any change to ``faulty`` or ``blocked`` causes an event.h](h1This file responds to select/poll. Any change to }(h1This file responds to select/poll. Any change to hjYhhhNhNubj)}(h ``faulty``h]hfaulty}(hhhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh or }(h or hjYhhhNhNubj)}(h ``blocked``h]hblocked}(hhhjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh causes an event.}(h causes an event.hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhj%ubh)}(hXerrors An approximate count of read errors that have been detected on this device but have not caused the device to be evicted from the array (either because they were corrected or because they happened while the array was read-only). When using version-1 metadata, this value persists across restarts of the array. This value can be written while assembling an array thus providing an ongoing count for arrays with metadata managed by userspace. h](h)}(herrorsh]herrors}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(hX5An approximate count of read errors that have been detected on this device but have not caused the device to be evicted from the array (either because they were corrected or because they happened while the array was read-only). When using version-1 metadata, this value persists across restarts of the array.h]hX5An approximate count of read errors that have been detected on this device but have not caused the device to be evicted from the array (either because they were corrected or because they happened while the array was read-only). When using version-1 metadata, this value persists across restarts of the array.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hThis value can be written while assembling an array thus providing an ongoing count for arrays with metadata managed by userspace.h]hThis value can be written while assembling an array thus providing an ongoing count for arrays with metadata managed by userspace.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhj%ubh)}(hXyslot This gives the role that the device has in the array. It will either be ``none`` if the device is not active in the array (i.e. is a spare or has failed) or an integer less than the ``raid_disks`` number for the array indicating which position it currently fills. This can only be set while assembling an array. A device for which this is set is assumed to be working. h](h)}(hsloth]hslot}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hjubh)}(hhh]h)}(hXsThis gives the role that the device has in the array. It will either be ``none`` if the device is not active in the array (i.e. is a spare or has failed) or an integer less than the ``raid_disks`` number for the array indicating which position it currently fills. This can only be set while assembling an array. A device for which this is set is assumed to be working.h](hIThis gives the role that the device has in the array. It will either be }(hIThis gives the role that the device has in the array. It will either be hjhhhNhNubj)}(h``none``h]hnone}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhf if the device is not active in the array (i.e. is a spare or has failed) or an integer less than the }(hf if the device is not active in the array (i.e. is a spare or has failed) or an integer less than the hjhhhNhNubj)}(h``raid_disks``h]h raid_disks}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh number for the array indicating which position it currently fills. This can only be set while assembling an array. A device for which this is set is assumed to be working.}(h number for the array indicating which position it currently fills. This can only be set while assembling an array. A device for which this is set is assumed to be working.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhM$hj%ubh)}(hoffset This gives the location in the device (in sectors from the start) where data from the array will be stored. Any part of the device before this offset is not touched, unless it is used for storing metadata (Formats 1.1 and 1.2). h](h)}(hoffseth]hoffset}(hj3hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hj-ubh)}(hhh]h)}(hThis gives the location in the device (in sectors from the start) where data from the array will be stored. Any part of the device before this offset is not touched, unless it is used for storing metadata (Formats 1.1 and 1.2).h]hThis gives the location in the device (in sectors from the start) where data from the array will be stored. Any part of the device before this offset is not touched, unless it is used for storing metadata (Formats 1.1 and 1.2).}(hjDhjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj?ubah}(h]h ]h"]h$]h&]uh1hhj-ubeh}(h]h ]h"]h$]h&]uh1hhhhM*hj%ubh)}(hXsize The amount of the device, after the offset, that can be used for storage of data. This will normally be the same as the component_size. This can be written while assembling an array. If a value less than the current component_size is written, it will be rejected. h](h)}(hsizeh]hsize}(hjbhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj\ubh)}(hhh]h)}(hX The amount of the device, after the offset, that can be used for storage of data. This will normally be the same as the component_size. This can be written while assembling an array. If a value less than the current component_size is written, it will be rejected.h]hX The amount of the device, after the offset, that can be used for storage of data. This will normally be the same as the component_size. This can be written while assembling an array. If a value less than the current component_size is written, it will be rejected.}(hjshjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjnubah}(h]h ]h"]h$]h&]uh1hhj\ubeh}(h]h ]h"]h$]h&]uh1hhhhM1hj%ubh)}(hXrecovery_start When the device is not ``in_sync``, this records the number of sectors from the start of the device which are known to be correct. This is normally zero, but during a recovery operation it will steadily increase, and if the recovery is interrupted, restoring this value can cause recovery to avoid repeating the earlier blocks. With v1.x metadata, this value is saved and restored automatically. This can be set whenever the device is not an active member of the array, either before the array is activated, or before the ``slot`` is set. Setting this to ``none`` is equivalent to setting ``in_sync``. Setting to any other value also clears the ``in_sync`` flag. h](h)}(hrecovery_starth]hrecovery_start}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjubh)}(hhh](h)}(hXWhen the device is not ``in_sync``, this records the number of sectors from the start of the device which are known to be correct. This is normally zero, but during a recovery operation it will steadily increase, and if the recovery is interrupted, restoring this value can cause recovery to avoid repeating the earlier blocks. With v1.x metadata, this value is saved and restored automatically.h](hWhen the device is not }(hWhen the device is not hjhhhNhNubj)}(h ``in_sync``h]hin_sync}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhXk, this records the number of sectors from the start of the device which are known to be correct. This is normally zero, but during a recovery operation it will steadily increase, and if the recovery is interrupted, restoring this value can cause recovery to avoid repeating the earlier blocks. With v1.x metadata, this value is saved and restored automatically.}(hXk, this records the number of sectors from the start of the device which are known to be correct. This is normally zero, but during a recovery operation it will steadily increase, and if the recovery is interrupted, restoring this value can cause recovery to avoid repeating the earlier blocks. With v1.x metadata, this value is saved and restored automatically.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM4hjubh)}(hThis can be set whenever the device is not an active member of the array, either before the array is activated, or before the ``slot`` is set.h](h~This can be set whenever the device is not an active member of the array, either before the array is activated, or before the }(h~This can be set whenever the device is not an active member of the array, either before the array is activated, or before the hjhhhNhNubj)}(h``slot``h]hslot}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is set.}(h is set.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM<hjubh)}(h{Setting this to ``none`` is equivalent to setting ``in_sync``. Setting to any other value also clears the ``in_sync`` flag.h](hSetting this to }(hSetting this to hjhhhNhNubj)}(h``none``h]hnone}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is equivalent to setting }(h is equivalent to setting hjhhhNhNubj)}(h ``in_sync``h]hin_sync}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh-. Setting to any other value also clears the }(h-. Setting to any other value also clears the hjhhhNhNubj)}(h ``in_sync``h]hin_sync}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flag.}(h flag.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM@hjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMAhj%ubh)}(hXbad_blocks This gives the list of all known bad blocks in the form of start address and length (in sectors respectively). If output is too big to fit in a page, it will be truncated. Writing ``sector length`` to this file adds new acknowledged (i.e. recorded to disk safely) bad blocks. h](h)}(h bad_blocksh]h bad_blocks}(hj>hj<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj8ubh)}(hhh]h)}(hXThis gives the list of all known bad blocks in the form of start address and length (in sectors respectively). If output is too big to fit in a page, it will be truncated. Writing ``sector length`` to this file adds new acknowledged (i.e. recorded to disk safely) bad blocks.h](hThis gives the list of all known bad blocks in the form of start address and length (in sectors respectively). If output is too big to fit in a page, it will be truncated. Writing }(hThis gives the list of all known bad blocks in the form of start address and length (in sectors respectively). If output is too big to fit in a page, it will be truncated. Writing hjMhhhNhNubj)}(h``sector length``h]h sector length}(hhhjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjMubhN to this file adds new acknowledged (i.e. recorded to disk safely) bad blocks.}(hN to this file adds new acknowledged (i.e. recorded to disk safely) bad blocks.hjMhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMDhjJubah}(h]h ]h"]h$]h&]uh1hhj8ubeh}(h]h ]h"]h$]h&]uh1hhhhMHhj%ubh)}(hXunacknowledged_bad_blocks This gives the list of known-but-not-yet-saved-to-disk bad blocks in the same form of ``bad_blocks``. If output is too big to fit in a page, it will be truncated. Writing to this file adds bad blocks without acknowledging them. This is largely for testing. h](h)}(hunacknowledged_bad_blocksh]hunacknowledged_bad_blocks}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj{ubh)}(hhh]h)}(hXThis gives the list of known-but-not-yet-saved-to-disk bad blocks in the same form of ``bad_blocks``. If output is too big to fit in a page, it will be truncated. Writing to this file adds bad blocks without acknowledging them. This is largely for testing.h](hVThis gives the list of known-but-not-yet-saved-to-disk bad blocks in the same form of }(hVThis gives the list of known-but-not-yet-saved-to-disk bad blocks in the same form of hjhhhNhNubj)}(h``bad_blocks``h]h bad_blocks}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. If output is too big to fit in a page, it will be truncated. Writing to this file adds bad blocks without acknowledging them. This is largely for testing.}(h. If output is too big to fit in a page, it will be truncated. Writing to this file adds bad blocks without acknowledging them. This is largely for testing.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMKhjubah}(h]h ]h"]h$]h&]uh1hhj{ubeh}(h]h ]h"]h$]h&]uh1hhhhMOhj%ubh)}(hnppl_sector, ppl_size Location and size (in sectors) of the space used for Partial Parity Log on this device. h](h)}(hppl_sector, ppl_sizeh]hppl_sector, ppl_size}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThjubh)}(hhh]h)}(hWLocation and size (in sectors) of the space used for Partial Parity Log on this device.h]hWLocation and size (in sectors) of the space used for Partial Parity Log on this device.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMThj%ubeh}(h]h ]h"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]uh1jhjihhhNhNubh)}(hfAn active md device will also contain an entry for each active device in the array. These are named::h]heAn active md device will also contain an entry for each active device in the array. These are named:}(heAn active md device will also contain an entry for each active device in the array. These are named:hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjihhubj4)}(hrdNNh]hrdNN}(hhhjubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhMYhjihhubh)}(hwhere ``NN`` is the position in the array, starting from 0. So for a 3 drive array there will be rd0, rd1, rd2. These are symbolic links to the appropriate ``dev-XXX`` entry. Thus, for example::h](hwhere }(hwhere hjhhhNhNubj)}(h``NN``h]hNN}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is the position in the array, starting from 0. So for a 3 drive array there will be rd0, rd1, rd2. These are symbolic links to the appropriate }(h is the position in the array, starting from 0. So for a 3 drive array there will be rd0, rd1, rd2. These are symbolic links to the appropriate hjhhhNhNubj)}(h ``dev-XXX``h]hdev-XXX}(hhhj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh entry. Thus, for example:}(h entry. Thus, for example:hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM[hjihhubj4)}(hcat /sys/block/md*/md/rd*/stateh]hcat /sys/block/md*/md/rd*/state}(hhhjKubah}(h]h ]h"]h$]h&]jCjDuh1j3hhhM`hjihhubh)}(h$will show ``in_sync`` on every line.h](h will show }(h will show hjYhhhNhNubj)}(h ``in_sync``h]hin_sync}(hhhjbhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjYubh on every line.}(h on every line.hjYhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMbhjihhubh)}(hPActive md devices for levels that support data redundancy (1,4,5,6,10) also haveh]hPActive md devices for levels that support data redundancy (1,4,5,6,10) also have}(hj}hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMfhjihhubj)}(hhh]h)}(hhh](h)}(hXCsync_action a text file that can be used to monitor and control the rebuild process. It contains one word which can be one of: resync redundancy is being recalculated after unclean shutdown or creation recover a hot spare is being built to replace a failed/missing device idle nothing is happening check A full check of redundancy was requested and is happening. This reads all blocks and checks them. A repair may also happen for some raid levels. repair A full check and repair is happening. This is similar to ``resync``, but was requested by the user, and the write-intent bitmap is NOT used to optimise the process. This file is writable, and each of the strings that could be read are meaningful for writing. ``idle`` will stop an active resync/recovery etc. There is no guarantee that another resync/recovery may not be automatically started again, though some event will be needed to trigger this. ``resync`` or ``recovery`` can be used to restart the corresponding operation if it was stopped with ``idle``. ``check`` and ``repair`` will start the appropriate process providing the current state is ``idle``. This file responds to select/poll. Any important change in the value triggers a poll event. Sometimes the value will briefly be ``recover`` if a recovery seems to be needed, but cannot be achieved. In that case, the transition to ``recover`` isn't notified, but the transition away is. h](h)}(h sync_actionh]h sync_action}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(hsa text file that can be used to monitor and control the rebuild process. It contains one word which can be one of:h]hsa text file that can be used to monitor and control the rebuild process. It contains one word which can be one of:}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjubj)}(hhh](j)}(hhh]h)}(hhh](h)}(hKresync redundancy is being recalculated after unclean shutdown or creation h](h)}(hresynch]hresync}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjubh)}(hhh]h)}(hCredundancy is being recalculated after unclean shutdown or creationh]hCredundancy is being recalculated after unclean shutdown or creation}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMohjubh)}(hFrecover a hot spare is being built to replace a failed/missing device h](h)}(hrecoverh]hrecover}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjubh)}(hhh]h)}(h=a hot spare is being built to replace a failed/missing deviceh]h=a hot spare is being built to replace a failed/missing device}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMshjubh)}(hidle nothing is happeningh](h)}(hidleh]hidle}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhjubh)}(hhh]h)}(hnothing is happeningh]hnothing is happening}(hj0hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhj+ubah}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMuhjubh)}(hcheck A full check of redundancy was requested and is happening. This reads all blocks and checks them. A repair may also happen for some raid levels. h](h)}(hcheckh]hcheck}(hjNhjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjHubh)}(hhh]h)}(hA full check of redundancy was requested and is happening. This reads all blocks and checks them. A repair may also happen for some raid levels.h]hA full check of redundancy was requested and is happening. This reads all blocks and checks them. A repair may also happen for some raid levels.}(hj_hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjZubah}(h]h ]h"]h$]h&]uh1hhjHubeh}(h]h ]h"]h$]h&]uh1hhhhM{hjubh)}(hrepair A full check and repair is happening. This is similar to ``resync``, but was requested by the user, and the write-intent bitmap is NOT used to optimise the process. h](h)}(hrepairh]hrepair}(hj}hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjwubh)}(hhh]h)}(hA full check and repair is happening. This is similar to ``resync``, but was requested by the user, and the write-intent bitmap is NOT used to optimise the process.h](h:A full check and repair is happening. This is similar to }(h:A full check and repair is happening. This is similar to hjhhhNhNubj)}(h ``resync``h]hresync}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubha, but was requested by the user, and the write-intent bitmap is NOT used to optimise the process.}(ha, but was requested by the user, and the write-intent bitmap is NOT used to optimise the process.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM~hjubah}(h]h ]h"]h$]h&]uh1hhjwubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhjubh)}(h]This file is writable, and each of the strings that could be read are meaningful for writing.h]h]This file is writable, and each of the strings that could be read are meaningful for writing.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh](h)}(h``idle`` will stop an active resync/recovery etc. There is no guarantee that another resync/recovery may not be automatically started again, though some event will be needed to trigger this.h](j)}(h``idle``h]hidle}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh will stop an active resync/recovery etc. There is no guarantee that another resync/recovery may not be automatically started again, though some event will be needed to trigger this.}(h will stop an active resync/recovery etc. There is no guarantee that another resync/recovery may not be automatically started again, though some event will be needed to trigger this.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hn``resync`` or ``recovery`` can be used to restart the corresponding operation if it was stopped with ``idle``.h](j)}(h ``resync``h]hresync}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh or }(h or hjhhhNhNubj)}(h ``recovery``h]hrecovery}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhK can be used to restart the corresponding operation if it was stopped with }(hK can be used to restart the corresponding operation if it was stopped with hjhhhNhNubj)}(h``idle``h]hidle}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hj>hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hd``check`` and ``repair`` will start the appropriate process providing the current state is ``idle``.h](j)}(h ``check``h]hcheck}(hhhj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh and }(h and hj6hhhNhNubj)}(h ``repair``h]hrepair}(hhhjMhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubhC will start the appropriate process providing the current state is }(hC will start the appropriate process providing the current state is hj6hhhNhNubj)}(h``idle``h]hidle}(hhhj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj6ubh.}(hj>hj6hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubh)}(hXThis file responds to select/poll. Any important change in the value triggers a poll event. Sometimes the value will briefly be ``recover`` if a recovery seems to be needed, but cannot be achieved. In that case, the transition to ``recover`` isn't notified, but the transition away is.h](hThis file responds to select/poll. Any important change in the value triggers a poll event. Sometimes the value will briefly be }(hThis file responds to select/poll. Any important change in the value triggers a poll event. Sometimes the value will briefly be hj~hhhNhNubj)}(h ``recover``h]hrecover}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubh[ if a recovery seems to be needed, but cannot be achieved. In that case, the transition to }(h[ if a recovery seems to be needed, but cannot be achieved. In that case, the transition to hj~hhhNhNubj)}(h ``recover``h]hrecover}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubh. isn’t notified, but the transition away is.}(h, isn't notified, but the transition away is.hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hX(degraded This contains a count of the number of devices by which the arrays is degraded. So an optimal array will show ``0``. A single failed/missing drive will show ``1``, etc. This file responds to select/poll, any increase or decrease in the count of missing devices will trigger an event. h](h)}(hdegradedh]hdegraded}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(hThis contains a count of the number of devices by which the arrays is degraded. So an optimal array will show ``0``. A single failed/missing drive will show ``1``, etc.h](hoThis contains a count of the number of devices by which the arrays is degraded. So an optimal array will show }(hoThis contains a count of the number of devices by which the arrays is degraded. So an optimal array will show hjhhhNhNubj)}(h``0``h]h0}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh+. A single failed/missing drive will show }(h+. A single failed/missing drive will show hjhhhNhNubj)}(h``1``h]h1}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, etc.}(h, etc.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hrThis file responds to select/poll, any increase or decrease in the count of missing devices will trigger an event.h]hrThis file responds to select/poll, any increase or decrease in the count of missing devices will trigger an event.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXmismatch_count When performing ``check`` and ``repair``, and possibly when performing ``resync``, md will count the number of errors that are found. The count in ``mismatch_cnt`` is the number of sectors that were re-written, or (for ``check``) would have been re-written. As most raid levels work in units of pages rather than sectors, this may be larger than the number of actual errors by a factor of the number of sectors in a page. h](h)}(hmismatch_counth]hmismatch_count}(hj/hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj)ubh)}(hhh]h)}(hXWhen performing ``check`` and ``repair``, and possibly when performing ``resync``, md will count the number of errors that are found. The count in ``mismatch_cnt`` is the number of sectors that were re-written, or (for ``check``) would have been re-written. As most raid levels work in units of pages rather than sectors, this may be larger than the number of actual errors by a factor of the number of sectors in a page.h](hWhen performing }(hWhen performing hj>hhhNhNubj)}(h ``check``h]hcheck}(hhhjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh and }(h and hj>hhhNhNubj)}(h ``repair``h]hrepair}(hhhjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh, and possibly when performing }(h, and possibly when performing hj>hhhNhNubj)}(h ``resync``h]hresync}(hhhjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubhC, md will count the number of errors that are found. The count in }(hC, md will count the number of errors that are found. The count in hj>hhhNhNubj)}(h``mismatch_cnt``h]h mismatch_cnt}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh8 is the number of sectors that were re-written, or (for }(h8 is the number of sectors that were re-written, or (for hj>hhhNhNubj)}(h ``check``h]hcheck}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj>ubh) would have been re-written. As most raid levels work in units of pages rather than sectors, this may be larger than the number of actual errors by a factor of the number of sectors in a page.}(h) would have been re-written. As most raid levels work in units of pages rather than sectors, this may be larger than the number of actual errors by a factor of the number of sectors in a page.hj>hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj;ubah}(h]h ]h"S]h$]h&]uh1hhj)ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXbitmap_set_bits If the array has a write-intent bitmap, then writing to this attribute can set bits in the bitmap, indicating that a resync would need to check the corresponding blocks. Either individual numbers or start-end pairs can be written. Multiple numbers can be separated by a space. Note that the numbers are ``bit`` numbers, not ``block`` numbers. They should be scaled by the bitmap_chunksize. h](h)}(hbitmap_set_bitsh]hbitmap_set_bits}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(hXIf the array has a write-intent bitmap, then writing to this attribute can set bits in the bitmap, indicating that a resync would need to check the corresponding blocks. Either individual numbers or start-end pairs can be written. Multiple numbers can be separated by a space.h]hXIf the array has a write-intent bitmap, then writing to this attribute can set bits in the bitmap, indicating that a resync would need to check the corresponding blocks. Either individual numbers or start-end pairs can be written. Multiple numbers can be separated by a space.}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hpNote that the numbers are ``bit`` numbers, not ``block`` numbers. They should be scaled by the bitmap_chunksize.h](hNote that the numbers are }(hNote that the numbers are hjhhhNhNubj)}(h``bit``h]hbit}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh numbers, not }(h numbers, not hjhhhNhNubj)}(h ``block``h]hblock}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh8 numbers. They should be scaled by the bitmap_chunksize.}(h8 numbers. They should be scaled by the bitmap_chunksize.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXsync_speed_min, sync_speed_max This are similar to ``/proc/sys/dev/raid/speed_limit_{min,max}`` however they only apply to the particular array. If no value has been written to these, or if the word ``system`` is written, then the system-wide value is used. If a value, in kibibytes-per-second is written, then it is used. When the files are read, they show the currently active value followed by ``(local)`` or ``(system)`` depending on whether it is a locally set or system-wide value. h](h)}(hsync_speed_min, sync_speed_maxh]hsync_speed_min, sync_speed_max}(hj"hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(hqThis are similar to ``/proc/sys/dev/raid/speed_limit_{min,max}`` however they only apply to the particular array.h](hThis are similar to }(hThis are similar to hj1hhhNhNubj)}(h,``/proc/sys/dev/raid/speed_limit_{min,max}``h]h(/proc/sys/dev/raid/speed_limit_{min,max}}(hhhj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj1ubh1 however they only apply to the particular array.}(h1 however they only apply to the particular array.hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj.ubh)}(hIf no value has been written to these, or if the word ``system`` is written, then the system-wide value is used. If a value, in kibibytes-per-second is written, then it is used.h](h6If no value has been written to these, or if the word }(h6If no value has been written to these, or if the word hjShhhNhNubj)}(h ``system``h]hsystem}(hhhj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjSubhr is written, then the system-wide value is used. If a value, in kibibytes-per-second is written, then it is used.}(hr is written, then the system-wide value is used. If a value, in kibibytes-per-second is written, then it is used.hjShhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj.ubh)}(hWhen the files are read, they show the currently active value followed by ``(local)`` or ``(system)`` depending on whether it is a locally set or system-wide value.h](hJWhen the files are read, they show the currently active value followed by }(hJWhen the files are read, they show the currently active value followed by hjuhhhNhNubj)}(h ``(local)``h]h(local)}(hhhj~hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubh or }(h or hjuhhhNhNubj)}(h ``(system)``h]h(system)}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjuubh? depending on whether it is a locally set or system-wide value.}(h? depending on whether it is a locally set or system-wide value.hjuhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj.ubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXsync_completed This shows the number of sectors that have been completed of whatever the current sync_action is, followed by the number of sectors in total that could need to be processed. The two numbers are separated by a ``/`` thus effectively showing one value, a fraction of the process that is complete. A ``select`` on this attribute will return when resync completes, when it reaches the current sync_max (below) and possibly at other times. h](h)}(hsync_completedh]hsync_completed}(hjhjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hhh](h)}(hX(This shows the number of sectors that have been completed of whatever the current sync_action is, followed by the number of sectors in total that could need to be processed. The two numbers are separated by a ``/`` thus effectively showing one value, a fraction of the process that is complete.h](hThis shows the number of sectors that have been completed of whatever the current sync_action is, followed by the number of sectors in total that could need to be processed. The two numbers are separated by a }(hThis shows the number of sectors that have been completed of whatever the current sync_action is, followed by the number of sectors in total that could need to be processed. The two numbers are separated by a hjhhhNhNubj)}(h``/``h]h/}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhQ thus effectively showing one value, a fraction of the process that is complete.}(hQ thus effectively showing one value, a fraction of the process that is complete.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hA ``select`` on this attribute will return when resync completes, when it reaches the current sync_max (below) and possibly at other times.h](hA }(hA hjhhhNhNubj)}(h ``select``h]hselect}(hhhjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh on this attribute will return when resync completes, when it reaches the current sync_max (below) and possibly at other times.}(h on this attribute will return when resync completes, when it reaches the current sync_max (below) and possibly at other times.hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hsync_speed This shows the current actual speed, in K/sec, of the current sync_action. It is averaged over the last 30 seconds. h](h)}(h sync_speedh]h sync_speed}(hj! hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hhh]h)}(htThis shows the current actual speed, in K/sec, of the current sync_action. It is averaged over the last 30 seconds.h]htThis shows the current actual speed, in K/sec, of the current sync_action. It is averaged over the last 30 seconds.}(hj2 hj0 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj- ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hsuspend_lo, suspend_hi The two values, given as numbers of sectors, indicate a range within the array where IO will be blocked. This is currently only supported for raid4/5/6. h](h)}(hsuspend_lo, suspend_hih]hsuspend_lo, suspend_hi}(hjP hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJ ubh)}(hhh]h)}(hThe two values, given as numbers of sectors, indicate a range within the array where IO will be blocked. This is currently only supported for raid4/5/6.h]hThe two values, given as numbers of sectors, indicate a range within the array where IO will be blocked. This is currently only supported for raid4/5/6.}(hja hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\ ubah}(h]h ]h"]h$]h&]uh1hhjJ ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hXvsync_min, sync_max The two values, given as numbers of sectors, indicate a range within the array where ``check``/``repair`` will operate. Must be a multiple of chunk_size. When it reaches ``sync_max`` it will pause, rather than complete. You can use ``select`` or ``poll`` on ``sync_completed`` to wait for that number to reach sync_max. Then you can either increase ``sync_max``, or can write ``idle`` to ``sync_action``. The value of ``max`` for ``sync_max`` effectively disables the limit. When a resync is active, the value can only ever be increased, never decreased. The value of ``0`` is the minimum for ``sync_min``. h](h)}(hsync_min, sync_maxh]hsync_min, sync_max}(hj hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjy ubh)}(hhh](h)}(hXThe two values, given as numbers of sectors, indicate a range within the array where ``check``/``repair`` will operate. Must be a multiple of chunk_size. When it reaches ``sync_max`` it will pause, rather than complete. You can use ``select`` or ``poll`` on ``sync_completed`` to wait for that number to reach sync_max. Then you can either increase ``sync_max``, or can write ``idle`` to ``sync_action``.h](hUThe two values, given as numbers of sectors, indicate a range within the array where }(hUThe two values, given as numbers of sectors, indicate a range within the array where hj hhhNhNubj)}(h ``check``h]hcheck}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh/}(h/hj hhhNhNubj)}(h ``repair``h]hrepair}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhA will operate. Must be a multiple of chunk_size. When it reaches }(hA will operate. Must be a multiple of chunk_size. When it reaches hj hhhNhNubj)}(h ``sync_max``h]hsync_max}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh2 it will pause, rather than complete. You can use }(h2 it will pause, rather than complete. You can use hj hhhNhNubj)}(h ``select``h]hselect}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh or }(h or hj hhhNhNubj)}(h``poll``h]hpoll}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh on }(h on hj hhhNhNubj)}(h``sync_completed``h]hsync_completed}(hhhj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhJ to wait for that number to reach sync_max. Then you can either increase }(hJ to wait for that number to reach sync_max. Then you can either increase hj hhhNhNubj)}(h ``sync_max``h]hsync_max}(hhhj !hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh, or can write }(h, or can write hj hhhNhNubj)}(h``idle``h]hidle}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh to }(h to hj hhhNhNubj)}(h``sync_action``h]h sync_action}(hhhj/!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh.}(hj>hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubh)}(hThe value of ``max`` for ``sync_max`` effectively disables the limit. When a resync is active, the value can only ever be increased, never decreased. The value of ``0`` is the minimum for ``sync_min``.h](h The value of }(h The value of hjG!hhhNhNubj)}(h``max``h]hmax}(hhhjP!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG!ubh for }(h for hjG!hhhNhNubj)}(h ``sync_max``h]hsync_max}(hhhjc!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG!ubh~ effectively disables the limit. When a resync is active, the value can only ever be increased, never decreased. The value of }(h~ effectively disables the limit. When a resync is active, the value can only ever be increased, never decreased. The value of hjG!hhhNhNubj)}(h``0``h]h0}(hhhjv!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG!ubh is the minimum for }(h is the minimum for hjG!hhhNhNubj)}(h ``sync_min``h]hsync_min}(hhhj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjG!ubh.}(hj>hjG!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj ubeh}(h]h ]h"]h$]h&]uh1hhjy ubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]uh1jhjihhhNhNubh)}(hEach active md device may also have attributes specific to the personality module that manages it. These are specific to the implementation of the module and could change substantially if the implementation changes.h]hEach active md device may also have attributes specific to the personality module that manages it. These are specific to the implementation of the module and could change substantially if the implementation changes.}(hj!hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjihhubh)}(hThese currently include:h]hThese currently include:}(hj!hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjihhubj)}(hhh]h)}(hhh](h)}(hstripe_cache_size (currently raid5 only) number of entries in the stripe cache. This is writable, but there are upper and lower limits (32768, 17). Default is 256. h](h)}(h)stripe_cache_size (currently raid5 only)h]h)stripe_cache_size (currently raid5 only)}(hj!hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubh)}(hhh]h)}(h|number of entries in the stripe cache. This is writable, but there are upper and lower limits (32768, 17). Default is 256.h]h|number of entries in the stripe cache. This is writable, but there are upper and lower limits (32768, 17). Default is 256.}(hj!hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj!ubah}(h]h ]h"]h$]h&]uh1hhj!ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj!ubh)}(hWstrip_cache_active (currently raid5 only) number of active entries in the stripe cache h](h)}(h)strip_cache_active (currently raid5 only)h]h)strip_cache_active (currently raid5 only)}(hj"hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj "ubh)}(hhh]h)}(h,number of active entries in the stripe cacheh]h,number of active entries in the stripe cache}(hj!"hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1hhj "ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj!ubh)}(hXcpreread_bypass_threshold (currently raid5 only) number of times a stripe requiring preread will be bypassed by a stripe that does not require preread. For fairness defaults to 1. Setting this to 0 disables bypass accounting and requires preread stripes to wait until all full-width stripe- writes are complete. Valid values are 0 to stripe_cache_size. h](h)}(h/preread_bypass_threshold (currently raid5 only)h]h/preread_bypass_threshold (currently raid5 only)}(hj?"hj="hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj9"ubh)}(hhh]h)}(hX2number of times a stripe requiring preread will be bypassed by a stripe that does not require preread. For fairness defaults to 1. Setting this to 0 disables bypass accounting and requires preread stripes to wait until all full-width stripe- writes are complete. Valid values are 0 to stripe_cache_size.h]hX2number of times a stripe requiring preread will be bypassed by a stripe that does not require preread. For fairness defaults to 1. Setting this to 0 disables bypass accounting and requires preread stripes to wait until all full-width stripe- writes are complete. Valid values are 0 to stripe_cache_size.}(hjP"hjN"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjK"ubah}(h]h ]h"]h$]h&]uh1hhj9"ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj!ubh)}(hjournal_mode (currently raid5 only) The cache mode for raid5. raid5 could include an extra disk for caching. The mode can be "write-throuth" and "write-back". The default is "write-through". h](h)}(h#journal_mode (currently raid5 only)h]h#journal_mode (currently raid5 only)}(hjn"hjl"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjh"ubh)}(hhh]h)}(hThe cache mode for raid5. raid5 could include an extra disk for caching. The mode can be "write-throuth" and "write-back". The default is "write-through".h]hThe cache mode for raid5. raid5 could include an extra disk for caching. The mode can be “write-throuth” and “write-back”. The default is “write-through”.}(hj"hj}"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjz"ubah}(h]h ]h"]h$]h&]uh1hhjh"ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj!ubh)}(hCppl_write_hint NVMe stream ID to be set for each PPL write request.h](h)}(hppl_write_hinth]hppl_write_hint}(hj"hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubh)}(hhh]h)}(h4NVMe stream ID to be set for each PPL write request.h]h4NVMe stream ID to be set for each PPL write request.}(hj"hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj"ubah}(h]h ]h"]h$]h&]uh1hhj"ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj!ubeh}(h]h ]h"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]uh1jhjihhhNhNubeh}(h]md-devices-in-sysfsah ]h"]md devices in sysfsah$]h&]uh1hhhhhhhhKubeh}(h] raid-arraysah ]h"] raid arraysah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj#error_encodingUTF-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confapep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacefile_insertion_enabled raw_enabledKline_length_limitM'syntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_link embed_imagesenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j"j"jjjHjEjljijjjjjjjj jjj$j!jjjfjcj"j"u nametypes}(j"NjNjHNjlNjNjNjNjNjNj$NjNjfNj"Nuh}(j"hjhjEjjijKjjojjjjj jjjj!jjj'jcjj"jiu footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.