-
Notifications
You must be signed in to change notification settings - Fork 2k
two minor issues with zfs rewrite #18371
Description
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
-
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 :)
-
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.