Other Existing RAID 1 from Ubuntu - Can I use in FreeBSD

I've got a software RAID 1 array that I created in Red Hat, which also has been recreated in Ubuntu (so I know it works). It has some invaluable data on it. I now have FreeBSD (OPNSense) on that machine. I'd like to just merge the two drives using whatever FREEBSD has to offer and get them mounted as a single drive (RAID). I see there's a graid command, and I've been googling for two days. I can't believe I am the only one that has this desire (to recreate a RAID that already exists with data on it without losing the data). Most things I've found talk about creating a new array.

Any thoughts or links on how one would do this? I have no desire to boot off the disk; it is just a data disk holding important information.
Regards,
Kurt
 
Dear Kurt,
if the data has a high value I would not run the disk connected to a FreeBSD system. It should be less risky to keep the original RAID1 array and to copy the files on a spare disk using the original operating system. In best case you have a spare computer and copy the files over a network. Then you can compare for example sha512 checksum of the original files with the copies. This is just my opinion. I am not sure if this is practical solution for your setup because it requires some spare hardware.
 
To my knowledge, there is no RAID implementation that's compatible with MDRAID's on-disk format on Linux. RAID is actually pretty complicated, and different RAID implementation use different on-disk formats for their data.

And even if there were a way to decode the RAID layer on FreeBSD, you probably have a second problem, with the layer above: the data on that RAID will be in some file system, for example ext4. There are very few file systems that have shared source high-quality implementations on both FreeBSD and Linux. There are reverse-engineered file system adapters, but I would not rely on those for production use.

My suggestion would be to either copy the data (as chrbr suggested), or install a copy of Linux in a virtual machine on FreeBSD, and use that Linux instance as a file server, exporting the data to FreeBSD for example using NFS. If the data is high-value, you probably have a backup anyway, so it might be easiest to just leave it on the MDRAID hardware, and (using separate hardware) restore the backup.

Another particularly interesting option is ZFS. To begin with, it is probably the best file system available for free, and it has its own RAID implementation in it. You could go back to Linux, migrate the data to ZFS, then transfer the same disks to FreeBSD and read the data from there. The only thing to be careful of is that the Linux and FreeBSD implementation are not in lockstep as far as features are concerned, so check which ZFS features are available on both, and only enable those features when creating the file system.
 
Back
Top