(original article)

Re: Converting RAID5 to RAID6 and other shape changing in md/raid

03 August 2010, 13:11 UTC

I am trying to shrink a raid 5 and reduce the nr of disks.

I am using mdadm v3.1.2 and kernel 2.6.32.12.

I have successfully shrunk the the raid using " mdadm --grow --array-size=2600000000 /dev/md0" and the file system seems ok after this.

I try to run "mdadm --grow --raid-disks=4 /dev/md0 /mdadm.backupfile" to reduce the nr of disks but I get "mdadm: --add cannot be used with other geometry changes in --grow mode" as a response. I have done this before a couple of times, but dont recall getting this message. I dont understand it, can someone tell me what is meant and what I can do about it?

This output might be useful: [root@cerberos/]# mdadm --detail /dev/md0 /dev/md0: Version : 0.90 Creation Time : Tue Sep 8 17:28:29 2009 Raid Level : raid5 Array Size : 2600000000 (2479.55 GiB 2662.40 GB) Used Dev Size : 976762496 (931.51 GiB 1000.20 GB) Raid Devices : 6 Total Devices : 6 Preferred Minor : 0 Persistence : Superblock is persistent

Update Time : Tue Aug 3 14:57:20 2010 State : clean Active Devices : 6 Working Devices : 6 Failed Devices : 0 Spare Devices : 0

Layout : left-symmetric Chunk Size : 128K

UUID : 7983e71a:77a9a523:89cd91be:8d911c05 Events : 0.793229

Number Major Minor RaidDevice State 0 8 0 0 active sync /dev/sda 1 8 48 1 active sync /dev/sdd 2 8 16 2 active sync /dev/sdb 3 8 32 3 active sync /dev/sdc 4 8 80 4 active sync /dev/sdf 5 8 96 5 active sync /dev/sdg

Thanks in advanced (and a big THANKS for the great mdadm that lets me do everything I can think about to my arrays without ever causing me problems).





[æ]