Skip to content

Commit 336c953

Browse files
authored
man: describe zfs-rewrite method and properties
We've heard anecdotes that suggest some confusion/surprise/disappointment that a changed recordsize is not applied during rewrite. Until such time as we actually can do that, we can at least explicitly mention it at something that doesn't work. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Allan Jude <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #17898
1 parent 242fdb5 commit 336c953

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

man/man8/zfs-rewrite.8

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
.\" CDDL HEADER END
2121
.\"
2222
.\" Copyright (c) 2025 iXsystems, Inc.
23+
.\" Copyright (c) 2025, Klara, Inc.
2324
.\"
24-
.Dd July 23, 2025
25+
.Dd November 5, 2025
2526
.Dt ZFS-REWRITE 8
2627
.Os
2728
.
@@ -39,9 +40,10 @@
3940
.Sh DESCRIPTION
4041
Rewrite blocks of specified
4142
.Ar file
42-
as is without modification at a new location and possibly with new
43-
properties, such as checksum, compression, dedup, copies, etc,
43+
as is without modification at a new location and possibly with new properties,
4444
as if they were atomically read and written back.
45+
.No See Sx NOTES .
46+
for more information about property changes that may be applied during rewrite.
4547
.Bl -tag -width "-r"
4648
.It Fl P
4749
Perform physical rewrite, preserving logical birth time of blocks.
@@ -64,6 +66,20 @@ Print names of all successfully rewritten files.
6466
Don't cross file system mount points when recursing.
6567
.El
6668
.Sh NOTES
69+
Rewrite works by replacing an existing block with a new block of the same
70+
logical size.
71+
Changed dataset properties that operate on the data or metadata without
72+
changing the logical size will be applied.
73+
These include
74+
.Sy checksum ,
75+
.Sy compression ,
76+
.Sy dedup
77+
and
78+
.Sy copies .
79+
Changes to properties that affect the size of a logical block, like
80+
.Sy recordsize ,
81+
will have no effect.
82+
.Pp
6783
Rewrite of cloned blocks and blocks that are part of any snapshots,
6884
same as some property changes may increase pool space usage.
6985
Holes that were never written or were previously zero-compressed are

0 commit comments

Comments
 (0)