NAS filesystem: Migration from MacOSX to FreeBSD

All your general support questions for OpenZFS on OS X.

NAS filesystem: Migration from MacOSX to FreeBSD

Postby nixota » Tue Apr 04, 2023 10:23 pm

Hello everyone,

I'm using the OpenZFS_on_OSX on a NAS, that with a MAC with Mojave OS. Because of the 'end of life' of my machine and Mojave becoming non-upgradable/unreliable, I want to switch to FreeBSD and native OpenZFS.

Does that imply that I need to make any changes on the NAS OpenZFS_on_OSX filesystem? or will it be read by FreeBSD as it is? If in need of changes, i.e., switch to native OpenZFS on the NAS - what/how should that be performed exactly?

Thank you in advance for your expert feedback,
BR
nixota
 
Posts: 8
Joined: Tue Apr 04, 2023 10:12 pm

Re: NAS filesystem: Migration from MacOSX to FreeBSD

Postby lundman » Tue Apr 04, 2023 11:15 pm

Check the NAS version has all the pool features that you have active on macOS. If no issues there, in theory, it should import fine.

You could create a pool on a file, then copy file to FreeBSD, and check if you can import file on NAS.
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

[EDITED] Re: NAS filesystem: Migration from MacOSX to FreeBS

Postby nixota » Tue Apr 04, 2023 11:30 pm

lundman wrote:Check the NAS version has all the pool features that you have active on macOS. If no issues there, in theory, it should import fine.


FYI: the NAS is a Yottamaster headless hard drive enclosure (for example, like this one: https://yottamaster.com/products/yottamaster-4-bay-hard-drive-enclosure-with-cooling-fan)
and the zpool was created/initialized directly with the OpenZFS_on_OSX through my MAC.

You could create a pool on a file, then copy file to FreeBSD, and check if you can import file on NAS.


Thank you, will try that and verify if it works.

[EDITED]

But then... future PROBLEM? does that mean that it's not possible to fully switch to native OpenZFS instead of OpenZFS_on_OSX? that would entail that it will not be possible to patch/upgrade the NAS to future releases of native OpenZFS?

I wouldn't want to be stuck with a DOUBLE FS, i.e., the NAS hard drives' pool created/run with OpenZFS_on_OSX, separated from the computer running native OpenZFS. How to homogenize the whole system, if possible? E.g.,

1. backup all the data from the current pool
2. then format the NAS hard disks
3. reinstall and re-create the pool with native OpenZFS
4. import the backupped data on the NAS

Would that work? otherwise?

With Best Regards
nixota
 
Posts: 8
Joined: Tue Apr 04, 2023 10:12 pm

Re: NAS filesystem: Migration from MacOSX to FreeBSD

Postby lundman » Wed Apr 05, 2023 1:25 am

native OpenZFS instead of OpenZFS_on_OSX?


But, OpenZFS_on_OSX is the OpenZFS sources. FreeBSD "native ZFS" is the same OpenZFS sources. There is only one incompatible ZFS, and that is Oracle's ZFS. And that too is compatible if you make an old pool (version=28).

So be it OpenZFS_on_OSX, or "native ZFS", they are the same, and development on Open ZFS moves forward, there are chances of incompatibilities, but they are always compatible in the one direction (newer). If there are compatibility issues, its a bug. It might not be fixed right away, but they aren't planned to be incompatible.
User avatar
lundman
 
Posts: 1337
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: NAS filesystem: Migration from MacOSX to FreeBSD

Postby nixota » Wed Apr 05, 2023 3:23 am

That's great to know, thank you for the final explanation, all is clear now.

With Best Regards
nixota
 
Posts: 8
Joined: Tue Apr 04, 2023 10:12 pm

Re: NAS filesystem: Migration from MacOSX to FreeBSD

Postby Sharko » Thu Apr 06, 2023 2:54 pm

That Yottamaster product is not really a 'NAS'. A NAS is a "network attached storage," which implies that the data transfers over a network between the client and the NAS. A NAS isolates the data on the NAS from the data on the client, because the NAS runs its own operating system. That Yottamaster product appears to use USB3 as its connectivity option, so technically it is a 'DAS', or Direct Attached Storage. As a DAS, the format of the DAS data gets generated by the client.

OK, now on to your question. A while back I tried to bring an OpenZFSonOSX pool over to live on my TrueNAS box (which runs FreeBSD under the hood). It was an encrypted pool, and I had problems. This was, maybe, two years back, in the period where O3X was switching from the Linux source tree to the OpenZFS source tree, and a lot of code was in flux, so perhaps it was not surprising that it didn't work out of the box. I tried a couple of things to make it work, but in the end I had to drop back to doing ZFS send/receive over the network (as opposed to moving disks from one box to another).

I am reminded of the saying, "In theory, theory is the same as in practice. But in practice they can be quite different."

My point in telling this story is that I believe that if you want to be reasonably assured of NOT having problems down the road, then go the ZFS send/receive route. I believe that the adherence to the API is more ironclad when it comes to creating a new pool via send/receive than it is via importing an existing pool. To be double-plus sure, don't transfer an encrypted pool with the raw write (-w) option.

If it were me, I would even use two computers: one running a Mac Mojave operating system as the source, and a second Mac running the new FreeBSD operating system. The transfer would be through ssh over the network, thus avoiding an import altogether.

One issue with what I'm recommending is that it requires hardware to support a second pool as large as the data you currently have stored on the Yottamaster. This is because your data has to exist as a OpenZFSonOSX-generated zpool in one place, and get transferred into a native FreeBSD-generated pool in another place. You might be well advised to have this second pool anyway, as a test pool to try out the import process.

My advice is always try to have a way to get back to a working set of data (by having a clean clone of the data that isn't an imported pool). To the extent possible, minimize the situations where you are depending on data that is in one place only.
Sharko
 
Posts: 230
Joined: Thu May 12, 2016 12:19 pm

Re: NAS filesystem: Migration from MacOSX to FreeBSD

Postby nixota » Tue Apr 11, 2023 9:26 pm

Post by Sharko » Thu Apr 06, 2023 2:54 pm


Your suggestions are gold! Thank you.
nixota
 
Posts: 8
Joined: Tue Apr 04, 2023 10:12 pm


Return to General Help

Who is online

Users browsing this forum: No registered users and 26 guests