Assigned my zpool created under Linux to FreeNAS now Linux cannot recognize it

Status
Not open for further replies.

graysky

Cadet
Joined
Nov 30, 2013
Messages
9
I have a zpool I created under Linux (ZOL) and recently tried FreeNAS. I found myself liking it but not ready to ditch the Linux OS just yet. Upon booting back into Linux, I found that my zpool has been made unreadable by Linux. I have the data backed-up but there anyway to recover? Is this the expected behavior of an "autoimport" on FreeNAS?

On Linux after issuing a zpool status
Code:
  pool: myzpool
state: UNAVAIL
status: One or more devices could not be used because the label is missing
    or invalid.  There are insufficient replicas for the pool to continue
    functioning.
action: Destroy and re-create the pool from
    a backup source.
  see: http://zfsonlinux.org/msg/ZFS-8000-5E
  scan: none requested
config:
 
    NAME        STATE    READ WRITE CKSUM
    myzpool    UNAVAIL      0    0    0  insufficient replicas
      mirror-0  UNAVAIL      0    0    0  insufficient replicas
        ada1    UNAVAIL      0    0    0
        ada2    UNAVAIL      0    0    0
 
D

dlavigne

Guest
One of the devs mentioned that he has used ZoL multiple times and in all of them FreeBSD ZFS pools import in ZoL and vice-versa. Unless something changed very recently there must me something else going on.

Another one noticed that the Linux output uses the FreeBSD's device names of ada1 and ada2 as those names are encoded in the ZFS metadata. The problem may be that every OS has a different device naming scheme. FreeBSD is quite flexible from that point -- if it can't open devices with proposed names during pool import, it just scans though all possibilities. That is very flexible but slow process, that is why those pool metadata are automatically updated to make next import (after reboot, for example) much faster. It is possible that the version of ZoL may be not flexible enough to import the pool back after the metadata update.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I've played with ZoL and FreeNAS back and forth. It's not recommended by me for several reasons:

1. FreeNAS has expectations on how the pool should be created on the drive. ZoL doesn't do this. This alone has caused many heartaches for people that inappropriately used the CLI in FreeNAS to make a pool instead of the GUI. Only one method is supported for pool creation. Making the pool in the FreeNAS GUI.
2. FreeNAS and ZoL don't necessarily support the same ZFS version and/or the same feature flags. This can make it difficult(or impossible) to import your pool in "the other".
3. Issues just like that above. The ZFS metadata may point to devices with a different name or the location will change. If you've made the pool in the FreeNAS GUI, it should adjust accordingly if you move disks between SATA controllers or SATA ports. If you did it from the CLI, you may not be too happy. ZoL has totally different code and doesn't always like what it sees.

In short, trying to go back and forth is risky business. Even with the pool listed, you should either stick with ZoL or destroy your pool in FreeNAS. FreeNAS has had problems with disks that weren't made in the FreeNAS GUI(and your zpool status makes it obvious you didn't make it from the FreeNAS GUI).
 

graysky

Cadet
Joined
Nov 30, 2013
Messages
9
Thank you kindly for the reply. I ended-up nuking the pool and replacing from backups. FreeNAS is a very nice product for those unwilling to or not wanting to use the CLI. Guess I'll stick with ZOL for now since I have paid my dues in learning zfs and zpool commands. If someone has the access to do so, I recommend placing a warning in the FreeNAS docs for users importing an existing zpool referencing my situation. Not everyone keeps backups of backups :)
 
Status
Not open for further replies.
Top