Closed gahr closed 1 day ago
I think this should be considered a bug fix rather than an enhancement. A likely consequence of operating without this protection is the loss of files within the mounted file system. That's a very bad outcome and not something a user would expect or think to guard against externally.
@gahr in your PR, the message comes after the dataset has been destroyed if it's on ZFS. If we are going to have that warning, it should come earlier so the user can check mounts and try to destroy again.
Good point. I don't use ZFS myself so I can't easily test any changes in that area. Would you please improve my PR in that direction?
Will this destroy the files that are mounted inside the jail? It looks like it does empty the directory inside the jail, so what happens to the directory outside?
@yaazkal I have gone over the changes and moved the mount check to it's proper place. It is functioning as expected. How do I update the PR here?
@yaazkal I have gone over the changes and moved the mount check to it's proper place. It is functioning as expected. How do I update the PR here?
thanks, just commit the changes to the branch you created whe did the PR
This PR can now be closed in favor of the above.
Thank you!
Fixes #662