I have existing RAID0
setup with two disks. I have to add a new drive to it. But when I try to run the following command:
mdadm --add /dev/md/customer_upload /dev/xvdl
I get an error:
mdadm: add new device failed for /dev/xvdl as 2: Invalid argument
How do I add a new disk to an existing RAID0?
I used the following steps to create RAID 0 initially:
sudo mdadm --create --verbose /dev/md/customer_upload --level=stripe --raid-devices=2 device_name1 device_name2
EDIT
Seems like you cannot add disk to RAID0.
I ran the following command and it made it RAID4
How & Why I am still not clear
/dev/md/customer_upload --grow -l 0 --raid-devices=3 -a /dev/xvdl
I can see three disks in RAID4 but total space is still 2Tb
xvdf 202:80 0 1T 0 disk
└─md127 9:127 0 2T 0 raid4 /customer_upload
xvdg 202:96 0 1T 0 disk
└─md127 9:127 0 2T 0 raid4 /customer_upload
xvdl 202:176 0 1T 0 disk
└─md127 9:127 0 2T 0 raid4 /customer_upload