1

I'm trying to setup a raid array for a server. The array is going to be RAID 5, consisting of 4 disks, sdc, sdd, sde, sdf

I need three partitions of specific sizes (2gb 200gb 700gb) and they need to be unformatted. Trying to partition /dev/md0 in parted yielded the following :

Error: Input/output error during read on /dev/md0
Retry/Ignore/Cancel? R

I did some research and it seemed like it was not possible to partition an md device. So I did some more research and it seemed like it would be possible to create three RAID 5 arrays with the respective partitions being used as the raid devices. This yielded the following results:

[$user@$server ~]$ sudo mdadm --create --verbose --force /dev/md0 --level=5 --raid-devices=4 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1
[sudo] password for $user:
mdadm: layout defaults to left-symmetric
mdadm: layout defaults to left-symmetric
mdadm: chunk size defaults to 512K
mdadm: size set to 1997824K
mdadm: Defaulting to version 1.2 metadata
mdadm: Failed to write metadata to /dev/sdc1

I couldn't find any documentation regarding that error. I'm wondering how to go about accomplishing this as simply creating a /dev/md0 with the device names would just overwrite the partition table, leaving me right back where I started.

If anyone could shed some light on this, I'd be grateful. Thanks

  • First, make sure you can read and write all of the devices you're going to use. Make a filesystem on each one, mount it, copy some stuff onto it and off of it. Second, what does `mdadm --version` say? The message `Failed to write metadata` doesn't appear in any mdadm source I've seen. And lastly, consider not doing RAID 5 as your first go-round with Linux MD raid and mdadm - if something goes wrong, you're going to be installing from backups. You'll lose a lot more space with RAID 1, but it's far more forgiving! – Mike Andrews Jun 16 '19 at 12:29

0 Answers0