Koozali.org: home of the SME Server
Obsolete Releases => SME Server 8.x => Topic started by: jameswilson on April 30, 2014, 06:58:34 PM
-
I noticed i had a degraded array (7 drive raid 6) so bought a couple of new drives assuming i could just replace them.
[root@sme-big ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1]
md1 : active raid1 sdb[1]
104320 blocks [7/1] [_U_____]
md127 : active raid1 sdc1[2] sdd1[3] sde1[4] sdf1[5] sdg1[6]
104320 blocks [7/5] [__UUUUU]
md2 : active raid6 sdg2[1] sdf2[5] sdd2[3] sdc2[2]
7813629952 blocks level 6, 256k chunk, algorithm 2 [6/4] [_UUU_U]
unused devices: <none>
When i manage the array it asks me to add sda but then doesnt start to resync. I dont want to pull anymore drives as the array is currently running although degraded.
As i dont have any 'failed' disks i dont know which to replace. I only replace sda as i noticed it kept saying 'waiting for sda' buring the boot sequence. On changing that drive it no longer says this so i gues its an early warning of death.
Any pointers as to what to do please?
James
-
abit more info
root@sme-big ~]# mdadm --detail /dev/md2
/dev/md2:
Version : 0.90
Creation Time : Tue Jun 19 18:37:05 2012
Raid Level : raid6
Array Size : 7813629952 (7451.66 GiB 8001.16 GB)
Used Dev Size : 1953407488 (1862.91 GiB 2000.29 GB)
Raid Devices : 6
Total Devices : 4
Preferred Minor : 2
Persistence : Superblock is persistent
Update Time : Wed Apr 30 19:14:18 2014
State : clean, degraded
Active Devices : 4
Working Devices : 4
Failed Devices : 0
Spare Devices : 0
Chunk Size : 256K
UUID : a09e8b64:b3493c94:41c75907:11b8d940
Events : 0.1521474
Number Major Minor RaidDevice State
0 0 0 0 removed
1 8 98 1 active sync /dev/sdg2
2 8 34 2 active sync /dev/sdc2
3 8 50 3 active sync /dev/sdd2
4 0 0 4 removed
5 8 82 5 active sync /dev/sdf2
ive tried to add
mdadm --add /dev/md2 /dev/sda2
and it fails as device not found
-
right i fixed this by using
sfdisk -d /dev/sdx | sfdisk /dev/sdx
to copy the partition table to the new drive
then
mdadm --add etc to add the new partitions into the array.
I have also moved 1 partition sda1 from md127 to md1.
Im assuming i can move them all over and get rif od md127. I dont know how md127 got there and why it used my hot spare drive.
-
good to hear that sound, you should write here how you sort out that problem for giving references for future problem
I mean exact history of command you did.
-
I used this command to copy the disk partitions from a good disk to the new blank one
sfdisk -d /dev/sdg | sfdisk /dev/sda
Then i used this command to add the new partions into the md devices.
mdadm --manage /dev/md1 --add /dev/sda
mdadm --manage /dev/md2 --add /dev/sda2
However i have another question and im a bit scared. How do i know if my system is using md1 or md127. If i remove all the drives from md127 and its now using that one ill kill it?
[root@sme-big ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1]
md1 : active raid1 sdb1[1] sda1[0]
104320 blocks [7/2] [UU_____]
md127 : active raid1 sdc1[2] sdd1[3] sde1[4] sdf1[5] sdg1[6]
104320 blocks [7/5] [__UUUUU]
md2 : active raid6 sde2[2] sdb2[4] sda2[0] sdg2[1] sdf2[5] sdd2[3] sdc2[6](F)
7813629952 blocks level 6, 256k chunk, algorithm 2 [6/6] [UUUUUU]
-
You may see something in your /etc/fstab or with the command mount
Probably you are using the md1 array but you have to see where the /boot is mounted
-
ok
done the following
mdadm --manage /dev/md127 --fail /dev/sdf1
mdadm --manage /dev/md127 --remove /dev/sdf1
mdadm --manage /dev/md1 --add /dev/sdf1
removed all the drives from md127 and got to
[root@sme-big etc]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid1]
md1 : active raid1 sdc1[5] sdf1[4] sde1[3] sdd1[2] sdb1[1] sda1[0]
104320 blocks [7/6] [UUUUUU_]
md127 : active raid1 sdg1[6]
104320 blocks [7/1] [______U]
md2 : active raid6 sde2[2] sdb2[4] sda2[0] sdg2[1] sdf2[5] sdd2[3] sdc2[6](F)
7813629952 blocks level 6, 256k chunk, algorithm 2 [6/6] [UUUUUU]
unused devices: <none>
Now when i try to remove the last one
[root@sme-big ~]# mdadm --manage /dev/md127 --fail /dev/sdg1
mdadm: set device faulty failed for /dev/sdg1: Device or resource busy
Do i need to stop md127 somewhere?
-
md127 usually comes along when using a livecd like gparted. Gparted and other live cd's automatically renames md1 to a high md number so that it won't conflict.
If you are absolutely certain you do not need it anymore, you can unmount it:
umount /dev/md127
And then stop it:
mdadm -S /dev/md127
That should do it.