Skip to content

zvol snapshot rename doesn't rename -partN devices #17428

Open
@JKDingwall

Description

@JKDingwall

System information

Type Version/Name
Distribution Name Ubuntu
Distribution Version 24.04
Kernel Version 6.8.0-60-generic
Architecture amd64
OpenZFS Version 2.2.7

Describe the problem you're observing

This is related to issue #14223 / #16600. Although the top level snapshot is correctly renamed any -partN devices related to it remain in /dev/zvol/.../.../ referencing the old name.

Describe how to reproduce the problem

  1. create a zvol with a partition table, there should be /dev/zvol/ztank/name, /dev/zvol/ztank/name-part1 devices
  2. create a snapshot , e.g. zfs snapshot ztank/name@snap1 of that volume (snapdev=visible), there should be /dev/zvol/ztank/name@snap1, /dev/zvol/ztank/name@snap1-part1
  3. rename the snapshot, e.g. zfs rename ztank/name@snap1 ztank/name@snap2, /dev/zvol/tank/name@snap2 exists but /dev/zvol/ztank/name@snap1-part1 is not renamed to /dev/zvol/ztank/name@snap2-part1

Running with udevadm monitor -k -u we see no change event for the p1 device:

# zfs create ztank/name@snap1
KERNEL[82773.152904] add      /devices/virtual/bdi/230:3888 (bdi)
KERNEL[82773.154845] add      /devices/virtual/block/zd3888 (block)
KERNEL[82773.154991] add      /devices/virtual/block/zd3888/zd3888p1 (block)
UDEV  [82773.170977] add      /devices/virtual/bdi/230:3888 (bdi)
UDEV  [82773.280616] add      /devices/virtual/block/zd3888 (block)
UDEV  [82773.390334] add      /devices/virtual/block/zd3888/zd3888p1 (block)

# zfs rename ztank/name@snap1 ztank/name@snap2
KERNEL[82973.460582] change   /devices/virtual/block/zd3888 (block)
KERNEL[82973.460954] change   /devices/virtual/block/zd3888 (block)
UDEV  [82973.573731] change   /devices/virtual/block/zd3888 (block)
UDEV  [82973.671342] change   /devices/virtual/block/zd3888 (block)

Include any warning/errors/backtraces from the system logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions