# Unable to expand RAID 5 with EVMS (a.k.a EVMS headbanger!)

## cartmanidis

I have installed gentoo onto a new computer, in order to make a RAID5 file server with samba so as to keep my files safely, and away from Windows  :Smile:  For RAID i chose EVMS, due to its gui and mainly due to its stated ability to expand RAID 5 arrays. That would enable me to begin with a 3 drive RAID and gradualy expand it to an 8 drive one. So, when the time came to expand my raid volume, i bought 2 drives, installed them and then tried to do the expand. I followed every kind of instruction i could find on g$$gle, as EVMS's documentation is not clear about this situation. 

The problem is that whatever i do, the "expand" option does not appear over my md-raid 5 region, or the jfs volume.

Here is what i am doing:

```
evmsn
```

i tab to 5=disk segments screen, go to the freespace of my 2 new drives, and create a 277.7GB segment on them, just as i did when i created the raid.

[img=http://img356.imageshack.us/img356/5124/5disksegments0xk.th.gif]

(if anybody knows how to make screenshots appear on the post directly plz tell it)

then they appear on 1=Available objects screen

[img=http://img384.imageshack.us/img384/9824/1availableobjects2he.th.gif]

i then save and quit. i unmount my jfs raid5 volume, and move the jfs lib away from /lib/evms/2.5.4 as evms.sourceforge.net/faq.html suggests. then i fire up evmsn again.

[img=http://img303.imageshack.us/img303/4646/0logicalvolumesnojfs8br.th.gif]

then i deactivate the volume, and after that i deactivate the md/md0 storage region and save

[img=http://img412.imageshack.us/img412/8564/3storageregions8fj.th.gif]

then i press enter and see that my available options do not include the expand one. (in the screenshot the region appears to be active, i tried both ways). Also in the actions menu i cannot find anything that has something to do with resizing the region, except for the actions->expand menu, but anything that appears there does not have my raid region as an option.

[img=http://img384.imageshack.us/img384/3997/3storageregionsoptions9xf.th.gif]

my logical disks are:

[img=http://img356.imageshack.us/img356/4099/6logicaldisks4ti.th.gif]

i have tried many many things, activating, deactivating disks, moving back and forth the jfs lib and anything else i could find on the web and irc. 2 days now i an trying to solve the problem but to no avail. so please help me.

i have Gentoo AMD64, kernel is 2.6.12-gentoo-r10 with everything that should be enabled for raid and evms. my hardware is an AMD Sempron 2800+, ASUS K8N4-E Deluxe with Nforce4 (or CK804 as linux sees it) with 4 sata ports, and 4 more sata ports on a SiI 3114 onboard controller. Hard disks are 4 maxtor sata's and one maxtor sataII, all of them 300GB (the sataII maxtor is on the sil controller because i have read it is incompatible with nforce4)

EVMS version was 2.5.3-r1 when i made the raid (followed the instructions for evms on the wiki), and i tried to expand the raid with 2.5.3 and 2.5.4 versions. also tried the livecd 2005.1

i have created the raid by creating 3 277.7GB segments, then created a MD RAID 5 region over them, then made an evms volume over it and finaly made a jfs filesystem over it. i didnt use lvm

----------

## flash49

I haven't done this myself, but soon i'll have to do it.    :Wink: 

Have you checked the menu? Does "Action->Expand->Storage Object" show your raidset? The raidset mußt be deactivated and the jfs evms-driver mußt be disabled, if I remember correctly.

----------

## cartmanidis

unfortunately it only shows my 2 new disks. i tried it again now following your instructions

----------

## cartmanidis

also been trying with small 1 GB partitions. it seems that raid 5 md partitions are not resizable, or i am doing something terribly wrong

----------

## Angrybob

has anyone solved this? I just created a raid5 region with 3 200Gb disks and I want to add another one, I've deactivated the region and it now gives me the option of adding a spare disk but thats not what i want... i want to add another proper disk

[edit]

doh, silly me i found out how to do it... when i went expand > storage container it brought up a window showing my lvm2 volume but then when i clicked next it gave me the option of expanding the raid array below it  :Smile: 

it seems to think it will take over ten hours?!?!?! I hope thats wrong because that's just crap

----------

## Sachankara

 *Angrybob wrote:*   

> it seems to think it will take over ten hours?!?!?! I hope thats wrong because that's just crap

 Change the default sync value by changing this:

```
/proc/sys/dev/raid/speed_limit_min
```

For example:

```
echo 30000 > /proc/sys/dev/raid/speed_limit_min
```

This will result in a sync speed of ~30 MiB/s...

----------

## Angrybob

 *Sachankara wrote:*   

>  *Angrybob wrote:*   it seems to think it will take over ten hours?!?!?! I hope thats wrong because that's just crap Change the default sync value by changing this:
> 
> ```
> /proc/sys/dev/raid/speed_limit_min
> ```
> ...

 

oh ok... but is it safe to do that while it's already running?

----------

## Sachankara

Yep, it's quite "dynamic"...  :Smile: 

----------

## Angrybob

hmm... tried setting both min and max very high but the speed hasn't changed at all, still only 20% done and 8 hours to go  :Sad: 

----------

## Sachankara

Hmm... What does "cat /proc/mdstat" say? Maybe your hardware is already at its peak performance and it's impossible to get it faster without new hardware...

Keep speed_limit_max at 200000 (which is the default).

----------

## Angrybob

```

Personalities : [raid5]

unused devices: <none>

```

also, not sure if this is relevant but if i run top i can see evmsgui using about 30% cpu but i dont see anything like md_raid running, and I'm pretty sure that last night when i initially setup the raid there was some kernel md_raid thing running and using cpu.

evmsgui says "Expanding raid5 region md/md0" in its status bar so I'm guessing its doing something useful  :Smile: .....

----------

## Angrybob

the computer is an athlon xp 2400 with a gig of ram... not great but i would have thought it would be a bit quicker than this

----------

## Angrybob

ok after 10 hours of evms gui supposedly expanding my raid array it finally finished, and now when i look at /proc/mdstat i see that the real work is being done..... what the hell was evms gui doing all that time??!?!?!?!?!?!

```

Personalities : [raid5]

md0 : active raid5 dm-5[3] dm-2[2] dm-1[1] dm-0[0]

      586063872 blocks level 5, 4096k chunk, algorithm 0 [4/4] [UUUU]

      [>....................]  resync =  2.4% (4779840/195354624) finish=147.0min speed=21603K/sec

unused devices: <none>

```

is evmsgui just broken? should i stick to the commandline tools or what?!.... now that I've expanded the md5 region I'll need to expand the lvm2 region and the ext3 fs on top of that... hopefully that wont take 10 hourse as well

----------

## thyrihad

Expanding a RAID5 array is complex and requires mass moving of data and resizing of filesystems.

EVMS spent 10 hours doing that.  Your RAID subsystem decided a re-sync was called for after EVMS was done.

By the way, you don't need MD kernel support for RAID volumes if you use EVMS.  EVMS has it's own RAID support - maybe you will get faster expansion performance when using it.  Remove CONFIG_BLK_DEV_MD from your kernel to use it.

----------

## bilan

Thyrihad did u sucess adding active or spare disk ?

I created a 2-disks mirroring raid and a 3-disks raid5.

When I click "enter" on md/md0 disk it it propose me to add spare or active object. But not when I click on the raid5 md/md1   :Sad: 

I did not create any volume, and no fs at all, at the moment.

Please, help me.

----------

