Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mdadm problem adding disc to raid 6
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
xibo
Apprentice
Apprentice


Joined: 21 Aug 2007
Posts: 152
Location: moving between kubuntu and ubuntu kde edition

PostPosted: Sun Dec 20, 2009 9:38 am    Post subject: mdadm problem adding disc to raid 6 Reply with quote

hello,

i m trying to expand a raid 6 array by a disc. i partitioned it to have a single partition of type 0xfd, like all already present discs of the array and have the same partition size, and successfully added the new partition to the array as a spare. however, when i try to grow the array, mdadm aborts saying

Quote:

mdadm --grow --raid-devices=7 (it's having 6 active discs plus 1 spare)
mdadm: this change will reduce the size of the array.
use --grow --array-size first to truncate array.
e.g. mdadm --grow /dev/md0 --array-size 588832384


i tryed reducing array-size by like 30% and tryed growing again, but it still doesn't work.

maybe usefull information:
Quote:

mdadm --detail
/dev/md0:
Version : 0.90
Creation Time : Sun Apr 26 22:15:17 2009
Raid Level : raid6
Array Size : 3907039744 (3726.04 GiB 4000.81 GB)
Used Dev Size : 976759936 (931.51 GiB 1000.20 GB)
Raid Devices : 6
Total Devices : 7
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sun Dec 20 10:28:15 2009
State : clean
Active Devices : 6
Working Devices : 7
Failed Devices : 0
Spare Devices : 1

Layout : left-symmetric
Chunk Size : 64K

UUID : 1264f470:e88147ab:3e948e8a:28f597c6
Events : 0.686657

Number Major Minor RaidDevice State
0 8 113 0 active sync /dev/sdh1
1 8 129 1 active sync /dev/sdi1
2 8 81 2 active sync /dev/sdf1
3 8 49 3 active sync /dev/sdd1
4 8 65 4 active sync /dev/sde1
5 8 97 5 active sync /dev/sdg1

6 8 33 - spare /dev/sdc1

cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md0 : active raid6 sdc1[6](S) sdi1[1] sdh1[0] sdg1[5] sde1[4] sdf1[2] sdd1[3]
3907039744 blocks level 6, 64k chunk, algorithm 2 [6/6] [UUUUUU]

unused devices: <none>

mdadm --version
mdadm - v3.1.1 - 19th November 2009

cat /proc/version
Linux version 2.6.32.2 (root@ip002) (gcc version 4.4.2 (Gentoo 4.4.2 p1.0) ) #3 SMP Sun Dec 20 09:36:25 CET 2009
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Sun Dec 20, 2009 10:07 pm    Post subject: Reply with quote

does your kernel have the support option activated to grow a raid6 device?

Try this:

Code:
mdadm --grow /dev/md0 --size=max


...and see if it works.
Back to top
View user's profile Send private message
xibo
Apprentice
Apprentice


Joined: 21 Aug 2007
Posts: 152
Location: moving between kubuntu and ubuntu kde edition

PostPosted: Sun Dec 20, 2009 11:37 pm    Post subject: Reply with quote

richard.scott wrote:
Try this:

Code:
mdadm --grow /dev/md0 --size=max


...and see if it works.

the command successfully terminates, but it only resets the amount of blocks used of each device ( instead of the number of active devices ).

richard.scott wrote:
does your kernel have the support option activated to grow a raid6 device?


i don't have the option availible in menuconfig, nor is disabled in .config . i remember having seen it in the past though... did it become too unstable or do i need a special patch or something like that? ( i thought it was integrated to raid6 support now )

Quote:

cat /usr/src/linux/.config | grep CONFIG_MD --after-context=25
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_AUTODETECT=y
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
CONFIG_MD_RAID1=y
# CONFIG_MD_RAID10 is not set
CONFIG_MD_RAID456=y
# CONFIG_MULTICORE_RAID456 is not set
CONFIG_MD_RAID6_PQ=y
# CONFIG_ASYNC_RAID6_TEST is not set
CONFIG_MD_MULTIPATH=m
# CONFIG_MD_FAULTY is not set
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_DEBUG is not set
CONFIG_DM_CRYPT=m
# CONFIG_DM_SNAPSHOT is not set
CONFIG_DM_MIRROR=m
CONFIG_DM_LOG_USERSPACE=m
CONFIG_DM_ZERO=m
CONFIG_DM_MULTIPATH=m
CONFIG_DM_MULTIPATH_QL=m
CONFIG_DM_MULTIPATH_ST=m
CONFIG_DM_DELAY=m
# CONFIG_DM_UEVENT is not set
# CONFIG_FUSION is not set
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Mon Dec 21, 2009 8:05 am    Post subject: Reply with quote

I've just re-read this (now I'm awake):

Code:
Number Major Minor RaidDevice State
0 8 113 0 active sync /dev/sdh1
1 8 129 1 active sync /dev/sdi1
2 8 81 2 active sync /dev/sdf1
3 8 49 3 active sync /dev/sdd1
4 8 65 4 active sync /dev/sde1
5 8 97 5 active sync /dev/sdg1

6 8 33 - spare /dev/sdc1


You have 6 disks, and a spare... this means that you have 4 usable disks, two for parity and 1 spare. totalling the 7 you have in your system.
Your array looks to be at its max size, as you can't use a spare as its a spare.

Rich
Back to top
View user's profile Send private message
xibo
Apprentice
Apprentice


Joined: 21 Aug 2007
Posts: 152
Location: moving between kubuntu and ubuntu kde edition

PostPosted: Mon Dec 21, 2009 12:40 pm    Post subject: Reply with quote

That's what I want to change: reshape the array to have 5 data and 2 parity devices...
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Mon Dec 21, 2009 1:08 pm    Post subject: Reply with quote

What you had before should have worked:

Code:
mdadm --grow /dev/md0 --raid-disks=7


I found it on this page:
http://www.kolbu.com/2007/01/10/growing-raid5-sets-in-ubuntu/

Did you remember to include the "/dev/md0" as you haven't listed that in your output?

Rich
Back to top
View user's profile Send private message
xibo
Apprentice
Apprentice


Joined: 21 Aug 2007
Posts: 152
Location: moving between kubuntu and ubuntu kde edition

PostPosted: Mon Dec 21, 2009 1:36 pm    Post subject: Reply with quote

I just found out it seems to be a mdadm-3.1.1 bug: http://marc.info/?l=linux-raid&m=125920566107815&w=2

recompiling right now...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum