openzfsonwindows / openzfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
455 stars 16 forks source link

zpool/zfs hangs after zpool export. #373

Open v1ckxy opened 5 months ago

v1ckxy commented 5 months ago

System information

Type Version/Name
Distribution Name Windows 11 23H2
Distribution Version Pro for Workstations
Kernel Version 22631.3447
Architecture x64
OpenZFS Version Tested both on zfs-2.2.99-137-g4b326b9b92-dirty & zfswin-2.2.3rc3

Describe the problem you're observing

After properly unmounting all via zfs umount -a, just tried to export it using zpool export -a, looks like the ZFS driver hangs and zpool command hangs indefinitely.

It doesn't matter how long the pool has been mounted or how much data has been written to it.

A reboot is needed for ZFS to work again; Any execution of zfs.exe and zpool.exe commands will hang (kstat.exe will still work) and you'll not be able to kill them using taskkill (/f)

Tried to delete all related drivers, registry configuration, zpool.cache file, then insalled latest build (zfs-2.2.99-137-g4b326b9b92-dirty), but still hangs during export.

Describe how to reproduce the problem

executing zpool export -a / zpool export Tried with zpool export -f too, didn't work.

After a restart, pool will be (cleanly) exported and you will be able to import it again // hanged twice during import, but it doesn't seem to fail any more.

Include any warning/errors/backtraces from the system logs

Pool was created with this command:

zpool.exe create -O casesensitivity=insensitive -O normalization=formD -O compression=lz4 -O atime=off -o ashift=12 `
-o feature@blake3=disabled `
-o feature@block_cloning=disabled `
-o feature@edonr=disabled `
-o feature@head_errlog=disabled `
-o feature@raidz_expansion=disabled `
-o feature@redaction_list_spill=disabled `
-o feature@vdev_zaps_v2=disabled `
-o feature@zilsaxattr=disabled `
poolname raidz2 PHYSICALDRIVE5 PHYSICALDRIVE6 PHYSICALDRIVE9 PHYSICALDRIVE10 PHYSICALDRIVE11 PHYSICALDRIVE12

At first it was possible to export without problems, but as more data sets were added and filled, it was no longer possible to properly export: after executing zpool export, those command will hang indefinitely.

However, system will still work without any issues rather than having zfs not working.

After executing a system shutdown/restart, pool seems to be properly exported (==clean status)

v1ckxy commented 5 months ago

One more thing, which I don't know if it's related.

After a restart, I executed: zpool import -a zfs mount -a

Pool was imported, however, not all datasets were properly mounted:

image

If:

lundman commented 5 months ago

This can be related to 01aa832