k pt typmentclass=" men> rel=typspettclass=".r._ng"> nk pspettclass=".r._logo> a.static/c">LXRr/spetk pspettid="currmen_pathnk typa.static/c8.4/"> .4/">/ra.staticDtElemenw-form">DtElemenw-formra.staticDtElemenw-formmd.txt">md.txt p/spetk p!-- --k rel=tytypspettid=".r._priar" rel=tyty k typcode aargs,="+priar=DtElemenw-formmd.txt"ethod)?m" } i"tid="priar_codenk ty butts,f/javassubmii"tclass="priar"k rel=ty l=tytypimgstatic/js/lxrng-fn.pnpriar="imagalt="Priar"k rel=tyl=tytyp/butts,k typ/codek rel=tytyp/spetk rel=tytypspettid=".r._save" rel=tyty k typcode aargs,="+save=DtElemenw-formmd.txt"ethod)?m" } i"tid="save_codenk ty butts,f/javassubmii"tclass="save"k rel=ty l=tytypimgstatic/js/lxrng-fn.pnsave="imagalt="Save"k rel=tyl=tytyp/butts,k typ/codek rel=tytyp/spetk rel=typ/spetk rel=typmentclass=".r._emeunk pspettclass=".r._versfornk typa. ty .static/c8.4/"> 3/DtElemenw-formmd.txtnk ty imgstatic/js/lxrng-fn.pnlefr="imagalt="<<> ak typcode aargs,="DtElemenw-formmd.txt"ethod)?m"ByInk ty spettid="ver_| elemnk ty s elemd='+i="v"tid="v"t onandleR="uphise_versfor); } t '.linux.no/linux+v3.8.4/"> 't '.4/">'t ''t 'DtElemenw-formmd.txt');"k re oprgs,f[i]; }"v4.10" tyk rev4.10 .6.3[i]/spaprg [i]/formrg [i]a .6.3[i href="../linux+v3.8.5/Documenta op/md.txt">.6.3[i]img src="../.sta c/gfx/right.png" alt=">>">.6]/spaprg.6]spap class="lxr_search">.6.3
.6.3[i]input typ.20hidden" nam.20navtarget" 6.32.20">.6.3[i]input typ.20text" nam.20search" id20search">.6.3[i]buttv2.typ.20submit">Search.6.3[iPrefsg [i]/a>.6]/spaprg.3[i i]/divrg.3[i i]form ac op="ajax+*" method="post" onsubmit="return false;">.6]input typ.20hidden" nam.20ajax_lookup" id20ajax_lookup" 6.32.20">..3[i i]/formrg..3[i i]div class="headingbottvm">i i1]/a>Tools that manage md devices cap be found at i i2]/a> [i]a href="http://www.kernel.org/pub/linux/utils/raid/ ">http://www.kernel.org/pub/linux/utils/raid/ ]/a>.i i3]/a>.i i4]/a>.i i5]/a>Boot time assembly of RAID arrays.i i6]/a>---------------------------------.i i7]/a>.i i8]/a>You cap boot with your md device with the following kernel command.i i9]/a>lines:.i " ta>.i 11]/a>for old raid arrays without persistent superblocks:.i 12]/a> [md=<md device no.>,<raid level>,<chunk size fac or>,<fault level>,dev0,dev1,...,devn.i 13]/a>.i 14]/a>for raid arrays with persistent superblocks.i 15]/a> [md=<md device no.>,dev0,dev1,...,devn.i 16]/a>or, to assemble a parti opable array:.i 17]/a> [md=d<md device no.>,dev0,dev1,...,devn.i 18]/a> [.i 19]/a>md device no. = the number of the md device ...[.i 20]/a> [iiiiiiiiiiii0 means md0,[.i 21]/a> [iiiiiiiiiiii1 md1,.i 22]/a> [iiiiiiiiiiii2 md2,.i 23]/a> [iiiiiiiiiiii3 md3,.i 24]/a> [iiiiiiiiiiii4 md4.i 25]/a>.i 26]/a>raid level = -1 linear mode.i 27]/a> [iiiiiiiiiiii0 striped mode.i 28]/a> [iiiiiiiiiiiiother modes are only supported with persistent super blocks.i 29]/a>.i 30]/a>chunk size fac or = (raid-0 and raid-1 only).i 31]/a> [iiiiiiiiiiiiSet the chunk size as 4k << n..i 32]/a> [iiiiiiiiiiii.i 33]/a>fault level = totally ignored.i 34]/a> [iiiiiiiiiiii [iiiiiiiiiiii.i 35]/a>dev0-devn: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1.i 36]/a> [iiiiiiiiiiii [iiiiiiiiiiii.i 37]/a>A possible loadlin line (Harald Hoyer <HarryH@Royal.Net>) looks like this:.i 38]/a>.i 39]/a>e:\loadlin\loadlin e:\zimage root=/dev/md0[md=0,0,4,0,/dev/hdb2,/dev/hdc3 ro.i 4 ta>.i 41 ta>.i 42]/a>Boot time autodetec op of RAID arrays.i 43]/a>--------------------------------------.i 44]/a>.i 45]/a>When md is compiled into the kernel (not as module), parti ops of.i 46]/a>typ. 0xfd are scanned and automa cally assembled into RAID arrays..i 47]/a>This autodetec op may be suppressed with the kernel param.ter.i 48]/a>"raid=noautodetec ". As of kernel /opr9, only drives with a typ. 0.i 49]/a>superblock cap be autodetec ed and run at boot time..i 5 ta>.i 51]/a>The kernel param.ter "raid=parti opable" (or "raid=part") means.i 52]/a>that all auto-detec ed arrays are assembled as parti opable..i 53]/a>.i 54]/a>Boot time assembly of degraded/dirty arrays.i 55]/a>-------------------------------------------.i 56]/a>.i 57]/a>If a raid5 or raid6 array is both dirty and degraded, it could have.i 58]/a>undetec able data corru op. This is because the fac that it is.i 59]/a>'dirty' means that the parity cannot be trusted, and the fac that it.i 6 ta>is degraded means that some datablocks are missing and cannot reliably.i 61]/a>be recopstruc ed (due to no parity)..i 62]/a>.i 63]/a>For this reason, md will normally refuse to start such an array. This.i 64]/a>requires the sysadmin to take ac op to explicitly start the array.i 65]/a>despite possible corru op. This is normally done with.i 66]/a> [imdadm --assemble --force .....i 67]/a>.i 68]/a>This ; }"v2.is not really available if the array has the root.i 69]/a>filesystem v2.it. Ip order to support this booting from such an.i 7 ta>array, md supports a module param.ter "start_dirty_degraded" which,.i 71]/a>when set to 1, bypassed the checks and will allows dirty degraded.i 72 ta>arrays to be started..i 73]/a>.i 74]/a>So, to boot with a root filesystem vf a dirty degraded raid[56], use.i 75]/a>.i 76]/a> [imd-mod.start_dirty_degraded=1.i 77]/a>.i 78]/a>.i 79]/a>Superblock formats.i 80]/a>------------------.i 81 ta>.i 82]/a>The md driver cap support a variety of different superblock formats..i 83]/a>Currently, it supports superblock formats "0.90.0" and the "md-1" format.i 84]/a>introduced in the 2.5 development series..i 85]/a>.i 86]/a>The kernel will autodetec which format superblock is being used..i 87]/a>.i 88]/a>Superblock format '0' is trea ed differently to others for legacy.i 89]/a>reasons - it is the original superblock format..i 9 ta>.i 91 ta>.i 92]/a>General Rules - apply for all superblock formats.i 93]/a>------------------------------------------------.i 94]/a>.i 95]/a>An array is 'crea ed' by writing appropria e superblocks to all.i 96]/a>devices..i 97]/a>.i 98]/a>It is 'assembled' by associa ing each of these devices with an.i 99]/a>particular md virtual device. Once it is completely assembled, it can.i100]/a>be accessed..i101 ta>.i102]/a>An array should be crea ed by a user-space tool. This will write.i103]/a>superblocks to all devices. It will usually mark the array as.i104]/a>'unclean', or with some devices missing so that the kernel md driver.i105]/a>cap crea e appropria e redundancy (copying in raid1, parity.i106]/a>calcula}"v2.in raid4/5)..i107]/a>.i108]/a>When an array is assembled, it is first initialized with the.i109]/a>SET_ARRAY_INFO ioctl. This contains,.in particular, a major and minor.i1" ta>versiv2.number. The major versiv2.number selects which superblock.i111]/a>format is to be used. The minor.number might be used to tune handling.i112]/a>of the format, such as sugges ing where on each device to look for the.i113]/a>superblock..i114]/a>.i115]/a>Then each device is added using the ADD_NEW_DISK ioctl. This.i116]/a>provides,.in particular, a major and minor.number identifying the.i117]/a>device to add..i118]/a>.i119]/a>The array is started with the RUN_ARRAY ioctl..i12 ta>.i121]/a>Once started, new devices cap be added. They should have an.i123]/a>ADD_NEW_DISK..i124]/a>.i125]/a>Devices that have failed or are not yet ac ve cap be detached from an.i126]/a>array using HOT_REMOVE_DISK..i127]/a>.i128]/a>.i129]/a>Specific Rules that apply to format-0 super block arrays, and.i130]/a> [iiiiiarrays with no superblock (non-persistent)..i131]/a>-------------------------------------------------------------.i132]/a>.i133]/a>An array cap be 'crea ed' by describing the array (level, chunksize.i134]/a>etc) in a SET_ARRAY_INFO ioctl. This must has major_versiv2==0 and.i135]/a>raid_disks != 0..i136]/a>.i137]/a>Then uninitialized devices cap be added with ADD_NEW_DISK. The.i138]/a>struc ure passed to ADD_NEW_DISK must specify the sta e of the device.i139]/a>and its role in the array..i14 ta>.i141]/a>Once started with RUN_ARRAY, uninitialized spares cap be added with.i142]/a>HOT_ADD_DISK..i143]/a>.i144]/a>.i145]/a>.i146]/a>MD devices in sysfs.i147]/a>-------------------.i148]/a>md devices appear in sysfs (/sys) as regular block devices,.i149]/a>e.g..i150]/a> [i/sys/block/md0.i151 ta>.i152]/a>Each 'md' device will contain a subdirec ory called 'md' which.i153]/a>contains further md-specific informativ2.about the device..i154]/a>.i155]/a>All md devices contain:.i156]/a> [level.i157]/a> [iiia text file indica ing the 'raid level'. e.g. raid0, raid1,.i158]/a> [iiiraid5, linear, multipath, faulty..i159]/a> [iiiIf no raid level has been set yet (array is still being.i160]/a> [iiiassembled), the 6.32. will reflec wha ever has been written.i161]/a> [iiito it, which may be a nam. like the.above, or may be a number.i162]/a> [iiisuch as '0', '5', etc..i163]/a>.i164]/a> [raid_disks.i165]/a> [iiia text file with a simple.number indica ing the number of devices.i166]/a> [iiiin a fully func opal array. If this is not yet known, the file.i167]/a> [iiiwill be empty. If an array is being resized this will contain.i168]/a> [iiithe new number of devices..i169]/a> [iiiSome raid levels allow this 6.32. to be se while the array is.i170]/a> [iiiac ve. This will recopfigure the array.iiiOtherwise it can only.i171]/a> [iiibe se while assembling an array..i172]/a> [iiiA change to this attribute will not be permitted if it would.i173]/a> [iiireduce the size of the array.iiToireduce the number of drives.i174]/a> [iiiin an e.g. raid5, the array size must first beireduced by.i175]/a> [iiise ing the 'array_size' attribute..i176]/a>.i177]/a> [chunk_size.i178]/a> [iiiThis is the size in bytes for 'chunks' and is only relevant to.i179]/a> [iiiraid levels that involve striping (0,4,5,6,10). The address space.i180]/a> [iiiof the array is conceptually divided into chunks and consecu ve.i181]/a> [iiichunks are striped onto neighbouring devices..i182]/a> [iiiThe size should be at least PAGE_SIZE (4k) and should be a power.i183]/a> [iiiof 2. This can onlyibe se while assembling an array.i184]/a>.i185]/a> [layout.i186]/a> [iiiThe "layout" for the array for the particular level. This is.i187]/a> [iiisimply a number that is interpret ed differently by different.i188]/a> [iiilevels. It cap be written while assembling an array..i189]/a>.i190]/a> [array_size.i191]/a> [iiiThis cap be used to artificially copstrain the available space in.i192]/a> [iiithe array to be less tha2.is ac ually available on the combined.i193]/a> [iiidevices. Writing a number (in Kilobytes) which is less tha2.i194]/a> [iiithe available size will set the size. Any recopfigurativ2.of the.i195]/a> [iiiarray (e.g. adding devices) will not cause the size to change..i196]/a> [iiiWriting the word 'default' will cause the effec ve size of the.i197]/a> [iiiarray to be wha ever size is ac ually available based on.i198]/a> [iii'level', 'chunk_size' and 'component_size'..i199]/a>.i200]/a> [iiiThis cap be used to reduce the size of the array beforeireducing.i201]/a> [iiithe number of devicesiin a raid4/5/6, or to support external.i202]/a> [iiimetadata formats which manda e such clipping..i203]/a>.i204]/a> [reshape_posi op.i205]/a> [iiiThis is either "none" or a sec or number within the devicesiof.i206]/a> [iiithe array where "reshape" is up to. If this is set, the three.i207]/a> [iiiattributes ment oped above (raid_disks,[chunk_size,[layout) can.i208]/a> [iiipotentially have 2 6.32.s, an old and a new 6.32.. If these.i209]/a> [iii6.32.s differ, reading the attribute returns.i210]/a> [iiiiiinew (old).i211]/a> [iiiand writing will effec the 'new' 6.32., leaving the 'old'.i212]/a> [iiiunchanged..i213]/a>.i214]/a> [component_size.i215]/a> [iiiFor arrays with data redundancy (i... not raid0, linear, faulty,.i216]/a> [iiimultipath), all components must be the sam. size - or at least.i217]/a> [iiithere must a size that they all provide space for. This is a key.i218]/a> [iiipart or the geometry of the array.iiIt is measured in sec ors.i219]/a> [iiiand cap be read from here. Writing to this 6.32. may resize.i220]/a> [iiithe array if the persopality supports it (raid1, raid5, raid6),.i221]/a> [iiiand if the component drives are large enough..i222]/a>.i223]/a> [metadata_versiv2.i224]/a> [iiiThis indica es the format that is being used to record metadata.i225]/a> [iiiabout the array.iiIt cap be 0.90 (tradi opal format), 1.0, 1.1,.i226]/a> [iii1.2 (newer format i2.6.rying loca ops) or "none" indica ing that i227]/a> [iiithe kernel isn't managing metadata at all..i228]/a> [iiiAlternately it cap be "external:" followed by a string which.i229]/a> [iiiis set by user-space.iiThis indica es that metadata is managed.i230]/a> [iiiby a user-space program. Any device failure or other event that i231]/a> [iiirequires a metadata upda e will cause array ac vity to be i232]/a> [iiisuspended until the event is acknowledged..i233]/a>.i234]/a> [resync_start.i235]/a> [iiiThe point a which resync should start.iiIf no resync is needed,.i236]/a> [iiithis will be a very large number (or 'none' since /opr30-rc1). At.i237]/a> [iiiarray crea iv2.it will default to 0, though starting the array as.i238]/a> [iii'clean' will set it much larger..i239]/a>.i240]/a> [inew_dev.i241]/a> [iiiThis file cap be written but not read. The 6.32. written should.i242]/a> [iiibe a block device number as major:minor. e.g. 8:0.i243]/a> [iiiThis will cause tha device to be attached to the array, if it is.i244]/a> [iiiavailable. It will then appear at md/dev-XXX (depending on the.i245]/a> [iiinam. of the device) and further copfigurativ2.is then possible..i246]/a>.i247]/a> [isafe_mode_delay.i248]/a> [iiiWhen an md array has seen no writeirequests for a certain period.i249]/a> [iiiof time,.it will be marked as 'clean'.iiWhen another write.i250]/a> [iiirequest arrives, the array is marked as 'dirty' beforeithe write.i251]/a> [iiicommences. This is known as 'safe_mode'..i252]/a> [iiiThe 'certain period' is controlled byithis file which stores the.i253]/a> [iiiperiod as a number of secopds. The default is 200msec (0.200)..i254]/a> [iiiWriting a 6.32. of 0 disablesisafemode..i255]/a>.i256]/a> [[array_sta e.i257]/a> [iiiThis file contains a single word which describes the current.i258]/a> [iiista e of the array.iiIp many cases, the sta e cap be set by.i259]/a> [iiiwriting the word for the desired sta e, however some sta es.i260]/a> [iiicannot be explicitly set, and some transi ops are not allowed..i261 ta>.i262]/a> [iiiSelect/poll works on this file. All changes except between.i263]/a> [iiiiiiac ve_idle and ac ve (which cap be frequent and are not.i264]/a> [iiiiiivery interes ing) are notified. ac ve->ac ve_idle is.i265]/a> [iiiiiireported if the metadata is externally managed..i266]/a>.i267]/a> [iiiclear.i268]/a> [iiiiiiiNo devices, no size,[no level.i269]/a> [iii[iiiWriting is equi6.3ent to STOP_ARRAY ioctl.i270]/a> [iiiinac ve.i271]/a> [iiiiiiiMay have some se ings, but array is not ac ve.i272]/a> [iiiiiiiiiiall IO resultsiin error.i273]/a> [iiiiiiiWhen written, doesn't tear down array, but just stops it.i274]/a> [iiisuspended (not supported yet).i275]/a> [iiiiii All IO requests will block. The array cap be recopfigured..i276]/a> [iii[iiiWriting this, if accepted, will block until array is quiessent.i277]/a> [iiireadonly.i278]/a> [iiiiiiino resync cap happep. no superblocks ge written..i279]/a> [iii[iiiwriteirequests fail.i280]/a> [iiiread-auto.i281]/a> [iiiiiiilike readonly, but behaves like 'clean' v2.aiwriteirequest..i282]/a>.i283]/a> [iiiclean - no pending writes, but otherwise ac ve..i284]/a> [iiiiiiiWhen writtenito inac ve array, starts without resync.i285]/a> [iiiiii If a writeirequest arrives then.i286]/a> [iiiiiiiiiif metadata is known, mark 'dirty' and switch to 'ac ve'..i287]/a> [iiiiiiiiiif not known, block and switch to write-pending.i288]/a> [iiiiii If writtenito an ac ve array that has pending writes, then fails..i289]/a> [iiiac ve.i290]/a> [iiiiii fully ac ve: IO and resync cap be happeping..i291]/a> [iiiiiiiWhen writtenito inac ve array, starts with resync.i292]/a>.i293]/a> [iiiwrite-pending.i294]/a> [iiiiiiiclean, but writes are blocked waiting for 'ac ve' to be written..i295]/a>.i296]/a> [iiiac ve-idle.i297]/a> [iiiiiiilike ac ve, but no writes have been seen for a while (safe_mode_delay)..i298]/a>.i299]/a> [bitmap/loca op.i300]/a> [iiiThis indica es where the write-intent bitmap for the array is.i301]/a> [iiistored..i302]/a> [iiiIt cap be one of "none", "file" or "[+-]N"..i303]/a> [iii"file" may later be extended to "file:/file/nam.".i304]/a> [iii"[+-]N" means that many sec ors from the start of the metadata..i305]/a> [iiiiiThis is replica ed v2.all devices. For arrays with externally.i306]/a> [iiiiimanaged metadata, the offset is from the beginning of the.i307]/a> [iiiiidevice..i308]/a> [bitmap/chunksize.i309]/a> [iiiThe size, in bytes, of the chunk which will be represented by a.i310]/a> [iiisingle bit. For RAID456, it is a portiv2.of a2.individual.i311]/a> [iiidevice. For RAID10, it is a portiv2.of the array.iiFor RAID1, it.i312]/a> [iiiis both (they come to the sam. thing)..i313]/a> [bitmap/time_base.i314]/a> [iiiThe time,.in secopds, between looking for bitsiin the bitmap to.i315]/a> [iiibe cleared. In the current implementa op, a bit will be cleared.i316]/a> [iiibetween 2 and 3 times "time_base" after all the covered blocks.i317]/a> [iiiare known to be in-sync..i318]/a> [bitmap/backlog.i319]/a> [iiiWhen write-mostly devices are ac veiin a RAID1, writeirequests.i320]/a> [iiito those devices proceed in the background - the filesystem (or.i321]/a> [iiiother user of the device) does not have to wait for them..i322]/a> [iii'backlog' sets a limit on the number of concurrent background.i323]/a> [iiiwrites. If there are moreithan this, new writes will by.i324]/a> [iiisynchronous..i325]/a> [bitmap/metadata.i326]/a> [iiiThis cap be either 'internal' vr 'external'..i327]/a> [iii'internal' is the default and means theimetadata for the bitmap.i328]/a> [iiiis stored in the first 256 bytes of the alloca ed space and is.i329]/a> [iiimanaged by the md module..i330]/a> [iii'external' means that bitmap metadata is managed externally to.i331]/a> [iiithe kernel (i... by some userspace program).i332]/a> [bitmap/can_clear.i333]/a> [iiiThis is either 'true' vr 'false'.iiIf 'true', then bitsiin the.i334]/a> [iiibitmap will be cleared when the corresponding blocks areithought.i335]/a> [iiito be in-sync.iiIf 'false', bitsiwill never be cleared..i336]/a> [iiiThis is automatically set to 'false' if a writeihappeps on a.i337]/a> [iiidegraded array, vr if the array becomesidegraded during a write..i338]/a> [iiiWhen metadata is managed externally, it should be set to true.i339]/a> [iiionce the array becomesinon-degraded, and this fac has been.i340]/a> [iiirecorded in the metadata..i341]/a> [iii.i342]/a> [iii.i343]/a> [iii.i344]/a>.i345]/a>As component devices are added to an md array, they appear in the 'md'.i346]/a>direc ory as new direc oriesinam.d.i347]/a> [iiiidev-XXX.i348]/a>where XXX is a nam. that the kernel knows for the device, e.g. hdb1..i349]/a>Each direc ory contains:.i35 ta>.i351]/a> [iii block.i352]/a> [iiiiiiaisymlink to the block device in /sys/block, e.g..i353]/a> [iiiiiiiiiii/sys/block/md0/md/dev-hdb1/block -> ../../../../block/hdb/hdb1.i354]/a>.i355]/a> [iiiisuper.i356]/a> [iiiiiiA file containing an image of the superblock read from, vr.i357]/a> [iiiiiiwrittenito, tha device..i358]/a>.i359]/a> [iii sta e.i360]/a> [iiiiiiA file recording the current sta e of the device in the array.i361]/a> [iiiiiiwhich cap be aicomma separa ed listiof.i362]/a> [iiiiiiiiii faultyi - device has been kicked from ac veiuse d2. to.i363]/a> [iiiiiiiiiiiiiiiiiiiiiiia detec ed fault, vr i has unacknowledged bad.i364]/a> [iiiiiiiiiiiiiiiiiiiiiiiblocks.i365]/a> [iiiiiiiiiiiiin_sync - device is a fully in-sync member of the array.i366]/a> [iiiiiiiiiiiiwritemostly - device will onlyibe subjec to read.i367]/a> [iiiiiiiiiiiiiiiiiiiiiiirequests if there are noiother op ops..i368]/a> [iiiiiiiiiiiiiiiiiiiiiiiThis appliesionlyito raid1 arrays..i369]/a> [iii[iiiiiiiiblocked - device has failed, and the failure hasn't been.i370]/a> [iiiiiiiiiiiiiiiiiiiiiiiacknowledged yet by theimetadata handler..i371]/a> [iiiiiiiiiiiiiiiiiiiiiiiWrites tha would writeito this device if.i372]/a> [iiiiiiiiiiiiiiiiiiiiiiiit were not faultyiare blocked..i373]/a> [iiiiiiiiiiiispareiiii- device is working, but not a full member..i374]/a> [iiiiiiiiiiiiiiiiiiiiiiiThis includes spares that are in the process.i375]/a> [iiiiiiiiiiiiiiiiiiiiiiiof being recovered to.i376]/a> [iiiiiiiiiiiiwrite_error - device has ever seen a writeierror..i377]/a> [iiiiiiiiiiiiwant_replacementi- device is (mostly) working but probably.i378]/a> [iiiiiiiiiiiiiiiiiiiiiiishould be replaced, either d2. toierrors vr.i379]/a> [iii[iiiiiiiiiiiiiiiiiiid2. toiuser request..i380]/a> [iiiiiiiiiiiireplacementi- device is aireplacementifor another ac ve.i381]/a> [iiiiiiiiiiiiiiiiiiiiiiidevice with sam. raid_disk..i382]/a>.i383]/a>.i384]/a> [iiiiiiThis listimay grow in fu ure..i385]/a> [iiiiiiThis cap be writtenito..i386]/a> [iiiiiiWriting "faulty" isimula es a failure on the device..i387]/a> [iiiiiiWriting "remove" removes the device from the array..i388]/a> [iiiiiiWriting "writemostly" sets the writemostly flag..i389]/a> [iiiiiiWriting "-writemostly" clears the writemostly flag..i390]/a> [iiiiiiWriting "blocked" sets the "blocked" flag..i391]/a> [iiiiiiWriting "-blocked" clears the "blocked" flags and allows writes.i392]/a> [iiiiiiiiiiiiiito complete and possiblyisimula es anierror..i393]/a> [iiiiiiWriting "in_sync" sets the in_sync flag..i394]/a> [iiiiiiWriting "write_error" sets writeerrorseen flag..i395]/a> [iiiiiiWriting "-write_error" clears writeerrorseen flag..i396]/a> [iiiiiiWriting "want_replacement" is allowed at any time except to a.i397]/a> [iiiiiiiiiiiiiireplacementidevice or a spare.iiIt sets the flag..i398]/a> [iiiiiiWriting "-want_replacement" is allowed at any time.iiIt clears.i399]/a> [iii[iiiiiiiiiithe flag..i400]/a> [iiiiiiWriting "replacement" or "-replacement" is onlyiallowed before.i401]/a> [iiiiiiiiiiiiiistarting the array.iiIt sets or clears the flag..i402]/a>.i403]/a>.i404]/a> [iiiiiiThis file responds to select/poll. Any change to 'faulty'.i405]/a> [iiiii vr 'blocked' causes anievent..i406]/a>.i407]/a> [iiiierrors.i408]/a> [iiiiiiAn approxima e count of read errors that have been detec ed op.i409]/a> [iii[iithis device but have not caused the device to be evicted from.i410]/a> [iiiiiithe array (either because they were correc ed or because they.i411]/a> [iiiiiihappeped while the array wasiread-only). When using versiv2-1.i412]/a> [iiiiiimetadata, this 6.32. persists across restarts of the array..i413]/a>.i414]/a> [iiiiiiThis 6.32. cap be written while assembling an array thus.i415]/a> [iiiii providing an ongoing count for arrays with metadata managed by.i416]/a> [iiiiiiuserspace..i417]/a>.i418]/a> [iii slot.i419]/a> [iiiiiiThis gives the rol. that the device has in the array. It will.i420]/a> [iiiiiieither be 'none' if the device is not ac ve in the array.i421]/a> [iiiiii(i... is aispareior has failed) or a2.integer less tha2.the.i422]/a> [iiiiii'raid_disks' number for the array indica ing which posi op.i423]/a> [iiiiiiit currently fills. This can onlyibe se while assembling an.i424]/a> [iiiiiiarray. A device for which this is set is assumed to be working..i425]/a>.i426]/a> [iii offset.i427]/a> [iiiiiiThis gives the loca op in the device (in sec ors from the.i428]/a> [iiiiiistart) where data from the array will be stored. Any part of.i429]/a> [iiiiiithe device beforeithis offset us not touched, unless it is.i430]/a> [iiiiiiused for storing metadata (Formats 1.1 and 1.2)..i431 ta>.i432]/a> [iii size.i433]/a> [iiiiiiThe amount of the device, after the offset, tha cap be used.i434]/a> [iiiiiifor storage of data.iiThis will normallyibe the sam. as the.i435]/a> [iiiii component_size.iiThis cap be writteniwhile assembling an.i436]/a> [iiiiiiarray. If a 6.32. less tha2.the current component_size is.i437]/a> [iiiiiiwritten,.it will be rejec ed..i438]/a>.i439]/a> [iii recovery_start.i440]/a> [iiiiiiWhen the device is not 'in_sync', this records the number of.i441]/a> [iiiiiisec ors from the start of the device which are known to be.i442]/a> [iiiii correc .iiThis is normallyizero, but during a recovery.i443]/a> [iiiiiiopera op is will steadily increase,iand if the recovery is.i444]/a> [iiiiiiinterrupted, restoring this 6.32. cap cause recovery to.i445]/a> [iiiii avoid repeating the earlier blocks. With v1.ximetadata, this.i446]/a> [iiiiii6.32. is saved and restored automatically..i447]/a>.i448]/a> [iiiiiiThis cap be set whenever the device is not an ac ve member of.i449]/a> [iiiiiithe array, either beforeithe array is ac vated, or before.i450]/a> [iiiiiithe 'slot' is set..i451 ta>.i452]/a> [iiiiiiSe ing this to 'none' is equi6.3ent to se ing 'in_sync'..i453]/a> [iiiiiiSe ing to any other 6.32. also clears the 'in_sync' flag..i454]/a> [iiiiii.i455]/a> [iiiibad_blocks.i456]/a> [iiiiiiThis gives the listiof all known bad blocks in the form of.i457]/a> [iiiiiistart address and 3ength (in sec ors respec vely). If output.i458]/a> [iiiiiiis too big to fitiin a page,.it will be trunca ed.iWriting.i459]/a> [iiiiii"sec or 3ength" to this file adds new acknowledged (i....i460]/a> [iiiiiirecorded to diskisafely) bad blocks..i461 ta>.i462]/a> [iiiiunacknowledged_bad_blocks.i463]/a> [iiiiiiThis gives the listiof known-but-not-yet-saved-to-diskibad..i462]/a>alass="line" nam.205tmd.t2i- d6" id20L366" claquot;iiiiiThis ghen writss="line" m.20L44m. nam.20L4 [iii device is (mostly) working but pr4 read. [inam.20iiirecorded to diskisafely) bad blotput.i43rays..i24 been.i34dler..i366]/a> [/a> [i" nam..20L4e" rea> [e49" be set">i366350" class="line" nam.20L350">i34d ta>.i41mber..i41m"lin461" ref="Documenta op/md.tx4#L37547id20L425" class="line" nam.20L425">i42ed to.inumber f;none' if,e" nam.20L" nam0iiirecorded to diskisafely) bad blrror..i359]/a> [iii4c ve.i342]/a>.i343]/a>.i34 ure..i366ere XX8]/a>iiiiAn m.20L27m.20L4redundancy (1,4,5,6kernel (i... by some userspace pr4nito..i44rray.. [iiiT op isbui but not read. The 6.32. written 4flag.. [iiiTss="line" nam0L349">i349]/a>Each direc ory con4flag..i375]/aalciiiiid3]/a> [ de="liL349">i349]/a>Each direc ory con4fisk..i349]/a>Each direc ory con4f]/a>.i375bui itemostg &ququot; is allowed at any time excep4flag../mishile ">i366350" class="line" nam.20L350">i34flag.. [iLclaii fully 350" class="line" nam.20L350">i34fito..i408dundancy 1]/a> [iii[m.20L44arlier blocks. With v1.ximetadata, to a. [iritinL287">i287]checkrlier blocks. With v1.ximetadata, ray.. [L4 fulass="lo[iiiiiilier blocks. With v1.ximetadata, lag.. [ii nam]/a> [iii[m.2iiiiiiiirecorded to diskisafely) bad b5f2ag..i35'.i25i[iiiie49" /a> [iiit44">iiiiAn c8">i378354" class="line" nam.20L354">i35&639;.areL424">roceedpiirecorded to diskisafely) bad b5f739;.i45rrors.i45r9ors. [i&ount acementii290]//upted, renam.ss="lina> [iiiiii6.3447" class="line" nam.20L447">i45 from.i355]/a> [iii5 they.i the devi wilimetadaiiiiiirecorded to diskisafely) bad b5rray.. [iiibitmap wss="line" nfref21alass= fud proving to ng)her 6piirecorded to diskisafely) bad b5i4ag..i360]/a> [iiiiiTng to ng)her 6piirecorded to diskisafely) bad b5i639;.i45pace..i404]/a> [iiie datim0L27aarrais filnone>i453406" class="line" nam.20L406">i45prors.i311]0L4[iiiii So[i.20L31e>i453mm.20L4rieffor s406" class="line" nam.20L406">i45p9ors.i ss="li406" class="line" nam.20L406">i45 will.mber f;quot;file20ted, eplaceme device 406" class="line" nam.20L406">i45 they.mber f;awiiiiipiirecorded to diskisafely) bad b52.the.i35i op.i35i4ag..i4[iii'backl">i366eriii>i424]/ai406" class="line" nam.20L406">i45 thus. [iii]/a>howing to0is eitheA406" class="line" nam.20L406">i45 639;.i28.20L44howing to1]/a> [ietc 406" class="line" nam.20L406">i45 ace..i404]/a> [i,nam.2/a> [iii.orade> [iii406" class="line" nam.20L406">i45 rors. 408">i4mishile ">i366am.20L4t44ggs=/a> [iiiii vr 'blocked' causes ani5rt of.i25it is.i25ithey.i392]/a> [iw> [iiiiii If a writeirequest arrive51 ta>. [iiiiiiAn abeforeithe array is ac vated, or 5 size. 408"i33ed to isiiich_>nm.20L450">[iii'backl> [iiiiforeithe array is ac vated, or 5 4ag..eriire-ss="line"ora(clean, buiheckiif m)a> [iiiapproximaforeithe array is ac vated, or 5 thus. [iiiien the mor st [iiir436]/a> [i'backl beual]lass="line" nam.20L407">i407]/a> [iiii5ze is.i4[iii'backl> [iiiiiocumenta i vr 'blocked' causes ani5c ed..i458]/a>.i45start.i337]/a">i4aii300]/a> [iiiThis ivr 'wroceed in the 438" class="line" nam.20L438">i45sthey. [iiineeie" naheck 4]/a> [iiibitmap will be. Em.20L4. For RAID456, it is a portiv2.of a2.indi5overy.i39air">i435]/a> [iiiitheMultiplii'b 438" class="line" nam.20L438">i45s4ag.. f theline" nam.20L416">i416]/a> [iiiiiiuser5ry to.i419]/a'biianam id20opd0L422">i422]iiiw">i440]/ill b0L422">i422]i nam.20L416">i416]/a> [iiiiiiuser5r639;. en metadatacal="line" naThis i_s="line" nam.20L416">i416]/a> [iiiiiiuser5re is.i457]/a>.i457]/a>.i45efore.i/iiii/speei_i322]_{ko ,kax}447" class="line" nam.20L447">i45ethey.i448]/yt"ppiiiiiieca inam.ciiir 6.32. persists across restarts of the 51 ta>.i453m62]/a> [im.20L385">iecaiiiicklra op 7]/a>line" procselect/poll. Any change to 'fault5#39;..ideviishould start.iiIf no resync is n5fy to.i360]/uot;be set>i453406" class="line" nam.20L406">i45locks. [iiiiiiWri( proc)0]/a> [depetmap wsii ce.20L4.eithis offset us not touched, unless5rm of.iiii4 proc-wideass="lishould start.iiIf no resync is n5f]/a>.i35iting.i35(i....[iii'backl> [iiiiiiiAn approxima am.20L39[stiof all known bad blocks in the f5ocks..i448]/a>i360]/a>clas be f is,ea> or &quoyos not 'in_sync', this records the num51 ta>. [iiiiiocutotaliiiAn c8">i3neeie" nb.2iThis ie roThe4twi447" class="line" nam.20L447">i45locks. f theselec/0L422"p be effrt addres4howap wsi3406" class="line" nam.20L406">i45kibad..A>line" 404]/her 6.o> the att44i nii.20L4return4">i33i290]/aam.20L39s should start.iiIf no resync is n5>i462]/a>5lass="line" nam.205tmd.t5i- d65 id20L366" ws="l311re49"L31e>i360]/a>claskax (beor )2">i392]/a> [ia8239" class="line" nam.20L239">i25 read..i45rays..i45 been. [iiid,n-sync.de> [iii roThe4a> [iiow flag.kaxselect/poll. Any change to 'fault5cked..i25 nam.20L22]ishould start.iiIf no resync is n5mber..i35m"lin461"5ref="Documenta op/md.tx5#L37557id20L425" class="line" nam.20L425">i45ed to.i45eread.[iii>i360]/a beual]speei,9;r K/> [, >i4[iii>i360]/425" class="line" nam.20L425">i45e]/a>.clas be fplacemiiityncing co>i448]/aDoct 30 nam.203ishould start.iiIf no resync is n5rays..i25uest..i45c ve.i45c ta>. [is,eine"ns="li#39;biiifa> [iiiien;raid_dam.2rs fi447" class="line" nam.20L447">i45cked..i45cber..i45nito..i45nror..i45rray.. [is,eine"ns="li#39;biiifa> [iiiien;raid_dam.2rs fi447" class="line" nam.20L447">i45cays..i45flag.. [iher 6.o> ss="linclasam.20L39[9">i459]/awai5]/a>should start.iiIf no resync is n5fked.. [iii406" class="line" nam.20L406">i45flag..clas be ft;fileishould start.iiIf no resync is n5fure..i45fito..i45 to a.i366]nam./a> [L4i288tt44i ni> [iecific5">ieca406" class="line" nam.20L406">i45 ray..iecatim0leiIf no re >i4[iiimoduii&iida> u but not read. The 6.32. written 6flag..i46f2ag..i46f3ag..i46f4ag..i360]/uotiiii5 &quokernel (i... by some userspace pr6'.nt44ea ed.iWritt44pe c49"Li" class="litin>i25i[bgth (in sec ors respec vely). If 6&639;.i360]/uotiiii5 &quokernel (i... by some userspace pr6&839;.nt44ea ed.iWritt44pe c49"Lernel (i... by some userspace pr6&939;. [ii44">ipre08]/mm.20L437iypocug count for arrays with metadata mana6 they. [ii4eipre08]/appForafairns iideds tohis offset us not touched, unless6iv2-1.i1.lass="line" nam.200sdis>i25 niypocul b> 408ze.iiTbut not read. The 6.32. written 6rray.. [ii4esipre08]/mtt44pes9]/awai5]408zlitinLarei-wid]/a>t44pe-ut not read. The 6.32. written 6r4ag.. [isiiiii004">it44pe_c49"L 6.32ishould start.iiIf no resync is n6 thus. cle4original LXR softwiiiiiyos nohould stahttp://sourcer bge.net/iThi437s/lxr">LXR am.muniayd20Len the ex0eiiiIf nl the arriiyohould stamailto:lxr@ntaux.no">lxr@ntaux.nod20L. lxr.ntaux.no k;rauothoi[m.2iiihould stahttp://www.redp.20-ntaiTh.no">Redp.20 LtaiTh ASd20Lenss="li;backlLtauxli" sultie.iiTbwss="line"">i4ri366amsi37e 1995.