ZFS ZFS help

Hello,
I have some zfs disks I need to get into.
I had a bunch of old computer parts laying around a couple years ago and put together a box with FreeNAS. After our move, the box wouldn't turn on, so I pulled my disks and scrapped it.

Using zfs on linux, I can find the disk and get a pool id, and get a warning that it was last accessed on a different machine, but on trying to import I'm told it's unavailable.

The data isn't critical, but it would SURE be nice to have.

Thanks, and apologies if I'm in the wrong spot.
 
If your having problems importing a zpool on a Linux distro, asking this question in the relevant Linux forums might be a better way to go in getting a good answer.

The version of ZFS Linux uses is not the same as the version of ZFS FreeBSD and it's derivatives use. Most of the time zpools created on Linux can be imported in FreeBSD and it's derivatives but the opposite is not usually the case due to the differences in features between the two ZFS versions. Linux is still lagging a bit in feature parity with ZFS compared to FreeBSD.

You could try booting from a FreeBSD install image, dropping to a shell, attempt to import the pool, and if successful copy the data to an external disk(s) pre-setup with a zpool on Linux. This would be done at your own risk of course.
 
Thanks for the advice. I take it the FreeBSD install image is similar to a linux live cd? Or do I need to use a separate machine to install FreeBSD? I'll head over to a Linux forum next.
 
I had another thought. Would I be better off finding a machine similar to the one I had (Dell Dimension 4600) and installing my drives in it? I still have the drive I installed the FreeNAS to, so I would expect it to boot from there. Or will I have issues with the fact that the drives will be in different locations on the motherboard?
 
You don't have to install FreeBSD to import the pool. dropping to the shell in a FreeBSD install CD gives you a complete live FreeBSD environment to play with and do what you need to without installing.

The nice thing about ZFS is it is portable. As long as the pool(s) and the disks holding the pool(s) are intact, you can put the disks in any machine running FreeBSD and import the pool. Keep in mind however the zpool version used to create the pool must be the same version or above on the installed version of FreeBSD or one of it's derivatives in order to be able to import the pool without issue.

So in short, if you install the most recent version of FreeBSD or FreeNAS on any computer, you should be able to add the disks and import the pool without problems as long as the disk(s)s and the pool(s) on them is still intact. I'm not familiar with FreeNAS, so there may be other things you need to do to import the pool first. I would ask this question on their forums before attempting it if you want to go with FreeNAS.
 
That's really encouraging. Supposing I use FreeBSD and I can import the pools, how would I go about saving the data on my drives? You mentioned another drive formatted for ZFS. If I save the data to that drive, will I have the same problem accessing it later? Or is it likely that I am having this problem because I didn't export the pools before the machine broke?
 
For instance, I'm doing this on a rig I built with Windows/Linux, and I have a 1tb drive that has more than enough free space. Will I be able to access that in FreeBSD without formatting it first, and save directly to it?
 
Assuming Linux is already installed on the computer in question, generally you would do the following:
  1. Boot into Linux and create a new zpool on the 1TB disk(use the whole disk, do not try to juggle partitions)
  2. Export the pool after being created.
  3. Reboot the PC and boot using the FreeBSD install media.
  4. Choose shell at the installation screen.
  5. Once in the shell, import both the old zpool and the new zpool
  6. Create a new snapshot of the old pool.
  7. Use the zfs send/receive commands to send the data from the old zpool to the new zpool.
  8. Once the data is sent, export both zpools.
  9. Reboot the PC and boot into Linux.
  10. Import the new zpool.
  11. Access your data in Linux.
Please keep in mind I have not tried this before myself but in theory it should work. Also keep in mind the old zpool was created with FreeNAS so you really should be asking these questions on their forums as there are differences between FreeNAS and pure FreeBSD. Following these instructions could in fact possibly destroy your data or at the very least make it inaccessible through any means.
 
Thank you for the step by step. I'm still trying to get answers on a FreeNAS forum and Linux forum. If nobody has a good idea, I'll use this as a last resort, understanding that I may not retrieve my data. As it is, it's effectively lost anyway. I appreciate your help.
 
Back
Top