Is it possible to create a RAID array on files for testing purposes?
Suppose I want to create a level-1 RAID and I don't have for example 10 block devices to do that but instead I want to simulate that using files instead of block devices.
What I've done so far is this:
fallocate -l 1M disk1
fallocate -l 1M disk2
mkfs.ext4 disk1
mkfs.ext4 disk2
sudo mdadm --create --assume-clean --level=1 --raid-devices=2 /dev/md0 ./disk1 ./disk2
But after that I get the error :
mdadm: ./disk1 is not a block device.
Any idea?
mkfs
the raid components! The filesystem belongs on top of the RAID array, not below it, somkfs.ext4 /dev/md0
afterwards. Creating a filesystem on the components is useless at best and may confuse some tools. – TooTea Jun 29 '20 at 10:46The filesystem belongs on top of the RAID array
? Does RAID acts as a layer between the filesystems and the disks like what for example what device mapper does? – Parsa Mousavi Jun 29 '20 at 11:16