Migrate from ZOL to ZFS on FreeBSD

Hello!
I'm using ZFS on Linux and now I want to try ZFS on FreeBSD. On Linux I exported pool, but when I try to import I get message:
Code:
The pool metadata is corrupted.

zpool clear does not work (pool does not exist). Is it possible to migrate from ZOL?

PS when I return to Linux I can import pool and it works fine, so there are no errors with data.
 
Ubuntu 10

zpool status
Code:
  pool: z20131211001
 state: ONLINE
  scan: scrub repaired 0 in 0h0m with 0 errors on Tue Feb  4 17:31:04 2014
config:

        NAME                                       STATE     READ WRITE CKSUM
        z20131211001                               ONLINE       0     0     0
          mirror-0                                 ONLINE       0     0     0
            ata-VBOX_HARDDISK_VB5ffa565e-cf24905d  ONLINE       0     0     0
            ata-VBOX_HARDDISK_VB6ff554f3-f2b49fe0  ONLINE       0     0     0
          mirror-1                                 ONLINE       0     0     0
            ata-VBOX_HARDDISK_VB66a0adb3-2c916ea0  ONLINE       0     0     0
            ata-VBOX_HARDDISK_VBc8cce39e-012a4e40  ONLINE       0     0     0

errors: No known data errors

FreeBSD FreeBSD 10.0-RELEASE
Code:
root@FreeBSD:~ # zpool import
   pool: z20131211001
     id: 10563457001089348163
  state: FAULTED
 status: The pool metadata is corrupted.
 action: The pool cannot be imported due to damaged devices or data.
   see: http://illumos.org/msg/ZFS-8000-72
 config:

        z20131211001                           FAULTED  corrupted data
          mirror-0                             ONLINE
            diskid/DISK-VB5ffa565e-cf24905dp1  ONLINE
            diskid/DISK-VB6ff554f3-f2b49fe0p1  ONLINE
          mirror-1                             ONLINE
            diskid/DISK-VB66a0adb3-2c916ea0p1  ONLINE
            diskid/DISK-VBc8cce39e-012a4e40p1  ONLINE

Code:
root@FreeBSD:~ # zpool import -d /dev/diskid/DISK-VB5ffa565e-cf24905dp1 z20131211001
cannot open '/dev/diskid/DISK-VB5ffa565e-cf24905dp1/': Not a directory
cannot import 'z20131211001': no such pool available
Code:
root@FreeBSD:~ # ls -l /dev/diskid/DISK-VB5ffa565e-cf24905dp1
crw-r-----  1 root  operator  0x72 Feb  6 10:53 /dev/diskid/DISK-VB5ffa565e-cf24905dp1
Code:
root@FreeBSD:~ # zpool import z20131211001
cannot import 'z20131211001': I/O error
        Destroy and re-create the pool from
        a backup source.
 
Try using # zpool import -d /dev/diskid z20131211001 (note that it's the directory to look in, not a specific disk.)

Which feature flags are enabled for the pool?
 
No, the command I wanted you to try is just: # zpool import -d /dev z20131211001

No device names, just the directory.

Also, what's the pool and filesystem version (and/or feature flags enabled) for the pool in Linux?
 
Code:
root@FreeBSD:~ # zpool import -d /dev z20131211001
cannot import 'z20131211001': I/O error
        Destroy and re-create the pool from
        a backup source.

Code:
16:38:04 Linux # zpool get all z20131211001
NAME          PROPERTY               VALUE                  SOURCE
z20131211001  size                   1,97G                  -
z20131211001  capacity               8%                     -
z20131211001  altroot                -                      default
z20131211001  health                 ONLINE                 -
z20131211001  guid                   10563457001089348163   default
z20131211001  version                -                      default
z20131211001  bootfs                 -                      default
z20131211001  delegation             on                     default
z20131211001  autoreplace            off                    default
z20131211001  cachefile              -                      default
z20131211001  failmode               wait                   default
z20131211001  listsnapshots          off                    default
z20131211001  autoexpand             off                    default
z20131211001  dedupditto             0                      default
z20131211001  dedupratio             1.00x                  -
z20131211001  free                   1,81G                  -
z20131211001  allocated              167M                   -
z20131211001  readonly               off                    -
z20131211001  ashift                 0                      default
z20131211001  comment                -                      default
z20131211001  expandsize             0                      -
z20131211001  freeing                0                      default
z20131211001  feature@async_destroy  enabled                local
z20131211001  feature@empty_bpobj    enabled                local
z20131211001  feature@lz4_compress   enabled                local

Code:
16:47:12 Linux # zfs get version z20131211001
NAME          PROPERTY  VALUE    SOURCE
z20131211001  version   5

Code:
16:47:24 Linux # zpool upgrade -v
This system supports ZFS pool feature flags.

The following features are supported:

FEAT DESCRIPTION
-------------------------------------------------------------
async_destroy                         (read-only compatible)
     Destroy filesystems asynchronously.
empty_bpobj                           (read-only compatible)
     Snapshots use less space.
lz4_compress
     LZ4 compression algorithm support.

The following legacy versions are also supported:

