~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/device-mapper/dm-raid.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/device-mapper/dm-raid.rst (Version linux-6.12-rc7) and /Documentation/admin-guide/device-mapper/dm-raid.rst (Version linux-4.18.20)


  1 =======                                           
  2 dm-raid                                           
  3 =======                                           
  4                                                   
  5 The device-mapper RAID (dm-raid) target provid    
  6 It allows the MD RAID drivers to be accessed u    
  7 interface.                                        
  8                                                   
  9                                                   
 10 Mapping Table Interface                           
 11 -----------------------                           
 12 The target is named "raid" and it accepts the     
 13                                                   
 14   <raid_type> <#raid_params> <raid_params> \      
 15     <#raid_devs> <metadata_dev0> <dev0> [.. <m    
 16                                                   
 17 <raid_type>:                                      
 18                                                   
 19   ============= ==============================    
 20   raid0         RAID0 striping (no resilience)    
 21   raid1         RAID1 mirroring                   
 22   raid4         RAID4 with dedicated last pari    
 23   raid5_n       RAID5 with dedicated last pari    
 24                 Same as raid4                     
 25                                                   
 26                 - Transitory layout               
 27   raid5_la      RAID5 left asymmetric             
 28                                                   
 29                 - rotating parity 0 with data     
 30   raid5_ra      RAID5 right asymmetric            
 31                                                   
 32                 - rotating parity N with data     
 33   raid5_ls      RAID5 left symmetric              
 34                                                   
 35                 - rotating parity 0 with data     
 36   raid5_rs      RAID5 right symmetric             
 37                                                   
 38                 - rotating parity N with data     
 39   raid6_zr      RAID6 zero restart                
 40                                                   
 41                 - rotating parity zero (left-t    
 42   raid6_nr      RAID6 N restart                   
 43                                                   
 44                 - rotating parity N (right-to-    
 45   raid6_nc      RAID6 N continue                  
 46                                                   
 47                 - rotating parity N (right-to-    
 48   raid6_n_6     RAID6 with dedicate parity dis    
 49                                                   
 50                 - parity and Q-syndrome on the    
 51                   layout for takeover from/to     
 52   raid6_la_6    Same as "raid_la" plus dedicat    
 53                                                   
 54                 - layout for takeover from rai    
 55   raid6_ra_6    Same as "raid5_ra" dedicated l    
 56                                                   
 57                 - layout for takeover from rai    
 58   raid6_ls_6    Same as "raid5_ls" dedicated l    
 59                                                   
 60                 - layout for takeover from rai    
 61   raid6_rs_6    Same as "raid5_rs" dedicated l    
 62                                                   
 63                 - layout for takeover from rai    
 64   raid10        Various RAID10 inspired algori    
 65                 (see raid10_format and raid10_    
 66                                                   
 67                 - RAID10: Striped Mirrors (aka    
 68                 - RAID1E: Integrated Adjacent     
 69                 - RAID1E: Integrated Offset St    
 70                 - and other similar RAID10 var    
 71   ============= ==============================    
 72                                                   
 73   Reference: Chapter 4 of                         
 74   https://www.snia.org/sites/default/files/SNI    
 75                                                   
 76 <#raid_params>: The number of parameters that     
 77                                                   
 78 <raid_params> consists of                         
 79                                                   
 80     Mandatory parameters:                         
 81         <chunk_size>:                             
 82                       Chunk size in sectors.      
 83                       "stripe size".  It is th    
 84                       is placed first.            
 85                                                   
 86     followed by optional parameters (in any or    
 87         [sync|nosync]                             
 88                 Force or prevent RAID initiali    
 89                                                   
 90         [rebuild <idx>]                           
 91                 Rebuild drive number 'idx' (fi    
 92                                                   
 93         [daemon_sleep <ms>]                       
 94                 Interval between runs of the b    
 95                 clear bits.  A longer interval    
 96                 resyncing after a failure is l    
 97                                                   
 98         [min_recovery_rate <kB/sec/disk>]         
 99                 Throttle RAID initialization      
100         [max_recovery_rate <kB/sec/disk>]         
101                 Throttle RAID initialization      
102         [write_mostly <idx>]                      
103                 Mark drive index 'idx' write-m    
104         [max_write_behind <sectors>]              
105                 See '--write-behind=' (man mda    
106         [stripe_cache <sectors>]                  
107                 Stripe cache size (RAID 4/5/6     
108         [region_size <sectors>]                   
109                 The region_size multiplied by     
110                 logical size of the array.  Th    
111                 synchronisation state for each    
112                                                   
113         [raid10_copies   <# copies>], [raid10_    
114                 These two options are used to     
115                 a RAID10 configuration.  The n    
116                 specified, but the default is     
117                 variations to how the copies a    
118                 is "near".  Near copies are wh    
119                 respect to mirroring.  If thes    
120                 or 'raid10_copies 2' and/or 'r    
121                 then the layouts for 2, 3 and     
122                                                   
123                 ========         ==========       
124                 2 drives         3 drives         
125                 ========         ==========       
126                 A1  A1           A1  A1  A2       
127                 A2  A2           A2  A3  A3       
128                 A3  A3           A4  A4  A5       
129                 A4  A4           A5  A6  A6       
130                 ..  ..           ..  ..  ..       
131                 ========         ==========       
132                                                   
133                 The 2-device layout is equival    
134                 layout is what a traditional R    
135                 3-device layout is what might     
136                 Adjacent Stripe Mirroring'.       
137                                                   
138                 If 'raid10_copies 2' and 'raid    
139                 for 2, 3 and 4 devices are:       
140                                                   
141                 ========             =========    
142                 2 drives             3 drives     
143                 ========             =========    
144                 A1  A2               A1   A2      
145                 A3  A4               A4   A5      
146                 A5  A6               A7   A8      
147                 ..  ..               ..   ..      
148                 A2  A1               A3   A1      
149                 A4  A3               A6   A4      
150                 A6  A5               A9   A7      
151                 ..  ..               ..   ..      
152                 ========             =========    
153                                                   
154                 If 'raid10_copies 2' and 'raid    
155                 layouts for 2, 3 and 4 devices    
156                                                   
157                 ========       ==========         
158                 2 drives       3 drives           
159                 ========       ==========         
160                 A1  A2         A1  A2  A3         
161                 A2  A1         A3  A1  A2         
162                 A3  A4         A4  A5  A6         
163                 A4  A3         A6  A4  A5         
164                 A5  A6         A7  A8  A9         
165                 A6  A5         A9  A7  A8         
166                 ..  ..         ..  ..  ..         
167                 ========       ==========         
168                                                   
169                 Here we see layouts closely ak    
170                 Offset Stripe Mirroring'.         
171                                                   
172         [delta_disks <N>]                         
173                 The delta_disks option value (    
174                 device removal (negative value    
175                 value) to any reshape supporti    
176                 RAID levels 4/5/6 allow for ad    
177                 and data device tuple), raid10    
178                 allow for device addition. rai    
179                 reshaping at all.                 
180                 A minimum of devices have to b    
181                 which is 3 devices for raid4/5    
182                                                   
183         [data_offset <sectors>]                   
184                 This option value defines the     
185                 where the data starts. This is    
186                 reshaping space to avoid writi    
187                 changing the layout of stripes    
188                 may happen at any time without    
189                 E.g. when adding devices to an    
190                 forward reshaping, the out-of-    
191                 at the beginning of each raid     
192                 MD personalities supporting su    
193                 the existing first stripes (th    
194                 starting at data_offset to fil    
195                 number of stripes, calculate t    
196                 and write that new stripe to o    
197                 N-1 other new stripes. This ou    
198                 the RAID type (i.e. the alloca    
199                 changing from raid5_ls to raid    
200                                                   
201         [journal_dev <dev>]                       
202                 This option adds a journal dev    
203                 uses it to close the 'write ho    
204                 to the component devices which    
205                 The journal device is used as     
206                 be throttled versus non-journa    
207                 Takeover/reshape is not possib    
208                 it has to be deconfigured befo    
209                                                   
210         [journal_mode <mode>]                     
211                 This option sets the caching m    
212                 (see 'journal_dev <dev>' above    
213                 If 'writeback' is selected the    
214                 and must not suffer from the '    
215                 raid1 or raid10) to avoid a si    
216                                                   
217 <#raid_devs>: The number of devices composing     
218         Each device consists of two entries.      
219         containing the metadata (if any); the     
220         data. A Maximum of 64 metadata/data de    
221         up to target version 1.8.0.               
222         1.9.0 supports up to 253 which is enfo    
223                                                   
224         If a drive has failed or is missing at    
225         given for both the metadata and data d    
226                                                   
227                                                   
228 Example Tables                                    
229 --------------                                    
230                                                   
231 ::                                                
232                                                   
233   # RAID4 - 4 data drives, 1 parity (no metada    
234   # No metadata devices specified to hold supe    
235   # Chunk size of 1MiB                            
236   # (Lines separated for easy reading)            
237                                                   
238   0 1960893648 raid \                             
239           raid4 1 2048 \                          
240           5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81    
241                                                   
242   # RAID4 - 4 data drives, 1 parity (with meta    
243   # Chunk size of 1MiB, force RAID initializat    
244   #       min recovery rate at 20 kiB/sec/disk    
245                                                   
246   0 1960893648 raid \                             
247           raid4 4 2048 sync min_recovery_rate     
248           5 8:17 8:18 8:33 8:34 8:49 8:50 8:65    
249                                                   
250                                                   
251 Status Output                                     
252 -------------                                     
253 'dmsetup table' displays the table used to con    
254 The optional parameters are always printed in     
255 above with "sync" or "nosync" always output ah    
256 arguments, regardless of the order used when o    
257 Arguments that can be repeated are ordered by     
258                                                   
259                                                   
260 'dmsetup status' yields information on the sta    
261 The output is as follows (normally a single li    
262 clarity)::                                        
263                                                   
264   1: <s> <l> raid \                               
265   2:      <raid_type> <#devices> <health_chars    
266   3:      <sync_ratio> <sync_action> <mismatch    
267                                                   
268 Line 1 is the standard output produced by devi    
269                                                   
270 Line 2 & 3 are produced by the raid target and    
271                                                   
272         0 1960893648 raid raid4 5 AAAAA 2/4902    
273                                                   
274 Here we can see the RAID type is raid4, there     
275 which are 'A'live, and the array is 2/49022156    
276 recovery.  Here is a fuller description of the    
277                                                   
278         =============== ======================    
279         <raid_type>     Same as the <raid_type    
280         <health_chars>  One char for each devi    
281                                                   
282                         - 'A' = alive and in-s    
283                         - 'a' = alive but not     
284                         - 'D' = dead/failed.      
285         <sync_ratio>    The ratio indicating h    
286                         the process described     
287                         'sync_action' is "chec    
288                         of "resync" or "recove    
289         <sync_action>   One of the following p    
290                                                   
291                         idle                      
292                                 - No synchroni    
293                         frozen                    
294                                 - The current     
295                         resync                    
296                                 - Array is und    
297                                   or is resync    
298                                   (possibly ai    
299                         recover                   
300                                 - A device in     
301                                   replaced.       
302                         check                     
303                                 - A user-initi    
304                                   being perfor    
305                                   checked for     
306                                   discrepancie    
307                                   <mismatch_cn    
308                                   array by thi    
309                         repair                    
310                                 - The same as     
311                                   corrected.      
312                         reshape                   
313                                 - The array is    
314         <mismatch_cnt>  The number of discrepa    
315                         in RAID1/10 or wrong p    
316                         This value is valid on    
317                         is performed.  A healt    
318         <data_offset>   The current data offse    
319                         each component device     
320                         raid parameter to supp    
321         <journal_char>  - 'A' - active write-t    
322                         - 'a' - active write-b    
323                         - 'D' - dead journal d    
324                         - '-' - no journal dev    
325         =============== ======================    
326                                                   
327                                                   
328 Message Interface                                 
329 -----------------                                 
330 The dm-raid target will accept certain actions    
331 ('man dmsetup' for more information on the mes    
332 include:                                          
333                                                   
334         ========= ============================    
335         "idle"    Halt the current sync action    
336         "frozen"  Freeze the current sync acti    
337         "resync"  Initiate/continue a resync.     
338         "recover" Initiate/continue a recover     
339         "check"   Initiate a check (i.e. a "sc    
340         "repair"  Initiate a repair of the arr    
341         ========= ============================    
342                                                   
343                                                   
344 Discard Support                                   
345 ---------------                                   
346 The implementation of discard support among ha    
347 When a block is discarded, some storage device    
348 the block is read.  These devices set the 'dis    
349 attribute.  Other devices will return random d    
350 devices that advertise 'discard_zeroes_data' w    
351 zeroes when discarded blocks are read!  Since     
352 from a number of devices to calculate parity b    
353 reasons) relies on 'discard_zeroes_data' being    
354 that the devices be consistent.  Blocks may be    
355 of a RAID 4/5/6 stripe and if subsequent read     
356 consistent, the parity blocks may be calculate    
357 making the parity blocks useless for redundanc    
358 understand how your hardware behaves with disc    
359 enable discards with RAID 4/5/6.                  
360                                                   
361 Since the behavior of storage devices is unrel    
362 even when reporting 'discard_zeroes_data', by     
363 discard support is disabled -- this ensures da    
364 expense of losing some performance.               
365                                                   
366 Storage devices that properly support 'discard    
367 increasingly whitelisted in the kernel and can    
368                                                   
369 For trusted devices, the following dm-raid mod    
370 to safely enable discard support for RAID 4/5/    
371                                                   
372     'devices_handle_discards_safely'              
373                                                   
374                                                   
375 Version History                                   
376 ---------------                                   
377                                                   
378 ::                                                
379                                                   
380  1.0.0  Initial version.  Support for RAID 4/5    
381  1.1.0  Added support for RAID 1                  
382  1.2.0  Handle creation of arrays that contain    
383  1.3.0  Added support for RAID 10                 
384  1.3.1  Allow device replacement/rebuild for R    
385  1.3.2  Fix/improve redundancy checking for RA    
386  1.4.0  Non-functional change.  Removes arg fr    
387  1.4.1  RAID10 fix redundancy validation check    
388  1.4.2  Add RAID10 "far" and "offset" algorith    
389  1.5.0  Add message interface to allow manipul    
390         New status (STATUSTYPE_INFO) fields: s    
391  1.5.1  Add ability to restore transiently fai    
392  1.5.2  'mismatch_cnt' is zero unless [last_]s    
393  1.6.0  Add discard support (and devices_handl    
394  1.7.0  Add support for MD RAID0 mappings.        
395  1.8.0  Explicitly check for compatible flags     
396         and reject to start the raid set if an    
397         target version, thus avoiding data cor    
398         with a reshape in progress.               
399  1.9.0  Add support for RAID level takeover/re    
400         and set size reduction.                   
401  1.9.1  Fix activation of existing RAID 4/10 m    
402  1.9.2  Don't emit '- -' on the status table l    
403         fails reading a superblock. Correctly     
404         'D' on the status line.  If '- -' is p    
405         '- -' on the table line and '-' as the    
406  1.10.0 Add support for raid4/5/6 journal devi    
407  1.10.1 Fix data corruption on reshape request    
408  1.11.0 Fix table line argument order             
409         (wrong raid10_copies/raid10_format seq    
410  1.11.1 Add raid4/5/6 journal write-back suppo    
411  1.12.1 Fix for MD deadlock between mddev_susp    
412  1.13.0 Fix dev_health status at end of "recov    
413  1.13.1 Fix deadlock caused by early md_stop_w    
414         state races.                              
415  1.13.2 Fix raid redundancy validation and avo    
416  1.14.0 Fix reshape race on small devices.  Fi    
417         deadlock/potential data corruption.  U    
418         specific devices are requested via reb    
419         rebuild errors.                           
420  1.15.0 Fix size extensions not being synchron    
421         pages allocated;  also fix those not o    
422  1.15.1 Fix argument count and arguments for r    
423         on the status line.                       
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php