openzfsonwindows / ZFSin

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

2018-05-29 Snapshot: zpool.exe export and destroy report "pool is busy" #35

Open michaeldexter opened 6 years ago

michaeldexter commented 6 years ago

Version in title. Output:

PS C:\Users\dexter\Desktop> .\zpool.exe export tank (ioctl 0x805 status 0 bytes 4548) (ioctl 0x804 status 0 bytes 4548) (ioctl 0x812 status 0 bytes 4548) (ioctl 0x805 status 0 bytes 4548) (ioctl 0x814 status 3 bytes 4548) (ioctl 0x815 status 0 bytes 4548) (ioctl 0x815 status 3 bytes 4548) (ioctl 0x803 status 16 bytes 4548) cannot export 'tank': pool is busy

Same output for:

PS C:\Users\dexter\Desktop> .\zpool.exe destroy tank

Keep up the good work!

jheuking commented 6 years ago

I faced the same problem. It occured when I did not set the driveletter property of the dataset I wanted to mount. As I would expect, the dataset should be mounted on the next free driveletter when the driveletter-property is not set. But zfs.exe prompted to mount on \??\c:\ (which is obviously my system drive). It then came back with a volume guid, but nothing appeared in the windows explorer. With mountvol.exe I was able to assign a driveletter manually, even though the volume guid wasn't listed by mountvol. After that the volume was accessible with the windows explorer. Another strange thing was, that the dataset was not listed with "zfs.exe mount", even though it was accessible in the windows explorer. Maybe something does not work when the next free driveletter is requested, with the cause that the mount-process gets stuck somehow?

michaeldexter commented 6 years ago

Still an issue with .06. Will import and export repeatedly with -N "do not mount".

lundman commented 6 years ago

This does appear to be a problem if the drive-letter mounting fails, it is kept busy. The error code should obviously be corrected to release the resource, but the more interesting problem is why the driver mounting fails.

There is some evidence that Windows March version will fail to mount, but Windows May version does not.

michaeldexter commented 6 years ago

Pre-May 2018 Windows 10 updated to May 2018 works. A fresh May 2018 Window 10 installation is having mounting issues. Open to ideas on what differences to look for.

lundman commented 6 years ago

Ok, now that mounting works for you, the "is busy" should be gone, but we are still having crashes on export?

michaeldexter commented 6 years ago

A dozen import/export routines in succession worked flawlessly. Great work!

fire commented 5 years ago

Is this issue fixed? Sounds like it.