On Fri, November 18, 2011 1:33 am, Mark Knecht wrote: > On Thu, Nov 17, 2011 at 4:21 PM, Neil Bothwick <n...@digimed.co.uk> wrote: >> On Thu, 17 Nov 2011 16:13:09 -0800, Mark Knecht wrote: >> >>> > Do you have separately partitioned drives with those partitions >>> > arranged into single-partition arrays, or do you have one RAID device >>> > that is then partitioned? >>> > >>> > If the latter, you should certainly work with the md device. >>> > >>> > I prefer to avoid all this confusion by creating a large, single >>> > partition array that I use an an LVM physical volume. >>> >>> Separately partitioned drives arranged into RAID arrays. >> >> So you have three partitions arranged into a single RAID5 partition, >> say /dev/md1? >> >> In that case, the size of /dev/md1 should already be correct and you >> only >> need to resize the filesystem and you should ignore my witterings about >> fdisk that filed to take into account your use of RAID. >> resize2fs /dev/md1 should be all you need, you shouldn't even need to >> unmount the filesystem. >> > > I have 3 partitions which were previously RAID-1. I've already failed > one drive so at this moment it's a 2-drive RAID-1. I'm attempting to > get those two remaining 2 partitions converted to RAID-5 the command > suggested on the RAID list for doing that isn't working for me. > > Once the 250GB RAID-1 is converted to RAID-5 i have to add a new drive > back in to become a 3-drive RAID-5. The drive I add will be the drive > I just failed. > > c2stable ~ # mdadm --grow /dev/md6 --level=5 > mdadm: /dev/md6: could not set level to raid5 > c2stable ~ # > > c2stable ~ # mdadm -D /dev/md6 > /dev/md6: > Version : 1.1 > Creation Time : Thu Apr 15 10:45:35 2010 > Raid Level : raid1 > Array Size : 247416933 (235.96 GiB 253.35 GB) > Used Dev Size : 247416933 (235.96 GiB 253.35 GB) > Raid Devices : 2 > Total Devices : 2 > Persistence : Superblock is persistent > > Update Time : Thu Nov 17 13:27:20 2011 > State : clean > Active Devices : 2 > Working Devices : 2 > Failed Devices : 0 > Spare Devices : 0 > > Name : c2stable:6 (local to host c2stable) > UUID : 249c7331:a8203540:c8f3b020:fb30a66b > Events : 1039 > > Number Major Minor RaidDevice State > 0 8 6 0 active sync /dev/sda6 > 1 8 22 1 active sync /dev/sdb6 > c2stable ~ #
I have never had to change a RAID-1 to RAID-5, but I would do it as follows: 1) Fail 2 drives from the RAID-1 2) Remove those 2 drives from the RAID-1 3) Create a new RAID-5 (with failed disk) using the 2 removed drives 4) Copy the data over from the RAID-1 to the RAID-5 5) Remove the RAID-1 6) Add the third drive to the RAID-5 and let it rebuild. I don't know the commands for the above from memory, but I'm sure some of this is in the man-page. -- Joost > > >