I want to create a second partition on a software RAID 5 created on debian stretch.
To create it I used
mdadm --create /dev/md0 --auto md --level=5 --raid-devices=4 /dev/sda1 /dev/sdc1 /dev/sdd1 /dev/sdb1. The partitions have a GPT label and are tagged to be used for RAID.
The mdadm(8) manpage says
In Linux kernels prior to version 2.6.28 there were two distinctly different types of md devices that could be created: one that could be partitioned using standard partitioning tools and one that could not. Since 2.6.28 that distinction is no longer relevant as both type of devices can be partitioned. mdadm will normally create the type that originally could not be partitioned as it has a well defined major number (9).
I guess I need to create a udev rule or something like that to get a second partition, but can't find detailed documentation about HOW to do it, just that it is possible.
I finally want to create a LVM layer between the RAID and fs layers, but the filesystem is already filled by about 40% and I don't have enough extra storage to save the data elsewhere. Therefore I wanted to create a second partition after shrinking the filesystem, copy the data from my existing partition to the new one, delete the old partition, create the LVM layer, move data back and grow the LVM layer over the full RAID.