Monday, 27 May 2013

How to remove disk from RAID1 without knowing the /dev/XXX name?

How to remove disk from RAID1 without knowing the /dev/XXX name?

BEFORE:
SERVER:~ # mdadm --detail /dev/md5
/dev/md5:
    Version : 00.90.00
  Creation Time : Fri Mar 18 14:53:33 2011
     Raid Level : raid1
     Array Size : 67103360 (63.99 GiB 68.71 GB)
    Device Size : 67103360 (63.99 GiB 68.71 GB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 5
    Persistence : Superblock is persistent

    Update Time : Mon May 27 21:32:01 2013
      State : clean, no-errors
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0


    Number   Major   Minor   RaidDevice State
       0       8      129        0      active sync   /dev/sdi1
       1       0        0       -1      removed
       UUID : 5cd4bFe4:dd1b759f:b7e070fe:c44bfRef
     Events : 0.36000940
ADDING A DISK TO RAID1:
SERVER:~ # mdadm --add /dev/md5 /dev/sdj1
mdadm: hot added /dev/sdj1
AFTER:
SERVER:~ # mdadm --detail /dev/md5
/dev/md5:
    Version : 00.90.00
  Creation Time : Fri Mar 18 14:53:33 2011
     Raid Level : raid1
     Array Size : 67103360 (63.99 GiB 68.71 GB)
    Device Size : 67103360 (63.99 GiB 68.71 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 5
    Persistence : Superblock is persistent

    Update Time : Mon May 27 21:32:32 2013
      State : clean, no-errors
 Active Devices : 1
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 1


    Number   Major   Minor   RaidDevice State
       0       8      129        0      active sync   /dev/sdi1
       1       0        0       -1      removed
       2       8      145       -1      spare   /dev/sdj1
       UUID : 5cd4bFe4:dd1b759f:b7e070fe:c44bfRef
     Events : 0.36000955
SERVER:~ #
QUESTION: how can I remove this line/disk from md5?
       1       0        0       -1      removed
Probably this is the reason why /dev/sdj1 is marked as spare...
I already tried to remove it:
SERVER:~ # mdadm /dev/md5 -r detached
mdadm: cannot find detached: No such file or directory
SERVER:~ #
OS: SUSE LINUX Enterprise Server 9.4

No comments:

Post a Comment