When creating a zvol on a zfs pool, the /dev/zvol/pool/* entries show up correctly, however when making snapshots or cloning them, they do not. How-To-Repeat: zfs create -V 1G pool/somevol ls /dev/zvol/pool # witness somevol entries zfs create pool/somevol@somesnap ls /dev/zvol/pool # witness no new entries zfs clone pool/somvol@somesnap pool/anothervol ls /dev/zvol/pool # again witness no new entries reboot ls /dev/zvol/pool # witness missing entries appearing
Responsible Changed From-To: freebsd-bugs->freebsd-fs Over to maintainer(s).
Responsible Changed From-To: freebsd-fs->smh I'll take it
Potential fix submitted by Ruslan Bukin here: http://lists.freebsd.org/pipermail/freebsd-fs/2013-June/017420.html --- zfs_ioctl.c 2013-06-09 23:54:22.386708932 +0400 +++ zfs_ioctl.c 2013-06-10 00:21:58.161708460 +0400 @@ -3299,6 +3299,12 @@ if (error != 0) (void) dsl_destroy_head(fsname); } + +#ifdef __FreeBSD__ + if (error == 0) + zvol_create_minors(fsname); +#endif + return (error); }
Any chance this PR could be reviewed, and if the patch is good, committed? I just ran into this same problem last night. It's really handy to be able to just clone a zvol for creating a throwaway virtual machine with bhyve. It's less good if you have to reboot the host machine to make the zvol appear. I just applied the patch in this PR to my 10-CURRENT tree, and have verified that cloned zvols now show up in /dev/zvol - without the patch, they do not. Thanks! -Kurt
While testing this patch I hit a number of other issues with zvol's including missing creates, failure rename and deadlock scenarios. The attached patch looks to address these. It doesn't solve all the possible deadlock issues with zvol's, what would require significant extra work, but it does address all the rename and creation issues I experienced. If you could please test this patch and see if you encounter any new issues that would be appreciated. regards Steve
Hi, Patch does seem to solve the issue, thanks! Steve
This fix did not resolve the issue for me, experienced on 9.2-STABLE and 9.1-RELEASE.
I'm still experiencing this issue in FreeBSD 10.0-RELEASE. I'm curious if this is a bug for everyone or if it happens only under certain circumstances.
We experienced the same problem with FreeBSD 10.0-RELEASE #0 r260789. With 9.1 everything was fine. The submitted patch here didn't work out for us. We use this feature to clone our production environment and create fresh test and development servers in a minute. Hope to find solution soon.
Author: mav Date: Fri Apr 11 11:56:16 2014 New Revision: 264341 URL: http://svnweb.freebsd.org/changeset/base/264341 Log: Create zvol devices on zfs clone. While big and shiny patch is not ready, it is better to have something. PR: kern/178999 MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Apr 11 08:25:54 2014 (r264340) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri Apr 11 11:56:16 2014 (r264341) @@ -3352,6 +3352,10 @@ zfs_ioc_clone(const char *fsname, nvlist if (error != 0) (void) dsl_destroy_head(fsname); } +#ifdef __FreeBSD__ + if (error == 0) + zvol_create_minors(fsname); +#endif return (error); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Author: mav Date: Mon Apr 21 16:33:49 2014 New Revision: 264729 URL: http://svnweb.freebsd.org/changeset/base/264729 Log: MFC r264341: Create zvol devices on zfs clone. While big and shiny patch is not ready, it is better to have something. PR: kern/178999 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:29:54 2014 (r264728) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:33:49 2014 (r264729) @@ -3352,6 +3352,10 @@ zfs_ioc_clone(const char *fsname, nvlist if (error != 0) (void) dsl_destroy_head(fsname); } +#ifdef __FreeBSD__ + if (error == 0) + zvol_create_minors(fsname); +#endif return (error); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Author: mav Date: Mon Apr 21 16:35:14 2014 New Revision: 264730 URL: http://svnweb.freebsd.org/changeset/base/264730 Log: MFC r264341: Create zvol devices on zfs clone. While big and shiny patch is not ready, it is better to have something. PR: kern/178999 Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:33:49 2014 (r264729) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Mon Apr 21 16:35:14 2014 (r264730) @@ -3352,6 +3352,10 @@ zfs_ioc_clone(const char *fsname, nvlist if (error != 0) (void) dsl_destroy_head(fsname); } +#ifdef __FreeBSD__ + if (error == 0) + zvol_create_minors(fsname); +#endif return (error); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Any updates on this? Also having this issue, on 10.0-RELEASE. Is there a workaround to rebuild the devices in /dev/zvol to access a newly created clone without rebooting?
(In reply to Steven Hartland from comment #5) > While testing this patch I hit a number of other issues with zvol's > including missing creates, failure rename and deadlock scenarios. > > The attached patch looks to address these. It doesn't solve all > the possible deadlock issues with zvol's, what would require > significant extra work, but it does address all the rename and > creation issues I experienced. > > If you could please test this patch and see if you encounter > any new issues that would be appreciated. > > regards > Steve I think my issue with rename is somewhat similar, if not identical to what you attempted to resolve here. I tried to rename a clone of a ZVOL (both have several snapshots with their own clones) about 10 times in a row, it hangs and I/O crashes. See #193803
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.