VER  DESCRIPTION
---  --------------------------------------------------------
 1   Initial ZFS version
 2   Ditto blocks (replicated metadata)
 3   Hot spares and double parity RAID-Z
 4   zpool history
 5   Compression using the gzip algorithm
 6   bootfs pool property
 7   Separate intent log devices
 8   Delegated administration
 9   refquota and refreservation properties
 10  Cache devices
 11  Improved scrub performance
 12  Snapshot properties
 13  snapused property
 14  passthrough-x aclinherit
 15  user/group space accounting
 16  stmf property support
 17  Triple-parity RAID-Z
 18  Snapshot user holds
 19  Log device removal
 20  Compression using zle (zero-length encoding)
 21  Deduplication
 22  Received properties
 23  Slim ZIL
 24  System attributes
 25  Improved scrub stats
 26  Improved snapshot deletion performance
 27  Improved snapshot creation performance
 28  Multiple vdev replacements

For more information on a particular version, including supported releases,
see the ZFS Administration Guide.

I think I have zpool 28 version (I use LLNL ZOL)
 
Ubuntu 10?

Have you compiled ZFS on Linux from source? Which version? spl and zfs-0.6.2?
Or do you use a package? Which specific one?

I had the same problem, with ZOL, I've created a pool with a version from head and tried to import it with 0.6.2 on Linux to no avail.
 
You're using ZFSv5000 (feature-enabled version of ZFS), with all 3 features enabled on the pool. That's fine, the version of FreeBSD in 9.x and 10.x is also ZFSv5000 with support for the same features.

How are the drives partitioned under Linux? MBR, GPT, no partitioning?

What's the output of # gpart show for one of those drives under FreeBSD?
 
Yes, Ubuntu 10.I compiled ZFS from source, spl and zfs-0.6.2 and kernel 3.8.0-34 (i compiled it from ubuntu 13 sources).

I have GPT partitions and zfs is on primary partition of each drive

Code:
root@FreeBSD:~ # gpart show
=>      34  20971453  ada0  GPT  (10G)
        34       128     1  freebsd-boot  (64K)
       162  19920768     2  freebsd-ufs  (9.5G)
  19920930   1048576     3  freebsd-swap  (512M)
  20969506      1981        - free -  (991K)

=>     34  2097085  ada1  GPT  (1.0G)
       34     2014        - free -  (1.0M)
     2048  2076672     1  !6a898cc3-1dd2-11b2-99a6-080020736631  (1.0G)
  2078720    16384     9  !6a945a3b-1dd2-11b2-99a6-080020736631  (8.0M)
  2095104     2015        - free -  (1.0M)

=>     34  2097085  diskid/DISK-VB5ffa565e-cf24905d  GPT  (1.0G)
       34     2014                                   - free -  (1.0M)
     2048  2076672                                1  !6a898cc3-1dd2-11b2-99a6-080020736631  (1.0G)
  2078720    16384                                9  !6a945a3b-1dd2-11b2-99a6-080020736631  (8.0M)
  2095104     2015                                   - free -  (1.0M)

=>     34  2097085  ada2  GPT  (1.0G)
       34     2014        - free -  (1.0M)
     2048  2076672     1  !6a898cc3-1dd2-11b2-99a6-080020736631  (1.0G)
  2078720    16384     9  !6a945a3b-1dd2-11b2-99a6-080020736631  (8.0M)
  2095104     2015        - free -  (1.0M)

=>     34  2097085  ada3  GPT  (1.0G)
       34     2014        - free -  (1.0M)
     2048  2076672     1  !6a898cc3-1dd2-11b2-99a6-080020736631  (1.0G)
  2078720    16384     9  !6a945a3b-1dd2-11b2-99a6-080020736631  (8.0M)
  2095104     2015        - free -  (1.0M)

=>     34  2097085  ada4  GPT  (1.0G)
       34     2014        - free -  (1.0M)
     2048  2076672     1  !6a898cc3-1dd2-11b2-99a6-080020736631  (1.0G)
  2078720    16384     9  !6a945a3b-1dd2-11b2-99a6-080020736631  (8.0M)
  2095104     2015        - free -  (1.0M)

=>     34  2097085  diskid/DISK-VB6ff554f3-f2b49fe0  GPT  (1.0G)
       34     2014                                   - free -  (1.0M)
     2048  2076672                                1  !6a898cc3-1dd2-11b2-99a6-080020736631  (1.0G)
  2078720    16384                                9  !6a945a3b-1dd2-11b2-99a6-080020736631  (8.0M)
  2095104     2015                                   - free -  (1.0M)

=>     34  2097085  diskid/DISK-VB66a0adb3-2c916ea0  GPT  (1.0G)
       34     2014                                   - free -  (1.0M)
     2048  2076672                                1  !6a898cc3-1dd2-11b2-99a6-080020736631  (1.0G)
  2078720    16384                                9  !6a945a3b-1dd2-11b2-99a6-080020736631  (8.0M)
  2095104     2015                                   - free -  (1.0M)

=>     34  2097085  diskid/DISK-VBc8cce39e-012a4e40  GPT  (1.0G)
       34     2014                                   - free -  (1.0M)
     2048  2076672                                1  !6a898cc3-1dd2-11b2-99a6-080020736631  (1.0G)
  2078720    16384                                9  !6a945a3b-1dd2-11b2-99a6-080020736631  (8.0M)
  2095104     2015                                   - free -  (1.0M)
 
I've successfully and faultlessly imported two ZOL pool into FreeBSD 10. The problem with my previous post was about a damaged USB drive and ZFS detected the metadata corruption.
 
Back
Top