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

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/device-mapper/unstriped.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/unstriped.rst (Version linux-6.12-rc7) and /Documentation/admin-guide/device-mapper/unstriped.rst (Version linux-2.6.32.71)


  1 ================================                  
  2 Device-mapper "unstriped" target                  
  3 ================================                  
  4                                                   
  5 Introduction                                      
  6 ============                                      
  7                                                   
  8 The device-mapper "unstriped" target provides     
  9 unstripe a device-mapper "striped" target to a    
 10 without having to touch the true backing block    
 11 used to unstripe a hardware RAID-0 to access b    
 12                                                   
 13 Parameters:                                       
 14 <number of stripes> <chunk size> <stripe #> <d    
 15                                                   
 16 <number of stripes>                               
 17         The number of stripes in the RAID 0.      
 18                                                   
 19 <chunk size>                                      
 20         The amount of 512B sectors in the chun    
 21                                                   
 22 <dev_path>                                        
 23         The block device you wish to unstripe.    
 24                                                   
 25 <stripe #>                                        
 26         The stripe number within the device th    
 27         drive you wish to unstripe.  This must    
 28                                                   
 29                                                   
 30 Why use this module?                              
 31 ====================                              
 32                                                   
 33 An example of undoing an existing dm-stripe       
 34 -------------------------------------------       
 35                                                   
 36 This small bash script will setup 4 loop devic    
 37 striped target to combine the 4 devices into o    
 38 the unstriped target on top of the striped dev    
 39 individual backing loop devices.  We write dat    
 40 unstriped devices and verify the data written     
 41 underlying device on the striped array::          
 42                                                   
 43   #!/bin/bash                                     
 44                                                   
 45   MEMBER_SIZE=$((128 * 1024 * 1024))              
 46   NUM=4                                           
 47   SEQ_END=$((${NUM}-1))                           
 48   CHUNK=256                                       
 49   BS=4096                                         
 50                                                   
 51   RAID_SIZE=$((${MEMBER_SIZE}*${NUM}/512))        
 52   DM_PARMS="0 ${RAID_SIZE} striped ${NUM} ${CH    
 53   COUNT=$((${MEMBER_SIZE} / ${BS}))               
 54                                                   
 55   for i in $(seq 0 ${SEQ_END}); do                
 56     dd if=/dev/zero of=member-${i} bs=${MEMBER    
 57     losetup /dev/loop${i} member-${i}             
 58     DM_PARMS+=" /dev/loop${i} 0"                  
 59   done                                            
 60                                                   
 61   echo $DM_PARMS | dmsetup create raid0           
 62   for i in $(seq 0 ${SEQ_END}); do                
 63     echo "0 1 unstriped ${NUM} ${CHUNK} ${i} /    
 64   done;                                           
 65                                                   
 66   for i in $(seq 0 ${SEQ_END}); do                
 67     dd if=/dev/urandom of=/dev/mapper/set-${i}    
 68     diff /dev/mapper/set-${i} member-${i}         
 69   done;                                           
 70                                                   
 71   for i in $(seq 0 ${SEQ_END}); do                
 72     dmsetup remove set-${i}                       
 73   done                                            
 74                                                   
 75   dmsetup remove raid0                            
 76                                                   
 77   for i in $(seq 0 ${SEQ_END}); do                
 78     losetup -d /dev/loop${i}                      
 79     rm -f member-${i}                             
 80   done                                            
 81                                                   
 82 Another example                                   
 83 ---------------                                   
 84                                                   
 85 Intel NVMe drives contain two cores on the phy    
 86 Each core of the drive has segregated access t    
 87 The current LBA model has a RAID 0 128k chunk     
 88 in a 256k stripe across the two cores::           
 89                                                   
 90    Core 0:       Core 1:                          
 91   __________    __________                        
 92   | LBA 512|    | LBA 768|                        
 93   | LBA 0  |    | LBA 256|                        
 94   ----------    ----------                        
 95                                                   
 96 The purpose of this unstriping is to provide b    
 97 neighbor environments. When two partitions are    
 98 aggregate drive without this unstriping, reads    
 99 can affect writes on another partition.  This     
100 are striped across the two cores.  When we uns    
101 and make partitions on each new exposed device    
102 physically separated.                             
103                                                   
104 With the dm-unstriped target we're able to seg    
105 has read and write jobs that are independent o    
106 when we run the test on a combined drive with     
107 to get a 92% reduction in read latency using t    
108                                                   
109                                                   
110 Example dmsetup usage                             
111 =====================                             
112                                                   
113 unstriped on top of Intel NVMe device that has    
114 ----------------------------------------------    
115                                                   
116 ::                                                
117                                                   
118   dmsetup create nvmset0 --table '0 512 unstri    
119   dmsetup create nvmset1 --table '0 512 unstri    
120                                                   
121 There will now be two devices that expose Inte    
122 respectively::                                    
123                                                   
124   /dev/mapper/nvmset0                             
125   /dev/mapper/nvmset1                             
126                                                   
127 unstriped on top of striped with 4 drives usin    
128 ----------------------------------------------    
129                                                   
130 ::                                                
131                                                   
132   dmsetup create raid_disk0 --table '0 512 uns    
133   dmsetup create raid_disk1 --table '0 512 uns    
134   dmsetup create raid_disk2 --table '0 512 uns    
135   dmsetup create raid_disk3 --table '0 512 uns    
                                                      

~ [ 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