User Tools

Site Tools


informatique:linux:raid0_sous_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
informatique:linux:raid0_sous_linux [2012/09/13 21:11] pteuinformatique:linux:raid0_sous_linux [2012/11/03 00:01] – modification externe 127.0.0.1
Line 120: Line 120:
  
 =====Divers===== =====Divers=====
- 
-====Monitorer son RAID==== 
- 
-<code> 
-cat /proc/mdstat  
- Personalities : [raid0]  
- md1 : active raid0 sda3[0] sdb3[1] 
-       1945696256 blocks 64k chunks 
-        
- md0 : active raid0 sda2[0] sdb2[1] 
-       5863552 blocks 64k chunks 
-        
- unused devices: <none> 
-</code> 
- 
-On peut avoir plus de détails avec : 
-<code> 
-mdadm --detail /dev/md1 
-    /dev/md1: 
-         Version : 00.90 
-   Creation Time : Sat Feb  7 12:49:57 2009 
-      Raid Level : raid0 
-      Array Size : 1945696256 (1855.56 GiB 1992.39 GB) 
-    Raid Devices : 2 
-   Total Devices : 2 
- Preferred Minor : 1 
-     Persistence : Superblock is persistent 
-  
-     Update Time : Tue Feb 10 20:31:42 2009 
-           State : clean 
-  Active Devices : 2 
- Working Devices : 2 
-  Failed Devices : 0 
-   Spare Devices : 0 
-  
-      Chunk Size : 64K 
-   
-            UUID : 9695e8d2:87d83bd5:e070d1d4:842cdf7e 
-          Events : 0.5 
-   
-     Number   Major   Minor   RaidDevice State 
-        0              3        0      active sync   /dev/sda3 
-        1             19        1      active sync   /dev/sdb3 
-</code> 
  
 ====Créer un volume RAID1 avec un seul disque==== ====Créer un volume RAID1 avec un seul disque====
Line 371: Line 327:
  
 Au redémarrage le volume RAID est monté correctement \o/. Au redémarrage le volume RAID est monté correctement \o/.
 +
 +===D'autres pistes :===
 +
 +<code bash>
 +cat /proc/mdstat
 +Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
 +md126 : inactive sdc[1]
 +      1953514496 blocks
 +
 +md127 : active (auto-read-only) raid5 sdd[2] sdb[0]
 +      3907028992 blocks level 5, 64k chunk, algorithm 2 [3/2] [U_U]
 +
 +unused devices: <none>
 +</code>
 +
 +<code bash>
 +mdadm --examine /dev/sdb1
 +/dev/sdb1:
 +          Magic : a92b4efc
 +        Version : 0.90.00
 +           UUID : cc5892bf:a52da5c0:2ddc0efe:cce42a60 (local to host ymir2)
 +  Creation Time : Fri Aug 19 18:22:07 2011
 +     Raid Level : raid5
 +  Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
 +     Array Size : 3907023872 (3726.03 GiB 4000.79 GB)
 +   Raid Devices : 3
 +  Total Devices : 3
 +Preferred Minor : 0
 +
 +    Update Time : Thu Nov 17 19:32:24 2011
 +          State : clean
 + Active Devices : 3
 +Working Devices : 3
 + Failed Devices : 0
 +  Spare Devices : 0
 +       Checksum : 26f6dd32 - correct
 +         Events : 39
 +
 +         Layout : left-symmetric
 +     Chunk Size : 64K
 +
 +      Number   Major   Minor   RaidDevice State
 +this                 17        0      active sync   /dev/sdb1
 +
 +                   17        0      active sync   /dev/sdb1
 +                   33        1      active sync   /dev/sdc1
 +                   49        2      active sync   /dev/sdd1
 +
 +mdadm --examine /dev/sdc1
 +/dev/sdc1:
 +          Magic : a92b4efc
 +        Version : 0.90.00
 +           UUID : cc5892bf:a52da5c0:2ddc0efe:cce42a60 (local to host ymir2)
 +  Creation Time : Fri Aug 19 18:22:07 2011
 +     Raid Level : raid5
 +  Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
 +     Array Size : 3907023872 (3726.03 GiB 4000.79 GB)
 +   Raid Devices : 3
 +  Total Devices : 3
 +Preferred Minor : 0
 +
 +    Update Time : Thu Nov 17 19:32:24 2011
 +          State : clean
 + Active Devices : 3
 +Working Devices : 3
 + Failed Devices : 0
 +  Spare Devices : 0
 +       Checksum : 26f6dd44 - correct
 +         Events : 39
 +
 +         Layout : left-symmetric
 +     Chunk Size : 64K
 +
 +      Number   Major   Minor   RaidDevice State
 +this                 33        1      active sync   /dev/sdc1
 +
 +                   17        0      active sync   /dev/sdb1
 +                   33        1      active sync   /dev/sdc1
 +                   49        2      active sync   /dev/sdd1
 +
 +mdadm --examine /dev/sdd1
 +/dev/sdd1:
 +          Magic : a92b4efc
 +        Version : 0.90.00
 +           UUID : cc5892bf:a52da5c0:2ddc0efe:cce42a60 (local to host ymir2)
 +  Creation Time : Fri Aug 19 18:22:07 2011
 +     Raid Level : raid5
 +  Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
 +     Array Size : 3907023872 (3726.03 GiB 4000.79 GB)
 +   Raid Devices : 3
 +  Total Devices : 3
 +Preferred Minor : 0
 +
 +    Update Time : Thu Nov 17 19:32:24 2011
 +          State : clean
 + Active Devices : 3
 +Working Devices : 3
 + Failed Devices : 0
 +  Spare Devices : 0
 +       Checksum : 26f6dd56 - correct
 +         Events : 39
 +
 +         Layout : left-symmetric
 +     Chunk Size : 64K
 +
 +      Number   Major   Minor   RaidDevice State
 +this                 49        2      active sync   /dev/sdd1
 +
 +                   17        0      active sync   /dev/sdb1
 +                   33        1      active sync   /dev/sdc1
 +                   49        2      active sync   /dev/sdd1
 +</code>
 +
 +<code bash>
 +egrep -v "^$|^#" /etc/mdadm/mdadm.conf
 +DEVICE partitions
 +CREATE owner=root group=disk mode=0660 auto=yes
 +HOMEHOST <system>
 +MAILADDR root
 +ARRAY /dev/md0 level=raid5 num-devices=3 metadata=0.90 UUID=cc5892bf:a52da5c0:2ddc0efe:cce42a60
 +   devices=/dev/sdb1,/dev/sdc1,/dev/sdd1
 +</code>
 +
 +<code bash>
 +mdadm --detail --scan
 +ARRAY /dev/md/0_0 metadata=0.90 UUID=c50da923:2bb088ef:2ddc0efe:cce42a60
 +ARRAY /dev/md/0_1 metadata=0.90 UUID=cb278753:2d171315:2ddc0efe:cce42a60
 +</code>
 +
 +<code bash>
 +mdadm --stop /dev/md126
 + mdadm: stopped /dev/md126
 +mdadm --stop /dev/md127
 + mdadm: stopped /dev/md127
 +mdadm --assemble /dev/md0
 + mdadm: /dev/md0 has been started with 3 drives.
 +</code>
 +
 +<code bash>
 +mdadm --detail --scan
 +ARRAY /dev/md0 metadata=0.90 UUID=cc5892bf:a52da5c0:2ddc0efe:cce42a60
 +</code>
 +
 +<code bash>
 +cat /proc/mdstat
 +Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
 +md0 : active raid5 sdb1[0] sdd1[2] sdc1[1]
 +      3907023872 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
 +
 +unused devices: <none>
 +</code>
 +
  
 ====LVM==== ====LVM====
