Bug 185858 - [zfs] zvol clone can't see new device
Summary: [zfs] zvol clone can't see new device
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-18 03:10 UTC by Irwin
Modified: 2018-01-03 05:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Irwin 2014-01-18 03:10:00 UTC
device is not there until reboot

root@ztest:~ # zfs snapshot ziege/targets/test1/c@140118-0446

root@ztest:~ # zfs clone -p ziege/targets/test1/c@140118-0446 ziege/targets/test1/pc1-c-140118-0446
root@ztest:~ # zfs clone -p ziege/targets/test1/c@140118-0446 ziege/targets/test1/pc2-c-140118-0446 
root@ztest:~ # zfs list
NAME                                    USED  AVAIL  REFER  MOUNTPOINT
ziege                                   100G  16.8G    31K  none
ziege/targets                           100G  16.8G    31K  none
ziege/targets/test1                     100G  16.8G    31K  none
ziege/targets/test1/c                   100G  99.3G  17.8G  -
ziege/targets/test1/c@140118-0446          0      -  17.8G  -
ziege/targets/test1/pc1-c-140118-0446     1K  16.8G  17.8G  -
ziege/targets/test1/pc2-c-140118-0446     1K  16.8G  17.8G  -
root@ztest:~ # ls -l /dev/zvol/ziege/targets/test1/   
total 0
crw-r-----  1 root  operator  0x88 Jan 18 11:42 c
crw-r-----  1 root  operator  0x9e Jan 18 04:46 c@140118-0446
crw-r-----  1 root  operator  0x9f Jan 18 04:46 c@140118-0446s1
crw-r-----  1 root  operator  0xa0 Jan 18 04:46 c@140118-0446s2

Fix: 

reboot... but this is gonna cause problems
How-To-Repeat: root@ztest:~ # zfs snapshot ziege/targets/test1/c@140118-0446

root@ztest:~ # zfs clone -p ziege/targets/test1/c@140118-0446 ziege/targets/test1/pc1-c-140118-0446
root@ztest:~ # zfs clone -p ziege/targets/test1/c@140118-0446 ziege/targets

ls -l /dev/zvol/ziege/targets/test1/
(device not there)
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-01-19 17:27:49 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 modica 2014-02-28 22:47:43 UTC
It looks like this might relate back to this checkin:

=
https://github.com/joyent/illumos-joyent/commit/3b2aab18808792cbd248a12f1e=
df139b89833c13

--
Steve Modica
CTO -  Small Tree Communications
www.small-tree.com
Comment 3 mahrens 2014-02-28 23:41:07 UTC
I looked for differences between the illumos and FreeBSD code and found
that zfs_ioc_create() has this:

3310#ifdef __FreeBSD__
3311 if (error == 0 && type == DMU_OST_ZVOL)
3312 zvol_create_minors(fsname);
3313#endif

It seems like similar code would be needed in zfs_ioc_clone(), but isn't
there.  The "type" (ZVOL vs ZPL filesystem) isn't as immediately available
in zfs_ioc_clone(), so it might be a little tricker to add the code to
zfs_ioc_clone().

--matt
Comment 4 Aragon Gouveia 2014-04-07 09:28:11 UTC
FYI, this is a dupe of kern/178999.

http://www.freebsd.org/cgi/query-pr.cgi?pr=178999
Comment 5 Steven Hartland freebsd_committer freebsd_triage 2014-04-07 11:25:23 UTC
Responsible Changed
From-To: freebsd-fs->smh

I'll take it
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:41 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped