David Coulson on 30 Aug 2007 17:47:14 -0000


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

Re: [PLUG] How to break a software RAID mirror?


mdadm -f /dev/md0 /dev/sdb1
mdadm -r /dev/md0 /dev/sdb1

cr1:~# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [multipath]
md1 : active raid5 hdc3[2] hdb3[1] hda3[0]
      231528576 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
     
md0 : active raid1 hdc1[2] hdb1[1] hda1[0]
      497856 blocks [3/3] [UUU]
     
unused devices: <none>

cr1:~# mdadm -f /dev/md0 /dev/hdc1
mdadm: set /dev/hdc1 faulty in /dev/md0

cr1:~# mdadm -r /dev/md0 /dev/hdc1
mdadm: hot removed /dev/hdc1

cr1:~# mdadm -a /dev/md0 /dev/hdc1
mdadm: re-added /dev/hdc1


Dan Roberts wrote:
In my instance what would be the specific command to fail sbd
I have never used the mdadm tool..
thanks
dan


On Thu, 2007-08-30 at 13:37 -0400, David Coulson wrote:
  
Rather than unplug the disk, it's easier just to fail it using mdadm
and tell the array that it is gone.

That said, the array will bitch that it's missing a disk - You can't
run RAID-1 with only a single disk.

Not really sure what is trying to be accomplished here, other than
using sdb for something else - it's not as if there isn't a load of
unused disk space available. 

Brian Stempin wrote: 
    
The only raid0 set that I see is /dev/md1.  I don't see that volume
mounted anywhere.  Everything else is a raid0, so those volumes are
nothing to worry about.  For the sake of testing, I would recommend
shutting down the machine, unplugging sdb, and rebooting.  If
everything seems to be in order (ie, there's no uses for /deb/md1
that I'm unable to see), then you should be good!  Then, it's just a
matter of reconfiguring the raid to not complain that sdb isn't
present. 

On 8/30/07, Dan Roberts <Daniel.G.Roberts@sanofi-aventis.com>
wrote: 
        
        Hello All
        Thanks for the help!
        I am running fedora core>>
        [droberts@kayak /proc]$ uname -a ;
        Linux kayak 2.6.12-1.1381_FC3smp #1 SMP Fri Oct 21 04:03:26
        EDT 2005
        i686 i686 i386 GNU/Linux
        
        cat /proc/mdstat 
        
        Personalities : [raid0] [raid1]
        md4 : active raid1 sdb2[1] sda2[0]
              25599488 blocks [2/2] [UU]
        
        md2 : active raid1 sdb3[1] sda3[0]
              5116608 blocks [2/2] [UU]
        
        md3 : active raid1 sdb5[1] sda5[0] 
              5116544 blocks [2/2] [UU]
        
        md1 : active raid0 sdb6[1] sda6[0]
              8192896 blocks 64k chunks
        
        md5 : active raid1 sdb7[1] sda7[0]
              29704064 blocks [2/2] [UU]
        
        md0 : active raid1 sdb1[1] sda1[0] 
              2048192 blocks [2/2] [UU]
        
        unused devices: <none>
        [droberts@kayak /proc]$
        
        So it seems that I am running a mix oF RAID0 and RAID1 on
        these two disk
        RAIDED sets..
        
        
        The following is how they are mounted on my system when in
        use.. 
        Filesystem            Size  Used Avail Use% Mounted on
        /dev/md0              2.0G  374M  1.5G  21% /
        /dev/md5               28G   33M   27G   1% /home2
        none                 1004M     0 1004M   0% /dev/shm
        /dev/md3              4.9G   34M  4.6G   1% /tmp
        /dev/md4               25G  3.2G   20G  15% /usr
        /dev/md2              4.9G  190M  4.4G   5% /var
        /dev/sdc2              20G  9.8G  8.6G  54% /mnt
        
        
        What would you recommend I do at this point to detach sda
        from sdb so 
        that I could use disk #2 while still having data preserved
        on disk#1?
        Remeber that I can still boot my system on disk#3 which
        isn't RAIDED to
        anyone..
        Thanks for any advice!
        Dan
        
        
        
        ___________________________________________________________________________ 
        Philadelphia Linux Users Group
        --        http://www.phillylinux.org
        Announcements -
        http://lists.phillylinux.org/mailman/listinfo/plug-announce 
        General Discussion  --
        http://lists.phillylinux.org/mailman/listinfo/plug


____________________________________________________________________

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
  
      
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
    
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
  
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug