openzfsonwindows / ZFSin

OpenZFS on Windows port
https://openzfsonwindows.org
1.21k stars 68 forks source link

zfs recv fails with #264

Open helamonster opened 4 years ago

helamonster commented 4 years ago

Testing zfs send/recv:

I was able to successfully create a pool, add some data, create a snapshot, send it to a remote Linux ZFS box. Now I'm trying to create a fresh zpool on Windows and receive the same snapshot that was created and sent from the same Windows machine...

Create the pool:

C:\Program Files\OpenZFS On Windows>zpool create -O casesensitivity=insensitive -O compression=lz4  -O atime=off -o ashift=12 tank PHYSICALDRIVE1
Expanded path to '\\?\PHYSICALDRIVE1'
DeviceName said OK with '*'
DriveGeometry said OK
LayoutInfo said OK
DiskExtents said NG

Add some datasets:

C:\Program Files\OpenZFS On Windows>zfs create tank/backups
filesystem successfully created, but not shared

C:\Program Files\OpenZFS On Windows>zfs create tank/backups/c
filesystem successfully created, but not shared

Trying to receive:

C:\Program Files\OpenZFS On Windows>ssh root@192.168.1.9  zfs send -R -v -w -e -c -h data/wintest@post-backup | zfs recv -vusF tank/backups/c
root@192.168.1.9's password:
full send of data/wintest@post-backup estimated size is 319M
full send of data/wintest/backups@post-backup estimated size is 46.1K
total estimated size is 319M
TIME        SENT   SNAPSHOT data/wintest@post-backup
receiving full stream of data/wintest@post-backup into tank/backups/c@post-backup
cannot receive new filesystem stream: incompatible embedded data stream feature with encrypted receive.

Tried without fancy options:

C:\Program Files\OpenZFS On Windows>ssh root@192.168.1.9  zfs send -R  data/wintest@post-backup | zfs recv -vusF tank/backups/c
root@192.168.1.9's password:
receiving full stream of data/wintest@post-backup into tank/backups/c@post-backup
cannot receive new filesystem stream: kernel modules must be upgraded to receive this stream.

I haven't dug deeper yet so that's all I have for now.

lundman commented 4 years ago

It sounds like your remote dataset has features enables that Windows ZFS does not know. Run a zpool get all to see what features are enabled?

helamonster commented 4 years ago

On Linux:

tank  feature@async_destroy          enabled                        local
tank  feature@empty_bpobj            active                         local
tank  feature@lz4_compress           active                         local
tank  feature@multi_vdev_crash_dump  enabled                        local
tank  feature@spacemap_histogram     active                         local
tank  feature@enabled_txg            active                         local
tank  feature@hole_birth             active                         local
tank  feature@extensible_dataset     active                         local
tank  feature@embedded_data          active                         local
tank  feature@bookmarks              enabled                        local
tank  feature@filesystem_limits      enabled                        local
tank  feature@large_blocks           enabled                        local
tank  feature@large_dnode            enabled                        local
tank  feature@sha512                 enabled                        local
tank  feature@skein                  enabled                        local
tank  feature@edonr                  enabled                        local
tank  feature@userobj_accounting     active                         local
tank  feature@encryption             disabled                       local
tank  feature@project_quota          disabled                       local
tank  feature@device_removal         disabled                       local
tank  feature@obsolete_counts        disabled                       local
tank  feature@zpool_checkpoint       disabled                       local
tank  feature@spacemap_v2            disabled                       local
tank  feature@allocation_classes     disabled                       local
tank  feature@resilver_defer         disabled                       local
tank  feature@bookmark_v2            disabled                       local

On Windows:

tank  feature@async_destroy          enabled                        local
tank  feature@empty_bpobj            active                         local
tank  feature@lz4_compress           active                         local
tank  feature@multi_vdev_crash_dump  enabled                        local
tank  feature@spacemap_histogram     active                         local
tank  feature@enabled_txg            active                         local
tank  feature@hole_birth             active                         local
tank  feature@extensible_dataset     enabled                        local
tank  feature@embedded_data          active                         local
tank  feature@bookmarks              enabled                        local
tank  feature@filesystem_limits      enabled                        local
tank  feature@large_blocks           enabled                        local
tank  feature@large_dnode            enabled                        local
tank  feature@sha512                 enabled                        local
tank  feature@skein                  enabled                        local
tank  feature@edonr                  enabled                        local
tank  feature@encryption             enabled                        local
tank  feature@device_removal         enabled                        local
tank  feature@obsolete_counts        enabled                        local
tank  feature@zpool_checkpoint       enabled                        local
tank  feature@spacemap_v2            active                         local
tank  feature@allocation_classes     enabled                        local
tank  feature@bookmark_v2            enabled                        local
tank  feature@resilver_defer         enabled                        local

So it looks like the userobj_accounting feature is the culprit. I'll try my tests with a new pool on the Linux side without that feature enabled and report back...

helamonster commented 4 years ago

Using OpenZFSOnWindows-debug-20200402.exe

After re-creating the pool on the Linux side with:

$ modinfo zfs | grep ^version
version:        0.8.1-1ubuntu14.4
$ sudo zpool create tank  ...  -o feature@userobj_accounting=disabled
$ sudo zpool get all tank | grep feature@
tank  feature@async_destroy          enabled                        local
tank  feature@empty_bpobj            active                         local
tank  feature@lz4_compress           active                         local
tank  feature@multi_vdev_crash_dump  enabled                        local
tank  feature@spacemap_histogram     active                         local
tank  feature@enabled_txg            active                         local
tank  feature@hole_birth             active                         local
tank  feature@extensible_dataset     active                         local
tank  feature@embedded_data          active                         local
tank  feature@bookmarks              enabled                        local
tank  feature@filesystem_limits      enabled                        local
tank  feature@large_blocks           enabled                        local
tank  feature@large_dnode            enabled                        local
tank  feature@sha512                 enabled                        local
tank  feature@skein                  enabled                        local
tank  feature@edonr                  enabled                        local
tank  feature@userobj_accounting     disabled                       local
tank  feature@encryption             enabled                        local
tank  feature@project_quota          active                         local
tank  feature@device_removal         enabled                        local
tank  feature@obsolete_counts        enabled                        local
tank  feature@zpool_checkpoint       enabled                        local
tank  feature@spacemap_v2            active                         local
tank  feature@allocation_classes     enabled                        local
tank  feature@resilver_defer         enabled                        local
tank  feature@bookmark_v2            enabled                        local

I still encountered the same problem when trying to send a snapshot from the Linux zpool to the Windows zpool:

C:\Windows\System32>ssh root@192.168.1.9  zfs send -R -v   -c -h tank/wintest@post-backup | zfs recv -vusF tank/backups/cnew
root@192.168.1.9's password:
full send of tank/wintest@post-backup estimated size is 329M
full send of tank/wintest/backups@post-backup estimated size is 12.6K
full send of tank/wintest/backups/c@post-backup estimated size is 12.6K
total estimated size is 329M
TIME        SENT   SNAPSHOT tank/wintest@post-backup
receiving full stream of tank/wintest@post-backup into tank/backups/cnew@post-backup
cannot receive new filesystem stream: kernel modules must be upgraded to receive this stream.

Also:

C:\Windows\System32>ssh root@192.168.1.9  zfs send -R -v     tank/wintest@post-backup | zfs recv -vusF tank/backups/cnew
root@192.168.1.9's password:
full send of tank/wintest@post-backup estimated size is 502M
full send of tank/wintest/backups@post-backup estimated size is 12.6K
full send of tank/wintest/backups/c@post-backup estimated size is 12.6K
total estimated size is 502M
TIME        SENT   SNAPSHOT tank/wintest@post-backup
receiving full stream of tank/wintest@post-backup into tank/backups/cnew@post-backup
cannot receive new filesystem stream: kernel modules must be upgraded to receive this stream.
lundman commented 4 years ago

It will be userobj, and project quota as they are both in the todo.