Skip to content

two minor issues with zfs rewrite #18371

@justinpryzby

Description

@justinpryzby

System information

Type Version/Name
Distribution Name Debian
Distribution Version 12/13 mixed
Kernel Version 6.1.0-39
Architecture amd64
OpenZFS Version 2.3.5 / 2.4.1

Describe the problem you're observing

  1. zfs rewrite takes a pathname (not a poolname) but the bash completion suggests dataset names -- without a leading slash. As a workaround I suppose I can "cd /" before rewriting :)

  2. We have a non-zfs FS mounted on top of a ZFS FS.
    /zfs
    /zfs/nonzfs

I'm sure that's weird/uncommon/strange -- say what you will.
When I rewrite -r /zfs, zfs evidently descends into /zfs/nonzfs, and spews a lot of errors about "Inappropriate ioctl for device". I think zfs should avoid recursing into a non-zfs dataset. Maybe it should avoid recursing into another FS/dataset at all. As a user, I think of "rewrite" as a dataset-level command -- it'd be natural to rewrite a dataset, and not whatever files currently live underneath that FS hierarchy. It'd be fine with me if any layered datasets weren't included -- maybe others disagree? Purists might say that the right way to do what I want is with find /zfs -xdev -print0 |xargs -r0 zfs rewrite.

Describe how to reproduce the problem

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