Como sei se o software raid está sendo executado ou configurado corretamente?

2

Isso é o que eu tirei:

mdadm --monitor --scan -f --pid-file=/var/run/mdadm/mdadm.pid

 cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 sda1[0] sdb1[1]
      262080 blocks super 1.0 [2/2] [UU]

md1 : active raid1 sdb2[1] sda2[0]
      8187840 blocks super 1.1 [2/2] [UU]

md2 : active raid1 sdb3[1] sda3[0]
      479800128 blocks super 1.1 [2/2] [UU]
      bitmap: 3/4 pages [12KB], 65536KB chunk

unused devices: <none>

 fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00075973

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          33      262144   fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sda2              33        1053     8192000   fd  Linux raid autodetect
/dev/sda3            1053       60802   479931392   fd  Linux raid autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00038574

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          33      262144   fd  Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sdb2              33        1053     8192000   fd  Linux raid autodetect
/dev/sdb3            1053       60802   479931392   fd  Linux raid autodetect

Disk /dev/md2: 491.3 GB, 491315331072 bytes
2 heads, 4 sectors/track, 119950032 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/md1: 8384 MB, 8384348160 bytes
2 heads, 4 sectors/track, 2046960 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/md0: 268 MB, 268369920 bytes
2 heads, 4 sectors/track, 65520 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Eu estou certo de acreditar que todas as partições estão sendo corretamente espelhadas, certo? Existe uma maneira de verificar cada unidade individual para garantir?

    
por Jason 26.05.2014 / 16:13

1 resposta

3

Os 2 métodos que eu uso para determinar a saúde de um RAID são os seguintes.

/ proc / mdstat

$ cat /proc/mdstat
Personalities : [raid1] 
md0 : active raid1 sdb1[1] sda1[0]
      976759936 blocks [2/2] [UU]

mdadm --detail

$ mdadm --detail /dev/md0
/dev/md0:
        Version : 0.90
  Creation Time : Sat Jan 26 09:14:11 2008
     Raid Level : raid1
     Array Size : 976759936 (931.51 GiB 1000.20 GB)
  Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Mon May 26 13:05:25 2014
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 37a3bfcb:41393031:23c133e6:3b879f08
         Events : 0.2182840

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1

Se houver algum problema com o seu RAID, esses comandos mostrarão que o RAID não está funcionando e quais membros (unidades) estão falhando ou falharam.

    
por 26.05.2014 / 19:07