Using mdctl for replacing failed disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Dear Raiders

Another disk has gone down in my array :(, so I thought I'd give
"mdctl" a spin.  First, some details:

My array, via "cat /etc/raidtab":
raiddev /dev/md0
	raid-level		5
	nr-raid-disks		3
	nr-spare-disks		0
	persistent-superblock	1
	parity-algorithm	left-symmetric
	chunk-size		128
	device			/dev/sdb1
	raid-disk		0
	device			/dev/sdc1
	raid-disk		1
	device			/dev/sdd1
	raid-disk		2

"cat /proc/mdstat" shows faulty disk "/dev/sdd1":
Personalities : [raid5]
read_ahead 1024 sectors
md0 : active raid5 sdd1[2](F) sdb[0] sdc1[1]
      71119360 blocks level 5, 128k chunk, algorithm 2 [3/2] [UU_]

unused devices: <none>

And "mdctl --detail md0" gives:
/dev/md0:
        Version : 00.90.00
  Creation Time : Wed Apr 25 15:30:12 2001
     Raid Level : raid5
           Size : 35559680
     Raid Disks : 3
    Total Disks : 3
Preferred Minor : 0
    Persistance : Superblock is persistant

    Update Time : Tue Dec 18 16:40:36 2001
          State : dirty, no-errors
  Active Drives : 2
 Working Drives : 2
  Failed Drives : 1
   Spare Drives : 0

         Layout : left_symmetric
     Chunk Size : 128K

    Number   Major   Minor   RaidDisk   State
       0       8       16        0      active sync   /dev/sdb
       1       8       33        1      active sync   /dev/sdc1
       2       8       49        2      faulty   /dev/sdd1
           UUID : 4b6a90b4:e3ad2a8c:77ee1019:7ca1a900



## Q.1: Why does the first device get listed as "sdb" and not "sdb1" ?
Note that "mdctl -E /dev/sdb1" doesn't work, it requires "/dev/sdb"
unlike the c and d drives...did I mess up?

From /proc/scsi/scsi:

Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: SEAGATE  Model: ST336704LC       Rev: 0004
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi2 Channel: 00 Id: 01 Lun: 00
  Vendor: SEAGATE  Model: ST336704LC       Rev: 0004
  Type:   Direct-Access                    ANSI SCSI revision: 03
Host: scsi2 Channel: 00 Id: 02 Lun: 00
  Vendor: IBM      Model: DDYS-T36950M     Rev: S93E
  Type:   Direct-Access                    ANSI SCSI revision: 03


## Q.2: The failed device /dev/sdd1 corresponds to the IBM disk, yes?
(If so, this is the third Deskstar drive to fail in the array, the
2 SEAGATEs are replacement drives!)



## Q.3: Can someone verify that to replace the drive I do:

mdctl --remove /dev/md0 /dev/sdd1
< hot swap failed drive with new one>
mdctl --add /dev/md0 /dev/sdd1
mdctl --assemble /dev/md0 /dev/sdb /dev/sdc1 /dev/sdd1
(note - use sdb, not sdb1?)


Many thanks!

Ian
-- 
Ian Thurlbeck                http://www.stams.strath.ac.uk/
Statistics and Modelling Science, University of Strathclyde
Livingstone Tower, 26 Richmond Street, Glasgow, UK,  G1 1XH
Tel: +44 (0)141 548 3667           Fax: +44 (0)141 552 2079
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux