Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as Plain Text by rain ( 14 years ago )
root@mws64:~# lvcreate -L1G -nraid1-1 mws64system
  Logical volume "raid1-1" created
root@mws64:~# lvcreate -L1G -nraid1-2 mws64system
  Logical volume "raid1-2" created
root@mws64:~# mdadm -C -l10 -p f2 -n2 /dev/md0 /dev/mws64system/raid1-1 /dev/mws64system/raid1-2
mdadm: /dev/mws64system/raid1-1 appears to be part of a raid array:
    level=raid10 devices=2 ctime=Mon Jan 17 19:43:08 2011
mdadm: /dev/mws64system/raid1-2 appears to be part of a raid array:
    level=raid10 devices=2 ctime=Mon Jan 17 19:43:08 2011
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
root@mws64:~# cat /proc/mdstat 
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active (auto-read-only) raid10 dm-18[1] dm-17[0]
      1047552 blocks super 1.2 512K chunks 2 far-copies [2/2] [UU]
        resync=PENDING
      
unused devices: <none>
root@mws64:~# mkfs.xfs /dev/md0 
log stripe unit (524288 bytes) is too large (maximum is 256KiB)
log stripe unit adjusted to 32KiB
meta-data=/dev/md0               isize=256    agcount=8, agsize=32640 blks
         =                       sectsz=512   attr=2, projid32bit=0
data     =                       bsize=4096   blocks=261120, imaxpct=25
         =                       sunit=128    swidth=256 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =internal log           bsize=4096   blocks=1200, version=2
         =                       sectsz=512   sunit=8 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
root@mws64:~# cat /proc/mdstat 
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid10 dm-18[1] dm-17[0]
      1047552 blocks super 1.2 512K chunks 2 far-copies [2/2] [UU]
      [=>...................]  resync =  6.2% (65536/1047552) finish=0.9min speed=16384K/sec
      
unused devices: <none>
root@mws64:~# cat /proc/mdstat 
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid10 dm-18[1] dm-17[0]
      1047552 blocks super 1.2 512K chunks 2 far-copies [2/2] [UU]
      
unused devices: <none>
root@mws64:~# mdadm -D /dev/md0 
/dev/md0:
        Version : 1.2
  Creation Time : Mon Jan 17 19:48:40 2011
     Raid Level : raid10
     Array Size : 1047552 (1023.17 MiB 1072.69 MB)
  Used Dev Size : 1047552 (1023.17 MiB 1072.69 MB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Mon Jan 17 19:49:58 2011
          State : active
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

         Layout : far=2
     Chunk Size : 512K

           Name : mws64:0  (local to host mws64)
           UUID : fc9849b5:b128337f:927d3b87:3fc53fa9
         Events : 35

    Number   Major   Minor   RaidDevice State
       0     254       17        0      active sync   /dev/dm-17
       1     254       18        1      active sync   /dev/dm-18
root@mws64:~# mkdir /tmp/1
root@mws64:~# mount /dev/md0 /tmp/1
root@mws64:~# dd if=/dev/zero of=/tmp/1/file bs=1M count=500
500+0 записей считано
500+0 записей написано
 скопировано 524288000 байт (524 MB), 1,56792 c, 334 MB/c
root@mws64:~# sync ; md5sum /tmp/1/file
d8b61b2c0025919d5321461045c8226f  /tmp/1/file
root@mws64:~# mdadm /dev/md0 -f /dev/mws64system/raid1-1
mdadm: set /dev/mws64system/raid1-1 faulty in /dev/md0
root@mws64:~# cat /proc/mdstat 
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid10 dm-18[1] dm-17[0](F)
      1047552 blocks super 1.2 512K chunks 2 far-copies [2/1] [_U]
      
unused devices: <none>
root@mws64:~# mdadm -D /dev/md0 
/dev/md0:
        Version : 1.2
  Creation Time : Mon Jan 17 19:48:40 2011
     Raid Level : raid10
     Array Size : 1047552 (1023.17 MiB 1072.69 MB)
  Used Dev Size : 1047552 (1023.17 MiB 1072.69 MB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Mon Jan 17 19:52:56 2011
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 1
  Spare Devices : 0

         Layout : far=2
     Chunk Size : 512K

           Name : mws64:0  (local to host mws64)
           UUID : fc9849b5:b128337f:927d3b87:3fc53fa9
         Events : 38

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1     254       18        1      active sync   /dev/dm-18

       0     254       17        -      faulty spare   /dev/dm-17
root@mws64:~# md5sum /tmp/1/file 
d8b61b2c0025919d5321461045c8226f  /tmp/1/file

 

Revise this Paste

Your Name: Code Language: