linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] mdadm: add --fast-initialize
@ 2024-05-28 14:33 Mariusz Tkaczyk
  2024-06-04 12:46 ` Xiao Ni
  0 siblings, 1 reply; 4+ messages in thread
From: Mariusz Tkaczyk @ 2024-05-28 14:33 UTC (permalink / raw)
  To: linux-raid; +Cc: Mariusz Tkaczyk, Logan Gunthorpe

This is not complete change but I would like to get the feedback on
concept proposed. There are few features for optimized space zeroing.
We already support --write-zeroes but Intel would like to add support of
deallocate command (discard) in the future. There is also Sata trim
which could be potentially used.

The goal of this RFC is to get feedback about proposing one option to
check for few features which can be used for performing smarter
initialization instead of resync. With that, user may just type
--fast-initialize and mdadm will determine what can be used, else abort.

This won't be merged.

Cc: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>

---
 mdadm.8.in | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/mdadm.8.in b/mdadm.8.in
index aa0c540399f6..be592d70ac9b 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -849,6 +849,17 @@ each disk is zeroed in parallel with the others.
 .IP
 This is only meaningful with --create.
 
+.TP
+.BR \-\-fast-initialize
+When creating an array, check disks for optional features to perform optimized initialization
+instead of resync. These features are: NVMe's write-zeros or deallocate and Sata trims. If there is
+feature supported by all drives, it is executed, otherwise error is returned. This option invokes
+.B \-\-assume\-clean
+.This is intended for use with devices that have hardware offload for zeroing, but despite this
+zeroing can still take several minutes for large disks to complete.
+.IP
+This is only meaningful with --create.
+
 .TP
 .BR \-\-backup\-file=
 This is needed when
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-10  8:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 14:33 [RFC PATCH] mdadm: add --fast-initialize Mariusz Tkaczyk
2024-06-04 12:46 ` Xiao Ni
2024-06-04 16:19   ` Logan Gunthorpe
2024-06-10  8:57     ` Mariusz Tkaczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).