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

Re: issue with mdadm and mirroring drives



The issue I am having is that if I put into the system both drives,
the system always chooses the faulty drive.
I do not even get linux system - i get a weird text prompt - i think
it is initrdfs - even if i change it in the bios.

On installing grub - can you tell me what is the procedure for that
after i get my drives to an okay state ?

thanks
mjh


On Wed, Jan 18, 2012 at 11:39 AM, tv.debian@googlemail.com
<tv.debian@googlemail.com> wrote:
> 18/01/2012 17:23, Joey L wrote:
>> I have a raid 1 mdadm setup.
>> I have devices sda and sdb with 2 partitions on each - sda1 and sda2
>> on the other drive i have sdb1 and sdb2.
>>
>> Partition sda1 is the root partition and sda2 is the swap partition.
>>
>> My sda failed yesterday and now i am running in sdb only.
>>
>> When i put the drive sda into the system to add it back to the md0 -
>> the system keeps booting from it and refuses to boot from the good sdb
>> drive.
>>
>> What can i do to stop this from happening - I have no other system to
>> plug this drive into to zero out the drive.
>>
>> Also if I am able to get over this issue - do i have to do other
>> procedures to this drive? what are they ??? I think i have to do the
>> following:
>>
>> mdadm --manage /dev/md0 --remove /dev/sdb1
>>
>> mdadm --manage /dev/md0 --fail /dev/sdb1
>>
>> sfdisk -d /dev/sda | sfdisk /dev/sdb
>>
>> mdadm --manage /dev/md0 --add /dev/sdb1
>>
>>
>> I am thinking that I need to do something with grub or do some kind of
>> update so the server can boot of the good drive that I have working
>> now - but do not know what it is.
>>
>> thanks
>> mjh
>>
>>
>
> Hi, when you manage to boot with the faulty drive in, just "--fail",
> "--remove" and "--zero-superblock", then "--add" it again. Off course if
> the drive is damaged or faulty at a low level it may not come up or
> won't survive the rebuild...
>
> If you can work around the boot issue, maybe you can physically change
> the way the disk "sdb" is plugged-in, and use the slot previously used
> by "sda". This can usually be achieved in bios too by changing in the
> disk ordering.
>
> As an alternate, you could try booting on a rescue live-cd first, then
> start your degraded raid, chroot to the system to get the faulty drive
> back in the raid and start the rebuild, even reinstall grub from the
> chroot, then reboot in the original system.
>
> Once you are done it's a good idea to reinstall grub on both drives.
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 4F16F5CD.7060008@googlemail.com">http://lists.debian.org/[🔎] 4F16F5CD.7060008@googlemail.com
>


Reply to: