Nigel Kendrick spake the following on 10/5/2006 3:48 PM:
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Scott Silva Sent: Thursday, October 05, 2006 11:15 PM To: centos@centos.org Subject: [CentOS] Re: Cannot re-make a software raid pair
Nigel Kendrick spake the following on 10/5/2006 12:45 PM:
Apologies if you get this twice - the first one didn't seem to make it...
Hi Guys,
I have just replaced a faulty Max...woah, wait...this one's a Seagate... IDE hard disk but I cannot remake the software raid pair.
The currently running disk is hda and I am trying to add back hdg - both are master drives on separate controllers.
I have run fdisk on hdg and created the same partition structure as had and changed their types to 'fd' but when I try and rebuild the array I
get:
mdadm /dev/md0 -a /dev/hdg1
mdadm: hot add failed for /dev/hdg1: Invalid argument
If I look at /var/log/messages, I have:
Oct 5 16:04:39 petdoctors kernel: md: could not bd_claim hdg1. Oct 5 16:04:39 petdoctors kernel: md: error, md_import_device() returned -16
From other postings, this seems to imply the hdg1 partition is mounted but I
can find no evidence of this (df or cat /proc/mounts or lsof). I have done sone googling and found others having fun with this but no specific solution.
Anyone?
Maybe the table didn't get re-read after fdisk was done. I usually use sfdisk just because I can copy a partition table without making my usual fat-fingered typos. Are you sure that the new drive isn't smaller than the old? Even by a few cylinders.
--
Hi Scott,
Disks are 100% identical - right down to the last cylinder...hda is the live disk and hdg is the new one...
[root@petdoctors ~]# sfdisk --no-reread /dev/hda
Disk /dev/hda: 24321 cylinders, 255 heads, 63 sectors/track Old situation: Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/hda1 * 0+ 12 13- 104391 fd Linux raid autodetect /dev/hda2 13 273 261 2096482+ 82 Linux swap /dev/hda3 274 24320 24047 193157527+ fd Linux raid autodetect /dev/hda4 0 - 0 0 0 Empty Input in the following format; absent fields get a default value. <start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s> Usually you only need to specify <start> and <size> (and perhaps <type>).
/dev/hda1 : [root@petdoctors ~]# sfdisk /dev/hdg Checking that no-one is using this disk right now ... OK
Disk /dev/hdg: 24321 cylinders, 255 heads, 63 sectors/track Old situation: Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System /dev/hdg1 0+ 12 13- 104391 fd Linux raid autodetect /dev/hdg2 13 273 261 2096482+ 82 Linux swap /dev/hdg3 274 24320 24047 193157527+ fd Linux raid autodetect /dev/hdg4 0 - 0 0 0 Empty Input in the following format; absent fields get a default value. <start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s> Usually you only need to specify <start> and <size> (and perhaps <type>).
/dev/hdg1 :
[root@petdoctors ~]# mdadm /dev/md1 -a /dev/hdg3 mdadm: hot add failed for /dev/hdg3: Invalid argument [root@petdoctors ~]#
I know this is a real basic question, but did you fail then remove the old drive first?