Line 416: Line 524:
   swap_1  ymir2  -wi-ao  2,47g   swap_1  ymir2  -wi-ao  2,47g
 </code> </code>
 +
 =====Management du raid===== =====Management du raid=====
 +
 +====Monitorer son RAID====
 +
 +<note warning>
 +Attention les commandes qui vont suivre ne proviennent pas toutes du même RAID !
 +</note>
 +
 +<code>
 +cat /proc/mdstat 
 + Personalities : [raid0] 
 + md1 : active raid0 sda3[0] sdb3[1]
 +       1945696256 blocks 64k chunks
 +       
 + md0 : active raid0 sda2[0] sdb2[1]
 +       5863552 blocks 64k chunks
 +       
 + unused devices: <none>
 +</code>
 +
 +On peut avoir plus de détails avec :
 +<code>
 +mdadm --detail /dev/md1
 +    /dev/md1:
 +         Version : 00.90
 +   Creation Time : Sat Feb  7 12:49:57 2009
 +      Raid Level : raid0
 +      Array Size : 1945696256 (1855.56 GiB 1992.39 GB)
 +    Raid Devices : 2
 +   Total Devices : 2
 + Preferred Minor : 1
 +     Persistence : Superblock is persistent
 + 
 +     Update Time : Tue Feb 10 20:31:42 2009
 +           State : clean
 +  Active Devices : 2
 + Working Devices : 2
 +  Failed Devices : 0
 +   Spare Devices : 0
 + 
 +      Chunk Size : 64K
 +  
 +            UUID : 9695e8d2:87d83bd5:e070d1d4:842cdf7e
 +          Events : 0.5
 +  
 +     Number   Major   Minor   RaidDevice State
 +        0              3        0      active sync   /dev/sda3
 +        1             19        1      active sync   /dev/sdb3
 +</code>
  
 Arrêter/Supprimer le raid : Arrêter/Supprimer le raid :
Line 532: Line 689:
              ext4    3,6T  196M  3,6T   1% /mnt/data              ext4    3,6T  196M  3,6T   1% /mnt/data
 </code> </code>
 +
 =====Tests et banchmarks===== =====Tests et banchmarks=====
  
informatique/linux/raid0_sous_linux.txt · Last modified: 2024/06/29 14:10 by pteu