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

Re: Mdadm drive fail power cord issue.



Muhammad Yousuf Khan wrote:
> Sorry for the late response.

No problem.  I am often distracted myself with various things away
from the mailing lists and can't respond as often as I would like.

> Bob Proulx wrote:
> > Muhammad Yousuf Khan wrote:
> root@nasbox:~#  mdadm --detail /dev/md1
>     Number   Major   Minor   RaidDevice State
>        0       8       33        0      active sync   /dev/sdc1
>        1       0        0        1      removed
> root@nasbox:~#   mdadm --detail /dev/md2
>     Number   Major   Minor   RaidDevice State
>        0       8       18        0      active sync   /dev/sdb2
>        1       0        0        1      removed
> root@nasbox:~#   mdadm --detail /dev/md3
>     Number   Major   Minor   RaidDevice State
>        0       8       19        0      active sync   /dev/sdb3
>        1       0        0        1      removed
> root@nasbox:~#   mdadm --detail /dev/md4
>     Number   Major   Minor   RaidDevice State
>        0       8       20        0      active sync   /dev/sdb4
>        1       0        0        1      removed

See in the above that md1 is active on /dev/sdc1 while the other
devices are all active in /dev/sdb{2,3,4}.  This means you need to be
careful which disk you do things to since you could wipe out the other
disk if not careful.  Three are one way and one is the other way.

> > You will need to know that information in order to proceed successfully.
> > I would like to see the output of:
> >
> >   mdadm --examine /dev/sdc2
>
> root@nasbox:~#  mdadm --examine /dev/sdc2
> mdadm: No md superblock detected on /dev/sdc2.

That was an example from my system.  For your system you would use these:

  mdadm --examine /dev/sdc1
  mdadm --examine /dev/sdb2
  mdadm --examine /dev/sdb3
  mdadm --examine /dev/sdb4

Noting that the first is on sdc and the other three on sdb.

> root@nasbox:~# sfdisk -d /dev/sdb
> 
> WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util sfdisk
> doesn't support GPT. Use GNU Parted.

Hmm...  I am not a GPT expert.  I haven't been using that partition
table type.  Yet.  It is inevitably in the future.  But that means my
question was poorly written.  Sorry.

> root@nasbox:~# sfdisk -d /dev/sdc
> read: Input/output error

That looks scary to me.  You have an active partition on /dev/sdc1 but
here /dev/sdc reported an I/O error?  That seems very bad.  At this
point I would stop and look carefully at the drive.  I would look at
the SMART selftests from the drive.  Here are some useful commands.

  smartctl -i /dev/sdc
  smartctl -l error /dev/sdc
  smartctl -t short /dev/sdc
  smartctl -l selftest /dev/sdc

But if you are getting I/O errors from /dev/sdc then that probably
explains why you were getting an invalid argument error from mdadm
talking to that disk.

> sfdisk: read error on /dev/sdc - cannot read sector 0
>  /dev/sdc: unrecognized partition table type
> No partitions found

I don't know what to think.  How can the array be active on /dev/sdc1
when /dev/sdc is giving I/O errors?  Anyone else have any ideas?  I
think the disk may be failing.  Hopefully the SMART selftests will
confirm it.

I am going to ignore the I/O errors for a moment and continue as if
that didn't happen.  But it did.  So beware.

Normally I would say that you need to clone your partition from one
disk to the other.  I would normally use 'sfdisk -d /dev/sdb | sfdisk
/dev/sdc' to do it.  But you are using GPT tables so that won't work.
Plus you have an active array on /dev/sdc2 that you don't want to
disrupt.  So instead I can only say that you need to make sure that
sdc2, sdc3, sdc4 is partitioned like sdb2, sdb3, sdb4 and that sdb1 is
partitioned like sdc1.  Then add them correct member back into the
array.  But I don't know how to clone GPT tables.  Perhaps someone
else will have help for that part.  And I don't understand the I/O
error and think that needs to be understood first.

Good luck!
Bob

Attachment: signature.asc
Description: Digital signature


Reply to: