mdadm - forgot to set up partitions
The problem here is entirely my fault - adding an extra disk at an odd time in the morning, I think I missed out a step.
Original setup: /dev/md0 is a raid5 array, 3 disks, 500GB each, /dev/sd[bcd].
Hardware modification: Added 2 new disks, 1TB each.
Intended change: Add /dev/sd[ef]1 to /dev/md0. Create /dev/md1 using /dev/sd[ef]2.
What actually happened: Added /dev/sd[ef] to /dev/md0. I think I should have partitioned it first, but only realized this after doing all the LVM stuff and resize2fs.
So ... how do I make use of the remaining 500GB on my newer disks?
My first guess would be to remove one drive from the array, partition it properly, and then re-add it. Is this a sane solution? Is it possible to turn a /dev/sde into /dev/sde1 without losing the data on it? I never really used partitions before, so I'm not sure how to go about this.
I guess if all else fails, I can just knock one disk out of the array, fdisk, and rebuild the array as if I'd replaced the disk. Or am I missing something really obvious here?
Replace the first disk with 1 TB as well? So you end up with a 1 TB RAID5 array without partitions...
That was just an idea.
I don't see the difference between the last to options you propose, but it seems sound anyway. Take one disk out of the RAID, repartition and add the new partition to the RAID, rebuild. Once that it finished, do the same for the second new one.
BTW, what are you doing with the additional 500 GB you have on the new disks? Using them unRAIDed?
fdisk /dev/sdg (create 2 500GB partitions on the extra disk)
dd if=/dev/sde of=/dev/sdg1
Then use /dev/sdg1 to replace /dev/sde in the raid config, and repeat for the other unpartitoned disk.
As far as I understand it, if I repartition my sde and then add sde1 to the array where sde was, I'd have to rebuild the 'new' disk as if I was replacing a failed one. That means no redundancy for 24 hours, and I'd rather not do that if there's any alternative.
So, the question could be restated as:
Is it possible to partition my disk so that /dev/sde1 contains the data formerly found in /dev/sde? Does this just work anyway?
If I'm missing something obvious here, please give me a pointer.
Do not you need to:
1. Partition the disks
2. Add a system file to the disk: RAID "df"
3. Format the partition and run partprobe or reboot the server.
4. then #mdadm -a /dev/md.. /dev/sd..
Why/how do I need to format the partition?
So far, the plan I've got is:
|All times are GMT -5. The time now is 02:38 AM.|