[Bug 225200] "zfs promote" of a zvol doesn't rename device nodes for snapshots

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jan 16 00:26:01 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225200

            Bug ID: 225200
           Summary: "zfs promote" of a zvol doesn't rename device nodes
                    for snapshots
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: asomers at FreeBSD.org

A "zfs promote" operation renames the snapshot that was the basis for the
cloned dataset.  If that dataset is a zvol, then the snapshot has an associated
device node.  That device node should be renamed by "zfs promote", but it
doesn't.

Steps to reproduce:
[alans at tom ~]$ sudo zpool create -f foo da1
[alans at tom ~]$ sudo zfs create -V 100m foo/vol0
[alans at tom ~]$ sudo zfs snapshot foo/vol0 at snap
[alans at tom ~]$ sudo zfs clone foo/vol0 at snap foo/vol1
[alans at tom ~]$ ls -l /dev/zvol/foo/
total 0
crw-r-----  1 root  operator   0x85 Jan 15 17:24 vol0
crw-r-----  1 root  operator  0x130 Jan 15 17:24 vol0 at snap
crw-r-----  1 root  operator  0x131 Jan 15 17:24 vol1
[alans at tom ~]$ sudo zfs promote foo/vol1
[alans at tom ~]$ ls -l /dev/zvol/foo/
total 0
crw-r-----  1 root  operator   0x85 Jan 15 17:24 vol0
crw-r-----  1 root  operator  0x130 Jan 15 17:24 vol0 at snap
crw-r-----  1 root  operator  0x131 Jan 15 17:24 vol1

The "vol0 at snap" node should've been renamed to "vol1 at snap".  After a reboot, it
does get the correct name.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list