Other Reading a Linux RAID5 Partiton in FreeBSD

jjthomas

Member

Reaction score: 6
Messages: 96

I am converting a CentOS 7 server to FreeBSD 12.1. I have been able to access my Linux partitions with ext2fs. The system partition was a piece of cake, I just installed FreeBSD over it. The stumbling block has been to access my old Linux RAID5 Storage disks. The RAID5 Storage array was created with MDadm under Linux. I plan to set up a ZFS file system, but I need to get the data off of the Linux array, first. I've googled and what I found that a Linux RAID array is not compatible with FreeBSD. No surprise there. I just need to get the data.

And suggestions on how to accomplish this? I know worst comes to worst I can boot a Knoppix disk can just copy the data to an external backup hard disk. It shouldn't take more than a year... LOL

I've also thought about installing CentOS linux_base-c7. Although I'm not sure it would work because it has to go through FreeBSD devices, which I don't think is allowed?

Of course, there is also Virtual Box.

Any preferences or suggestions?

-JJ
 

ralphbsz

Son of Beastie

Reaction score: 1,610
Messages: 2,536

Do you have enough disk space to make a complete copy of the data?
Do you have a second server?
How much risk do you like?

There are many options. My favorite: declare the Linux RAID array to be read-only, connect it to a dedicated server running Linux, and then use the network to copy it slowly to new disk space on your FreeBSD server. Since all the data is immediately accessible, the copy perhaps doesn't have to be really fast.

My least favorite solution (but probably the most efficient): Set up a VM layer within Linux, and boot FreeBSD in it. Transfer the data to new disks "owned" by the new FreeBSD server. After you are all done, reinstall the FreeBSD server natively.

Here's a crazy one: In theory, ZFS pools are compatible between Linux and FreeBSD, if you set them up carefully (make sure to only use options that both systems know about). Keep running Linux, and attach the new disks to the old Linux server. Copy all the data into ZFS on the new disks. When all done, re-install FreeBSD on the server, and keep running the same disks.

I bet others can come up with another dozen variations. The real question is this: How convenient are they? And how high is the risk that somewhere in the middle of the really complex schemes, the sys admin (meaning: YOU) presses the wrong button and destroy everything?
 
OP
J

jjthomas

Member

Reaction score: 6
Messages: 96

I do not know how much data is on the array. It was used to record programms from MythTV.

I have a DAW that runs Windows 10, with 5TB of space on a RAID 1 storage drive.

I would like to preserve the data, but if it gets lost, I won't cry over it.

I like the idea of copying it to my DAW.

I think I will go with the VM idea.

The crazy one won't work, I've already installed FreeBSD. I did look at installing ZFS on CentOS. I really like ZFS. But, I went with ext4.

I performed the rm command with the switches r and f from the root directory. Once! After I got up to refill my soda, I realized what I had done. Made a nice doorstop. LOL Learn and live.
 
OP
J

jjthomas

Member

Reaction score: 6
Messages: 96

The VM didn't work, I am unable to access any hard disk from within the VirtualBox. Even running VirtualBox from a root desktop, did not give me access. I started another thread on that subject.

I did find out I have about 1.68 TB on the RAID partition.

Would installing emulators/linux-c7 be an option?

-JJ
 

mjollnir

Daemon

Reaction score: 736
Messages: 1,176

As SirDice pointed out in that other thread, FreeBSD does not support the Linux mdadm RAID format. With aliases
Code:
  rlist: query "[%n-%v] %Fp",
  rlist-all: query -a "[%n-%v] %Fp",
in /usr/local/etc/pkg.conf and pkg rlist-all|less, I find only sysutils/webmin to contain some mdadm stuff.
My emulators/linux_base-c7 does not have mdadm. I do not know how the relevant command in Linux is called, though. I'd bet you have to copy the data from within a Linux host (boot USB stick) to some other drive & import into FreeBSD.

EDIT: Sorry, the strikeout stuff is nonsense... you can instead find -name 'pkg-plist*'|xargs grep through /usr/ports/emulators to find the executable you need.
 

ralphbsz

Son of Beastie

Reaction score: 1,610
Messages: 2,536

I think the easiest way to transfer the data is to run the RAID layer and the file system on Linux, and then use some form of network protocol (NFS?) to move the data to FreeBSD.
 
Top