summaryrefslogtreecommitdiff
path: root/ReadMe.c
diff options
context:
space:
mode:
authorLogan Gunthorpe <logang@deltatee.com>2023-03-01 13:41:33 -0700
committerJes Sorensen <jes@trained-monkey.org>2023-03-13 10:08:10 -0400
commit577fd10486d8d1472a6b559066f344ac30a3a391 (patch)
tree9e51a7f670c3288138d38a06c588a4d8a4e0a98d /ReadMe.c
parent9364dbfb264e89ab9467dfc0d2b813033e320640 (diff)
downloadmdadm-577fd10486d8d1472a6b559066f344ac30a3a391.tar.gz
mdadm: Add --write-zeros option for Create
Add the --write-zeros option for Create which will send a write zeros request to all the disks before assembling the array. After zeroing the array, the disks will be in a known clean state and the initial sync may be skipped. Writing zeroes is best used when there is a hardware offload method to zero the data. But even still, zeroing can take several minutes on a large device. Because of this, all disks are zeroed in parallel using their own forked process and a message is printed to the user. The main process will proceed only after all the zeroing processes have completed successfully. Signed-off-by: Logan Gunthorpe <logang@deltatee.com> Acked-by: Kinga Tanska <kinga.tanska@linux.intel.com> Reviewed-by: Xiao Ni <xni@redhat.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Acked-by: Coly Li <colyli@suse.de> Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Diffstat (limited to 'ReadMe.c')
-rw-r--r--ReadMe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ReadMe.c b/ReadMe.c
index bd8d50d..db251ed 100644
--- a/ReadMe.c
+++ b/ReadMe.c
@@ -138,6 +138,7 @@ struct option long_options[] = {
{"size", 1, 0, 'z'},
{"auto", 1, 0, Auto}, /* also for --assemble */
{"assume-clean",0,0, AssumeClean },
+ {"write-zeroes",0,0, WriteZeroes },
{"metadata", 1, 0, 'e'}, /* superblock format */
{"bitmap", 1, 0, Bitmap},
{"bitmap-chunk", 1, 0, BitmapChunk},
@@ -390,6 +391,7 @@ char Help_create[] =
" --write-journal= : Specify journal device for RAID-4/5/6 array\n"
" --consistency-policy= : Specify the policy that determines how the array\n"
" -k : maintains consistency in case of unexpected shutdown.\n"
+" --write-zeroes : Write zeroes to the disks before creating. This will bypass initial sync.\n"
"\n"
;