[Bug 225223] "zfs rename -r" of a snapshot doesn't rename zvol snapshots' device nodes

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jan 16 16:20:20 UTC 2018


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

            Bug ID: 225223
           Summary: "zfs rename -r" of a snapshot doesn't rename zvol
                    snapshots' device nodes
           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

ZFS creates device nodes for every zvol and every snapshot of a zvol.  If you
rename a snapshot on a zvol, the device node will automatically get renamed
too.  However, if you use "zfs rename -r" (-r means recursive) on a snapshot of
the zvol's parent dataset, then the snapshot's device node will _not_ get
renamed.

Steps to reproduce:
[alans at tom ~]$ sudo zpool create foo da1
[alans at tom ~]$ sudo zfs create -V 100m foo/vol0
[alans at tom ~]$ sudo zfs snapshot -r foo at 0
[alans at tom ~]$ find /dev/zvol/foo/ -type c
/dev/zvol/foo/vol0
/dev/zvol/foo/vol0 at 0
[alans at tom ~]$ sudo zfs rename -r foo at 0 foo at 1
[alans at tom ~]$ find /dev/zvol/foo/ -type c
/dev/zvol/foo/vol0
/dev/zvol/foo/vol0 at 0
[alans at tom ~]$ zfs list -t all -r foo/vol0
NAME         USED  AVAIL  REFER  MOUNTPOINT
foo/vol0     105M  3.51T    56K  -
foo/vol0 at 1      0      -    56K  -

/dev/zvol/foo/vol0 at 0 should've been renamed to /dev/zvol/foo/vol0 at 1 .

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


More information about the freebsd-bugs mailing list