LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Linux Raid 1 Mirror bad on SCSI HDD. Howto fix? (https://www.linuxquestions.org/questions/linux-enterprise-47/linux-raid-1-mirror-bad-on-scsi-hdd-howto-fix-374010/)

blkcamarozr28 10-17-2005 02:22 PM

Linux Raid 1 Mirror bad on SCSI HDD. Howto fix?
 
Hi,

I have a Fedora Core 2 server that has a bad SCSI drive that is affecting mirror md3. I am running FC2's software raid 1 (mirroring). How do you fix this problem? I have 4 scsi hdd's [(2) 18GB + (2) 9GB]. They are setup as this:
9GB - / & swap
18GB- /home


Below are some info on the system.

*** /proc/mdstat ***
Personalities : [raid1]
md2 : active raid1 sdb2[1] sda2[0]
1023744 blocks [2/2] [UU]

md3 : active raid1 sdc1[1]
17920768 blocks [2/1] [_U]

md1 : active raid1 sdb1[1] sda1[0]
7862016 blocks [2/2] [UU]

*** df ***
Filesystem Size Used Avail Use% Mounted on
/dev/md1 7.4G 6.1G 1.1G 86% /
none 506M 0 506M 0% /dev/shm
/dev/md3 17G 701M 16G 5% /home


*** fdisk -l ***
Disk /dev/sda: 9100 MB, 9100369920 bytes
64 heads, 32 sectors/track, 8678 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 7678 7862256 fd Linux raid autodetect
/dev/sda2 7679 8678 1024000 fd Linux raid autodetect

Disk /dev/sdb: 9100 MB, 9100369920 bytes
64 heads, 32 sectors/track, 8678 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 7678 7862256 fd Linux raid autodetect
/dev/sdb2 7679 8678 1024000 fd Linux raid autodetect

Disk /dev/sdc: 18.3 GB, 18351959040 bytes
64 heads, 32 sectors/track, 17501 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 17501 17921008 fd Linux raid autodetect

blkcamarozr28 10-17-2005 07:19 PM

Im going to try and answer my own question. Let me know if this is correct or not.

*********************
*Repair bad sdc partition*
*********************
sfdisk -d /dev/sdc > sdc.dat *Copies sdc partition table
sfdisk /dev/sdd < sdc.dat *Copies sdc partition table to sdd
mdadm --add /dev/md3 /dev/sd1 *Rebuild Mirror by adding sd1 back in


All times are GMT -5. The time now is 06:49 PM.