[RFC PATCH] mdadm: add --fast-initialize

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@xxxxxxxxxxxxxxx>

---
 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





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux