Details
- Reviewers
cjlcarvalho stikonas
Diff Detail
- Repository
- R16 KPMCore
- Branch
- resize-raid (branched from raid-support)
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 10576 Build 10594: arc lint + arc unit
I think that maybe you are trying to grow arrays in a wrong way. Use the complete command with "--manage --add" instead of only using "--add".
You may also need to run
mdadm --grow --raid-devices=[new quantity of devices] path
before finishing the operation.
And mdadm does not update the configuration file after growing an array, so you should include the modification of it to update the number of devices in the array, otherwise udev will not locate the array devices properly after reboot.
Also take a look if you may need to resize the file system of the active array to take advantage of the added device.
src/core/raid/softwareraid.cpp | ||
---|---|---|
91 | Missing semicolon | |
91 | Use mdadm --manage --add path args instead of mdadm path --add args | |
99 | Please indent |
Good! Another thing that you still need to do is edit the mdadm configuration file with the new quantity of devices in the array.
After fixing that, you will need to do two more things to allow the growing process of RAID devices in partitionmanager.
The first thing is adapting ResizeVolumeGroupJob (src/jobs/resizevolumegroupjob) and ResizeVolumeGroupOperation (src/ops/resizevolumegroupoperation) in kpmcore to allow the process of growing RAID devices, using the Job to call your SoftwareRAID::growArray method. Now they are only allowing kpmcore to resize LVM. You can take a look at CreateVolumeGroupJob and CreateVolumeGroupOperation to see how I have adapted them to create RAID devices, because they only allowed LVM before that.
The second thing is basically to modify the ResizeVolumeGroupDialog in partitionmanager to enable the resize of RAID devices. Then you can do the operation through this GUI and test if the arrays are growing properly.