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

Re: issue with mdadm and mirroring drives



On Wed, Jan 25, 2012 at 5:35 PM, tv.debian@googlemail.com
<tv.debian@googlemail.com> wrote:
> 25/01/2012 19:16, Joey L wrote:


>> Okay..I am telling all in this email -:)
>>
>> My configuration is as such:
>> /dev/md0 = /dev/sdc1 and /dev/sdd1
>> /dev/md1 = /dev/sda1 and /dev/sb1
>>
>> ****My swap partitions are not part of the array or mirror  at all -
>> they are just regular partitions - they are:
>> /dev/sdc2 and /dev/sdd2.
>
> Any particular reason do do that ? If you want your system/applications
> to carry on working if a disk fails you need the swap on raid1 too.

+1


>> When I boot the system with all drives in, I get the superflous error.
>>
>> So the only way to boot is only to put in /dev/sdc alone and boot.
>> when i get to a linux prompt, I insert the second drive into the system /dev/sdd
>>
>> To sync them, /dev/sdd has already failed, so i run
>> sfdisk -d /dev/sdc | sfdisk /dev/sdd
>> ** i get an error that nothing has changed - so I run it with the
>> --force command to get the partitions identical like:
>> sfdisk -d /dev/sdc | sfdisk --force /dev/sdd
>
> Why do you do that ? You are forcing the partitioning of the first disk
> onto the second, this could work at raid creation time but isn't the
> proper procedure to re-add a failed member to an array. You don't have
> to "sync" the data and even less the disk partitioning manually prior to
> re-adding it to the raid. mdadm will handle the resync.

It's unorthodox but it's a replacement of zeroing the superblock with
mdadm before adding the partition back to into the array.


>> Once that is successful - i run mdadm --manage /dev/md0 --add /dev/sdd1
>>
>> And the sync process starts, and when it is done yesterday, I ran this
>> and got these errors:
>>
>> root@rider:~# grub-install --recheck --no-floppy /dev/sdc
>> error: superfluous RAID member (2 found).
>> error: superfluous RAID member (2 found).
>> error: superfluous RAID member (2 found).
>> error: superfluous RAID member (2 found).
>> error: superfluous RAID member (2 found).
>> Installation finished. No error reported.
>> root@rider:~# grub-install --recheck --no-floppy /dev/sdd
>> error: superfluous RAID member (2 found).
>> error: superfluous RAID member (2 found).
>> error: superfluous RAID member (2 found).
>> error: superfluous RAID member (2 found).
>> error: superfluous RAID member (2 found).
>> Installation finished. No error reported.

There are a few bugs on b.d.o that correspond to this error but none
that fit your case, AFAICT. "grub-install" does say "Installation
finished. No error reported."

You could check whether grub's OK via bootinfoscript (although the
only real test'll be a reboot...).

http://sourceforge.net/projects/bootinfoscript/


>> My parted -l is:
>>
>> Disk /dev/sda: 1000GB
>> Number  Start   End     Size    Type     File system  Flags
>>  1      32.3kB  1000GB  1000GB  primary  ext3         raid
>>
>> Disk /dev/sdb: 1000GB
>> Number  Start   End     Size    Type     File system  Flags
>>  1      32.3kB  1000GB  1000GB  primary  ext3         raid
>>
>> Disk /dev/sdc: 1000GB
>> Number  Start   End     Size    Type     File system     Flags
>>  1      1049kB  996GB   996GB   primary  ext3            raid
>>  2      996GB   1000GB  4204MB  primary  linux-swap(v1)
>>
>> Disk /dev/sdd: 1000GB
>> Number  Start   End     Size    Type     File system     Flags
>>  1      1049kB  996GB   996GB   primary  ext4            raid
>>  2      996GB   1000GB  4204MB  primary  linux-swap(v1)
>
> Why do you have file-systems on your partitions ? Only the "md" raid
> devices should be formatted with a file-system, not the underlying
> partitions !

sdc1 is ext3 and sdd1 is ext4; somehow.


Reply to: