Muhammad Yousuf Khan wrote:If it was a power cord issue, and you plugged it back in, then there
> one of our server's drive failed due to power cord issue.
> however i plug it back and due to less experience with "parted" i messed
> the whole thing.
should be no need to use parted. Simply mdadm re-add the drive to the
raid array. If the drive was running correctly before then the
partitions on the drive would have been correct. There should be no
need to make any changes to the partition table.
Nice box.
> i have 2tbx2 RAID 1 mirror
> and have 4x500GB partitions.
And understand that each of those partitions are set up as RAID 1 mirror.
Why were you trying to delete, add, or modify any partition? You said
> even i selected the right drive by "select command" and deleted the right
> partition but parted did something worst though, i take it as my own
> mistake as i am not that experience with parted i am usually using fdisk.
you had a power cord issue. Did you replace the disk with a different
disk? If you replaced the disk with a different disk then you will
need to clone the partition table. If you are using the same disk as
before then do not modify the partition table.
> now the problem part is i can not re attach the fail drive partition withThis shows two devices. It shows /dev/sdb and /dev/sdc. All four
> RAID /dev/md[2,3,4] devices.
>
> Personalities : [raid1]
> md1 : active (auto-read-only) raid1 sdc1[0]
> 488147776 blocks super 1.2 [2/1] [U_]
>
> md4 : active raid1 sdb4[0]
> 488670072 blocks super 1.2 [2/1] [U_]
>
> md3 : active raid1 sdb3[0]
> 488279928 blocks super 1.2 [2/1] [U_]
>
> md2 : active raid1 sdb2[0]
> 488279928 blocks super 1.2 [2/1] [U_]
raid partitions are operating in degraded mode using only one device.
Note that the sizes are not quite identical.
But that is only part of the data. You need to use mdadm to display
the data that you need. Please show the output of each of the following
commands:
mdadm --detail /dev/md1
mdadm --detail /dev/md2
mdadm --detail /dev/md3
mdadm --detail /dev/md4
The critical information is at the bottom of each of the output. On
my system it shows this for an example:
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
You will need to know that information in order to proceed successfully.
I would like to see the output of:
mdadm --examine /dev/sdc2
I am hoping that would show something useful. I would also like to
see the exact sizes of the partitions. Please show the output of the
following which will show the exact sizes. I worry that sdc2 is not
large enough and is smaller than sdb2.
sfdisk -d /dev/sdb
sfdisk -d /dev/sdc
It is possible that the partition table on the disk and the operating
system's view of it are out of sync with each other. You may need to
poke at the OS and have it scan the disk.
partprobe /dev/sdc
Hope that helps.
Bob