LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-04-2007, 09:27 AM   #1
jsurles
Member
 
Registered: Feb 2007
Location: Katy, TX
Distribution: gentoo, slackware, centos, ESX, gnu/linux
Posts: 34

Rep: Reputation: 15
mdadm : disk replacement


Hello,

I've recently taken over administration of a gentoo machine. This machine has 4 physical disks configured in the following way:

/dev/md1 raid1 2 disks in use (with 2 spares) /dev/sd[a-d]1
/dev/md2 raid1 2 disks in use (with 2 spares) /dev/sd[a-d]2
/dev/md3 raid5 4 disks in use (no spares [other than parity]) /dev/sd[a-d]3
/dev/md4 raid0 4 disks in use (no spares) /dev/sd[a-d]4

We have been having issues with disk /dev/sdc.. it appears to be a drive issue.. it will will /dev/sdc3 and the raid5 portion will run in degraded mode. We will have it rebuild and it works fine, but obviously the disk needs to be replaced.

We're going to drop the raid0 partition and create a raid1 like md1 and md2 as we don't need that partition to have that much space. I've come to terms with this, and there's nothing I can do about it now.

Each physical drive is a sata 250gb drive.

With my limited experience with md, what are the pros/cons of replacing the disk with a larger disk, or even the same size but potentially slowerd, etc? I need to replace this disk today (for safeties sake.. and can't really afford to order online.

I would really just like some advice when it comes to replacing drives in an array of this setting (the raid 1 and raid 5 being the only ones I'm concerned with at this point).

Thanks in advance,

Jim
 
Old 12-04-2007, 04:20 PM   #2
jsurles
Member
 
Registered: Feb 2007
Location: Katy, TX
Distribution: gentoo, slackware, centos, ESX, gnu/linux
Posts: 34

Original Poster
Rep: Reputation: 15
mdadm can't add new device

ARGGH!@#

Okay, I found some disks to give this a shot with. Everything seems to be going fine.. I have them all loaded up in my other raids, but with the raid 5 setup, I'm still getting killed.

Code:
# cat /proc/mdstat 
Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4] [multipath] 
md1 : active raid1 sdd1[2](S) sdc1[3](S) sdb1[1] sda1[0]
      124864 blocks [2/2] [UU]
      
md2 : active raid1 sdd2[2](S) sdc2[3](S) sdb2[1] sda2[0]
      976448 blocks [2/2] [UU]
      
md3 : active raid5 sdd3[3] sdb3[1] sda3[0]
      585937152 blocks level 5, 64k chunk, algorithm 2 [4/3] [UU_U]
      
unused devices: <none>

Code:
# mdadm /dev/md3 --add /dev/sdc3
mdadm: add new device failed for /dev/sdc3 as 4: Invalid argument

Code:
 # mdadm --examine /dev/sdc3
/dev/sdc3:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 7c5346f3:caaceea7:d2cbb9a4:84d05167
  Creation Time : Wed Oct 25 06:04:40 2006
     Raid Level : raid5
    Device Size : 195312384 (186.26 GiB 200.00 GB)
     Array Size : 585937152 (558.79 GiB 600.00 GB)
   Raid Devices : 4
  Total Devices : 3
Preferred Minor : 3

    Update Time : Tue Dec  4 15:18:48 2007
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 1
  Spare Devices : 0
       Checksum : e0230999 - correct
         Events : 0.1088078

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     4       8       35       -1      spare   /dev/sdc3

   0     0       8        3        0      active sync   /dev/sda3
   1     1       8       19        1      active sync   /dev/sdb3
   2     2       0        0        2      faulty removed
   3     3       8       51        3      active sync   /dev/sdd3
can anyone think through this better than I, please. I've been up here working on getting this box back functioning for the past 18 hours.

A fresh set of eyes might help


Quote:
Originally Posted by jimsu View Post
Hello,

I've recently taken over administration of a gentoo machine. This machine has 4 physical disks configured in the following way:

/dev/md1 raid1 2 disks in use (with 2 spares) /dev/sd[a-d]1
/dev/md2 raid1 2 disks in use (with 2 spares) /dev/sd[a-d]2
/dev/md3 raid5 4 disks in use (no spares [other than parity]) /dev/sd[a-d]3
/dev/md4 raid0 4 disks in use (no spares) /dev/sd[a-d]4

We have been having issues with disk /dev/sdc.. it appears to be a drive issue.. it will will /dev/sdc3 and the raid5 portion will run in degraded mode. We will have it rebuild and it works fine, but obviously the disk needs to be replaced.

We're going to drop the raid0 partition and create a raid1 like md1 and md2 as we don't need that partition to have that much space. I've come to terms with this, and there's nothing I can do about it now.

Each physical drive is a sata 250gb drive.

With my limited experience with md, what are the pros/cons of replacing the disk with a larger disk, or even the same size but potentially slowerd, etc? I need to replace this disk today (for safeties sake.. and can't really afford to order online.

I would really just like some advice when it comes to replacing drives in an array of this setting (the raid 1 and raid 5 being the only ones I'm concerned with at this point).

Thanks in advance,

Jim
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
replace failure disk and rebuild RAID with mdadm ufmale Linux - Software 0 11-15-2007 03:24 PM
RAID-1 with mdadm. Disk fails sometime. jostmart Linux - Server 5 08-15-2007 06:13 AM
Major problem with software raid (mdadm) and disk failure norwolf Linux - Server 8 07-27-2007 07:14 AM
Failed disk replacement - RAID 1 madia Linux - Hardware 1 06-28-2007 10:17 AM
Hard Disk replacement vsraju Linux - Enterprise 1 06-02-2006 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration