Changes between Version 1 and Version 2 of TipAndDoc/storage/RAID/rescue/RAID1


Ignore:
Timestamp:
Mar 24, 2011 11:05:26 PM (13 years ago)
Author:
mitty
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TipAndDoc/storage/RAID/rescue/RAID1

    v1 v2  
    9595   1     1       8       33        1      active sync   /dev/sdc1 
    9696}}} 
     97 
     98 == rescue with Knoppix == 
     99 * root@Knoppix:~# cat /etc/knoppix-version 
     100{{{ 
     1015.3.1 2008-03-26 
     102}}} 
     103 * root@Knoppix:~# uname -a 
     104{{{ 
     105Linux Knoppix 2.6.24.4 #2 SMP PREEMPT Tue Mar 25 21:35:28 CET 2008 i686 GNU/Linux 
     106}}} 
     107 
     108 === devices === 
     109 * root@Knoppix:~# ls -l /dev/sd? 
     110{{{ 
     111brw-rw---- 1 root disk 8,   0 Mar 25  2011 /dev/sda 
     112brw-rw---- 1 root disk 8,  16 Mar 25  2011 /dev/sdb 
     113}}} 
     114 
     115 === modprobe === 
     116 * root@Knoppix:~# cat /proc/mdstat 
     117{{{ 
     118cat: /proc/mdstat: No such file or directory 
     119}}} 
     120 
     121 * root@Knoppix:~# modprobe md_mod 
     122 
     123 * root@Knoppix:~# cat /proc/mdstat 
     124{{{ 
     125Personalities : 
     126unused devices: <none> 
     127}}} 
     128 
     129 === scan devices === 
     130 * root@Knoppix:~# mdadm -E /dev/sd* 2>/dev/null 
     131{{{ 
     132/dev/sda1: 
     133          Magic : a92b4efc 
     134        Version : 00.90.00 
     135           UUID : 32578407:6f33f50b:893cf340:745f5dce 
     136  Creation Time : Thu Mar 24 17:31:36 2011 
     137     Raid Level : raid1 
     138  Used Dev Size : 2047936 (2000.27 MiB 2097.09 MB) 
     139     Array Size : 2047936 (2000.27 MiB 2097.09 MB) 
     140   Raid Devices : 2 
     141  Total Devices : 2 
     142Preferred Minor : 0 
     143 
     144    Update Time : Thu Mar 24 21:25:32 2011 
     145          State : clean 
     146 Active Devices : 2 
     147Working Devices : 2 
     148 Failed Devices : 0 
     149  Spare Devices : 0 
     150       Checksum : e3889399 - correct 
     151         Events : 0.34 
     152 
     153 
     154      Number   Major   Minor   RaidDevice State 
     155this     0       8       17        0      active sync   /dev/sdb1 
     156 
     157   0     0       8       17        0      active sync   /dev/sdb1 
     158   1     1       8       33        1      active sync   /dev/sdc1 
     159/dev/sdb1: 
     160          Magic : a92b4efc 
     161        Version : 00.90.00 
     162           UUID : 32578407:6f33f50b:893cf340:745f5dce 
     163  Creation Time : Thu Mar 24 17:31:36 2011 
     164     Raid Level : raid1 
     165  Used Dev Size : 2047936 (2000.27 MiB 2097.09 MB) 
     166     Array Size : 2047936 (2000.27 MiB 2097.09 MB) 
     167   Raid Devices : 2 
     168  Total Devices : 2 
     169Preferred Minor : 0 
     170 
     171    Update Time : Thu Mar 24 21:25:32 2011 
     172          State : clean 
     173 Active Devices : 2 
     174Working Devices : 2 
     175 Failed Devices : 0 
     176  Spare Devices : 0 
     177       Checksum : e38893ab - correct 
     178         Events : 0.34 
     179 
     180 
     181      Number   Major   Minor   RaidDevice State 
     182this     1       8       33        1      active sync   /dev/sdc1 
     183 
     184   0     0       8       17        0      active sync   /dev/sdb1 
     185   1     1       8       33        1      active sync   /dev/sdc1 
     186}}} 
     187 
     188 * root@Knoppix:~# mdadm -Es 
     189{{{ 
     190ARRAY /dev/md0 level=raid1 num-devices=2 UUID=32578407:6f33f50b:893cf340:745f5dce 
     191}}} 
     192 
     193 === method 1 === 
     194 * root@Knoppix:~# mdadm -A /dev/md0 -u 32578407:6f33f50b:893cf340:745f5dce 
     195{{{ 
     196mdadm: /dev/md0 has been started with 2 drives. 
     197}}} 
     198  * 以下のようなエラーが出た場合は、modprobe md_modし忘れている場合がある 
     199{{{ 
     200mdadm: error opening /dev/md0: No such device or address 
     201}}} 
     202 
     203 === method 2 === 
     204 * root@Knoppix:~# mdadm -A /dev/md0 /dev/sd[ab]1 
     205{{{ 
     206mdadm: /dev/md0 has been started with 2 drives. 
     207}}} 
     208 
     209 === result === 
     210 * root@Knoppix:~# cat /proc/mdstat 
     211{{{ 
     212Personalities : [raid1] 
     213md0 : active raid1 sda1[0] sdb1[1] 
     214      2047936 blocks [2/2] [UU] 
     215 
     216unused devices: <none> 
     217}}} 
     218 * root@Knoppix:~# mdadm -Ds 
     219{{{ 
     220ARRAY /dev/md0 level=raid1 num-devices=2 UUID=32578407:6f33f50b:893cf340:745f5dce 
     221}}} 
     222 * root@Knoppix:~# mdadm -D /dev/md0 
     223{{{ 
     224/dev/md0: 
     225        Version : 00.90.03 
     226  Creation Time : Thu Mar 24 17:31:36 2011 
     227     Raid Level : raid1 
     228     Array Size : 2047936 (2000.27 MiB 2097.09 MB) 
     229  Used Dev Size : 2047936 (2000.27 MiB 2097.09 MB) 
     230   Raid Devices : 2 
     231  Total Devices : 2 
     232Preferred Minor : 0 
     233    Persistence : Superblock is persistent 
     234 
     235    Update Time : Thu Mar 24 21:25:32 2011 
     236          State : clean 
     237 Active Devices : 2 
     238Working Devices : 2 
     239 Failed Devices : 0 
     240  Spare Devices : 0 
     241 
     242           UUID : 32578407:6f33f50b:893cf340:745f5dce 
     243         Events : 0.34 
     244 
     245    Number   Major   Minor   RaidDevice State 
     246       0       8        1        0      active sync   /dev/sda1 
     247       1       8       17        1      active sync   /dev/sdb1 
     248}}} 
     249 
     250 * root@Knoppix:~# pvdisplay -C 
     251{{{ 
     252  PV         VG    Fmt  Attr PSize PFree 
     253  /dev/md0   vgnfs lvm2 a-   1.94G 1.94G 
     254}}} 
     255 * root@Knoppix:~# vgdisplay -C 
     256{{{ 
     257  VG    #PV #LV #SN Attr   VSize VFree 
     258  vgnfs   1   0   0 wz--n- 1.94G 1.94G 
     259}}}