Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#27507 - [mdadm] Cannot --grow Raid0 array from 2 devices to three in mdadm Linux 3

Attached to Project: Arch Linux
Opened by Ray Clancy (lilsirecho) - Friday, 09 December 2011, 14:53 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 29 November 2012, 15:49 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas B├Ąchler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Description:Mdadm --grow command allows raid0 to be expanded to additional devices as described in mdadm --grow ...............................................

From 2.6.35, the Linux Kernel is able to convert a RAID0 in to a RAID4
or RAID5. mdadm uses this functionality and the ability to add devices
to a RAID4 to allow devices to be added to a RAID0. When requested to
do this, mdadm will convert the RAID0 to a RAID4, add the necessary
disks and make the reshape happen, and then convert the RAID4 back to
Prior to linux3, the procedure to perform this --grow was as follows:

[code] mdadm --grow /dev/md0 --raid-devices=3 --add /dev/sdc2[/code]

Utilizing this command in Linux3 results in an error: could not open raid4....

This user does not know what proceeds from the mdadm --grow command such that a resync in raid4 mode occurs followed by a return to raid0. This seems to be a kernel function but is not elucidated. This is implied in the above excerpt from the man mdadm file.

I request a review of linux3 with the aim to re-establish the --grow command as defined in mdadm for raid0 arrays. This function was utilized many times by this user before linux3 and was outlined in man mdadm as a special case requiring both --grow and --add to be utilized in the same command.

Perhaps there is a new command required to establish the change in raid0?

I am unable to utilize linux3 install to generate the same raid0 bootable array for archlinux as I now have in my array. I wish to utilize the mdadm --grow command as outlined in man mdadm while booted into linux3.

My present array is upgraded to linux 3.1.1-1 and functions well at 179MB;/s.

Other problems with linux raid array performance occur but are not included in this report.

I realize that this report is not a common problem but it does describe a failed function which is defined in man pages for mdadm involving the kernel parameters.

I have attempted this with /dev/md0 mounted, not-mounted, and stopped.

Additional info: [code]sh-4.2# mdadm --grow /dev/md0 --raid-devices=3 --add /dev/sdc2
mdadm: /dev/md0: could not set level to raid4
sh-4.2# [/code]

* package version(s)[code]sh-4.2# cat /proc/mdstat
Personalities : [raid0] [raid6] [raid5] [raid4]
md0 : active raid0 sda2[0] sdb2[1]
15588864 blocks super 1.2 512k chunks

unused devices: <none>
sh-4.2# [/code]

* config and/or log files etc.

Steps to reproduce:
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Thursday, 29 November 2012, 15:49 GMT
Reason for closing:  No response
Comment by Ray Clancy (lilsirecho) - Saturday, 10 December 2011, 03:16 GMT
System in use is x86_64....
Trials run in linux 3.1.4-1-x86_64

initramfs-linux.img shows raid0 listed....

Don't know if the kernel has mdadm raid4 capability as is required for --grow with raid0 as described in man mdadm.....

Present status of raid0 array is it is bootable in linux3.1.1-1 version with ....root=/dev/md0...added to the kernel line...uuid not recognized can't determine major-minor number of root device without the kernel line added.
The above procedure doesn't work with linux3.1.4-1 version.

Am able to upgrade with pacman and operate archlinux normally in raid0 bootable x86_64 but have trouble with the grow of the array.

Desireable to have a larger array to allow for more cells in the compact flash devices used for the array and thereby extend the active life of the array.
Additionally, the array can be rejuvenated by copying the flash devices to new devices if such is desired. This also extends the life indefinitely for the array.
I include the following data for the linux3.1.4-1 version which is needed for making the --grow operations[code][root@n6re ~]# lsinitcpio -a /boot/initramfs-linux.img
==> Image: /boot/initramfs-linux.img
==> Kernel: 3.1.4-1-ARCH
==> Compressed with: gzip
-> Compression ratio: .566
-> Estimated decompression time: 0.108s

==> Included modules:
ata_piix hid-roccat-pyra
cdrom hid-samsung
ehci-hcd hid-sjoy
ext3 hid-sony
fb_sys_fops hid-speedlink
ff-memless hid-sunplus
hid hid-tmff
hid-a4tech hid-topseed
hid-apple hid-twinhan
hid-axff hid-uclogic
hid-belkin hid-wacom
hid-cherry hid-waltop
hid-chicony hid-wiimote
hid-cypress hid-zpff
hid-dr hid-zydacron
hid-elecom jbd
hid-emsff lcd
hid-ezkey libata
hid-gaff mbcache
hid-gyration md-mod
hid-holtekff pata_acpi
hid-kensington raid0
hid-keytouch sata_sil24
hid-kye scsi_mod
hid-lcpower sd_mod
hid-logitech snd
hid-magicmouse snd-hwdep
hid-microsoft snd-page-alloc
hid-monterey snd-pcm
hid-multitouch snd-rawmidi
hid-ntrig snd-seq-device
hid-ortek snd-timer
hid-petalynx snd-usb-audio [explicit]
hid-picolcd snd-usbmidi-lib
hid-pl soundcore
hid-prodikeys sr_mod
hid-quanta syscopyarea
hid-roccat sysfillrect
hid-roccat-arvo sysimgblt
hid-roccat-common uhci-hcd
hid-roccat-kone usbcore
hid-roccat-koneplus usbhid
hid-roccat-kovaplus usb-storage

==> Included binaries:

==> Hook run order:

[root@n6re ~]# [/code]

Can provide further info as requested....................

Comment by Ray Clancy (lilsirecho) - Thursday, 15 December 2011, 17:32 GMT
sh-4.2# mdadm --grow /dev/md0 --raid-devices=3 --add /dev/sda2
mdadm: level of /dev/md0 changed to raid4
mdadm: Cannot open /dev/sda2: Device or resource busy
mdadm: /dev/md0: Cannot get array details from sysfs
sh-4.2# mdadm --grow /dev/md0 --raid-devices=3 --add /dev/sda2
mdadm: Cannot understand this RAID level
Comment by Ray Clancy (lilsirecho) - Thursday, 15 December 2011, 17:38 GMT
sh-4.2# cat /proc/mdstat
Personalities : [raid0]
md0 : inactive sdd2[1] sdc2[0] sda2[2](S)
23398400 blocks super 1.2

unused devices: <none>
Three 8GB devices involved. The added device listed as spare.
If remove the added spare, raid0 is restored in the remaining devices.

Contrary to mdadm man pages, the raid4 procedure does not complete with a raid0 result, possibly because /dev/sda2 is reported as busy. It is not mounted nor in use AFAICT.
Comment by Tobias Powalowski (tpowa) - Tuesday, 06 November 2012, 11:21 GMT
Is this still an issue?