xref: /linux/drivers/md/Kconfig (revision a34d4ef8)
1# SPDX-License-Identifier: GPL-2.0-only
2#
3# Block device driver configuration
4#
5
6menuconfig MD
7	bool "Multiple devices driver support (RAID and LVM)"
8	depends on BLOCK
9	help
10	  Support multiple physical spindles through a single logical device.
11	  Required for RAID and logical volume management.
12
13if MD
14
15config BLK_DEV_MD
16	tristate "RAID support"
17	select BLOCK_HOLDER_DEPRECATED if SYSFS
18	# BLOCK_LEGACY_AUTOLOAD requirement should be removed
19	# after relevant mdadm enhancements - to make "names=yes"
20	# the default - are widely available.
21	select BLOCK_LEGACY_AUTOLOAD
22	help
23	  This driver lets you combine several hard disk partitions into one
24	  logical block device. This can be used to simply append one
25	  partition to another one or to combine several redundant hard disks
26	  into a RAID1/4/5 device so as to provide protection against hard
27	  disk failures. This is called "Software RAID" since the combining of
28	  the partitions is done by the kernel. "Hardware RAID" means that the
29	  combining is done by a dedicated controller; if you have such a
30	  controller, you do not need to say Y here.
31
32	  More information about Software RAID on Linux is contained in the
33	  Software RAID mini-HOWTO, available from
34	  <https://www.tldp.org/docs.html#howto>. There you will also learn
35	  where to get the supporting user space utilities raidtools.
36
37	  If unsure, say N.
38
39config MD_AUTODETECT
40	bool "Autodetect RAID arrays during kernel boot"
41	depends on BLK_DEV_MD=y
42	default y
43	help
44	  If you say Y here, then the kernel will try to autodetect raid
45	  arrays as part of its boot process.
46
47	  If you don't use raid and say Y, this autodetection can cause
48	  a several-second delay in the boot time due to various
49	  synchronisation steps that are part of this step.
50
51	  If unsure, say Y.
52
53config MD_BITMAP_FILE
54	bool "MD bitmap file support"
55	default y
56	help
57	  If you say Y here, support for write intent bitmaps in files on an
58	  external file system is enabled.  This is an alternative to the internal
59	  bitmaps near the MD superblock, and very problematic code that abuses
60	  various kernel APIs and can only work with files on a file system not
61	  actually sitting on the MD device.
62
63config MD_LINEAR
64	tristate "Linear (append) mode (deprecated)"
65	depends on BLK_DEV_MD
66	help
67	  If you say Y here, then your multiple devices driver will be able to
68	  use the so-called linear mode, i.e. it will combine the hard disk
69	  partitions by simply appending one to the other.
70
71	  To compile this as a module, choose M here: the module
72	  will be called linear.
73
74	  If unsure, say Y.
75
76config MD_RAID0
77	tristate "RAID-0 (striping) mode"
78	depends on BLK_DEV_MD
79	help
80	  If you say Y here, then your multiple devices driver will be able to
81	  use the so-called raid0 mode, i.e. it will combine the hard disk
82	  partitions into one logical device in such a fashion as to fill them
83	  up evenly, one chunk here and one chunk there. This will increase
84	  the throughput rate if the partitions reside on distinct disks.
85
86	  Information about Software RAID on Linux is contained in the
87	  Software-RAID mini-HOWTO, available from
88	  <https://www.tldp.org/docs.html#howto>. There you will also
89	  learn where to get the supporting user space utilities raidtools.
90
91	  To compile this as a module, choose M here: the module
92	  will be called raid0.
93
94	  If unsure, say Y.
95
96config MD_RAID1
97	tristate "RAID-1 (mirroring) mode"
98	depends on BLK_DEV_MD
99	help
100	  A RAID-1 set consists of several disk drives which are exact copies
101	  of each other.  In the event of a mirror failure, the RAID driver
102	  will continue to use the operational mirrors in the set, providing
103	  an error free MD (multiple device) to the higher levels of the
104	  kernel.  In a set with N drives, the available space is the capacity
105	  of a single drive, and the set protects against a failure of (N - 1)
106	  drives.
107
108	  Information about Software RAID on Linux is contained in the
109	  Software-RAID mini-HOWTO, available from
110	  <https://www.tldp.org/docs.html#howto>.  There you will also
111	  learn where to get the supporting user space utilities raidtools.
112
113	  If you want to use such a RAID-1 set, say Y.  To compile this code
114	  as a module, choose M here: the module will be called raid1.
115
116	  If unsure, say Y.
117
118config MD_RAID10
119	tristate "RAID-10 (mirrored striping) mode"
120	depends on BLK_DEV_MD
121	help
122	  RAID-10 provides a combination of striping (RAID-0) and
123	  mirroring (RAID-1) with easier configuration and more flexible
124	  layout.
125	  Unlike RAID-0, but like RAID-1, RAID-10 requires all devices to
126	  be the same size (or at least, only as much as the smallest device
127	  will be used).
128	  RAID-10 provides a variety of layouts that provide different levels
129	  of redundancy and performance.
130
131	  RAID-10 requires mdadm-1.7.0 or later, available at:
132
133	  https://www.kernel.org/pub/linux/utils/raid/mdadm/
134
135	  If unsure, say Y.
136
137config MD_RAID456
138	tristate "RAID-4/RAID-5/RAID-6 mode"
139	depends on BLK_DEV_MD
140	select RAID6_PQ
141	select LIBCRC32C
142	select ASYNC_MEMCPY
143	select ASYNC_XOR
144	select ASYNC_PQ
145	select ASYNC_RAID6_RECOV
146	help
147	  A RAID-5 set of N drives with a capacity of C MB per drive provides
148	  the capacity of C * (N - 1) MB, and protects against a failure
149	  of a single drive. For a given sector (row) number, (N - 1) drives
150	  contain data sectors, and one drive contains the parity protection.
151	  For a RAID-4 set, the parity blocks are present on a single drive,
152	  while a RAID-5 set distributes the parity across the drives in one
153	  of the available parity distribution methods.
154
155	  A RAID-6 set of N drives with a capacity of C MB per drive
156	  provides the capacity of C * (N - 2) MB, and protects
157	  against a failure of any two drives. For a given sector
158	  (row) number, (N - 2) drives contain data sectors, and two
159	  drives contains two independent redundancy syndromes.  Like
160	  RAID-5, RAID-6 distributes the syndromes across the drives
161	  in one of the available parity distribution methods.
162
163	  Information about Software RAID on Linux is contained in the
164	  Software-RAID mini-HOWTO, available from
165	  <https://www.tldp.org/docs.html#howto>. There you will also
166	  learn where to get the supporting user space utilities raidtools.
167
168	  If you want to use such a RAID-4/RAID-5/RAID-6 set, say Y.  To
169	  compile this code as a module, choose M here: the module
170	  will be called raid456.
171
172	  If unsure, say Y.
173
174config MD_MULTIPATH
175	tristate "Multipath I/O support (deprecated)"
176	depends on BLK_DEV_MD
177	help
178	  MD_MULTIPATH provides a simple multi-path personality for use
179	  the MD framework.  It is not under active development.  New
180	  projects should consider using DM_MULTIPATH which has more
181	  features and more testing.
182
183	  If unsure, say N.
184
185config MD_FAULTY
186	tristate "Faulty test module for MD (deprecated)"
187	depends on BLK_DEV_MD
188	help
189	  The "faulty" module allows for a block device that occasionally returns
190	  read or write errors.  It is useful for testing.
191
192	  In unsure, say N.
193
194
195config MD_CLUSTER
196	tristate "Cluster Support for MD"
197	depends on BLK_DEV_MD
198	depends on DLM
199	default n
200	help
201	Clustering support for MD devices. This enables locking and
202	synchronization across multiple systems on the cluster, so all
203	nodes in the cluster can access the MD devices simultaneously.
204
205	This brings the redundancy (and uptime) of RAID levels across the
206	nodes of the cluster. Currently, it can work with raid1 and raid10
207	(limited support).
208
209	If unsure, say N.
210
211source "drivers/md/bcache/Kconfig"
212
213config BLK_DEV_DM_BUILTIN
214	bool
215
216config BLK_DEV_DM
217	tristate "Device mapper support"
218	select BLOCK_HOLDER_DEPRECATED if SYSFS
219	select BLK_DEV_DM_BUILTIN
220	select BLK_MQ_STACKING
221	depends on DAX || DAX=n
222	help
223	  Device-mapper is a low level volume manager.  It works by allowing
224	  people to specify mappings for ranges of logical sectors.  Various
225	  mapping types are available, in addition people may write their own
226	  modules containing custom mappings if they wish.
227
228	  Higher level volume managers such as LVM2 use this driver.
229
230	  To compile this as a module, choose M here: the module will be
231	  called dm-mod.
232
233	  If unsure, say N.
234
235config DM_DEBUG
236	bool "Device mapper debugging support"
237	depends on BLK_DEV_DM
238	help
239	  Enable this for messages that may help debug device-mapper problems.
240
241	  If unsure, say N.
242
243config DM_BUFIO
244       tristate
245       depends on BLK_DEV_DM
246	help
247	 This interface allows you to do buffered I/O on a device and acts
248	 as a cache, holding recently-read blocks in memory and performing
249	 delayed writes.
250
251config DM_DEBUG_BLOCK_MANAGER_LOCKING
252       bool "Block manager locking"
253       depends on DM_BUFIO
254	help
255	 Block manager locking can catch various metadata corruption issues.
256
257	 If unsure, say N.
258
259config DM_DEBUG_BLOCK_STACK_TRACING
260       bool "Keep stack trace of persistent data block lock holders"
261       depends on STACKTRACE_SUPPORT && DM_DEBUG_BLOCK_MANAGER_LOCKING
262       select STACKTRACE
263	help
264	 Enable this for messages that may help debug problems with the
265	 block manager locking used by thin provisioning and caching.
266
267	 If unsure, say N.
268
269config DM_BIO_PRISON
270       tristate
271       depends on BLK_DEV_DM
272	help
273	 Some bio locking schemes used by other device-mapper targets
274	 including thin provisioning.
275
276source "drivers/md/persistent-data/Kconfig"
277
278config DM_UNSTRIPED
279       tristate "Unstriped target"
280       depends on BLK_DEV_DM
281	help
282	  Unstripes I/O so it is issued solely on a single drive in a HW
283	  RAID0 or dm-striped target.
284
285config DM_CRYPT
286	tristate "Crypt target support"
287	depends on BLK_DEV_DM
288	depends on (ENCRYPTED_KEYS || ENCRYPTED_KEYS=n)
289	depends on (TRUSTED_KEYS || TRUSTED_KEYS=n)
290	select CRYPTO
291	select CRYPTO_CBC
292	select CRYPTO_ESSIV
293	help
294	  This device-mapper target allows you to create a device that
295	  transparently encrypts the data on it. You'll need to activate
296	  the ciphers you're going to use in the cryptoapi configuration.
297
298	  For further information on dm-crypt and userspace tools see:
299	  <https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt>
300
301	  To compile this code as a module, choose M here: the module will
302	  be called dm-crypt.
303
304	  If unsure, say N.
305
306config DM_SNAPSHOT
307       tristate "Snapshot target"
308       depends on BLK_DEV_DM
309       select DM_BUFIO
310	help
311	 Allow volume managers to take writable snapshots of a device.
312
313config DM_THIN_PROVISIONING
314       tristate "Thin provisioning target"
315       depends on BLK_DEV_DM
316       select DM_PERSISTENT_DATA
317       select DM_BIO_PRISON
318	help
319	 Provides thin provisioning and snapshots that share a data store.
320
321config DM_CACHE
322       tristate "Cache target (EXPERIMENTAL)"
323       depends on BLK_DEV_DM
324       default n
325       select DM_PERSISTENT_DATA
326       select DM_BIO_PRISON
327	help
328	 dm-cache attempts to improve performance of a block device by
329	 moving frequently used data to a smaller, higher performance
330	 device.  Different 'policy' plugins can be used to change the
331	 algorithms used to select which blocks are promoted, demoted,
332	 cleaned etc.  It supports writeback and writethrough modes.
333
334config DM_CACHE_SMQ
335       tristate "Stochastic MQ Cache Policy (EXPERIMENTAL)"
336       depends on DM_CACHE
337       default y
338	help
339	 A cache policy that uses a multiqueue ordered by recent hits
340	 to select which blocks should be promoted and demoted.
341	 This is meant to be a general purpose policy.  It prioritises
342	 reads over writes.  This SMQ policy (vs MQ) offers the promise
343	 of less memory utilization, improved performance and increased
344	 adaptability in the face of changing workloads.
345
346config DM_WRITECACHE
347	tristate "Writecache target"
348	depends on BLK_DEV_DM
349	help
350	   The writecache target caches writes on persistent memory or SSD.
351	   It is intended for databases or other programs that need extremely
352	   low commit latency.
353
354	   The writecache target doesn't cache reads because reads are supposed
355	   to be cached in standard RAM.
356
357config DM_EBS
358	tristate "Emulated block size target (EXPERIMENTAL)"
359	depends on BLK_DEV_DM && !HIGHMEM
360	select DM_BUFIO
361	help
362	  dm-ebs emulates smaller logical block size on backing devices
363	  with larger ones (e.g. 512 byte sectors on 4K native disks).
364
365config DM_ERA
366       tristate "Era target (EXPERIMENTAL)"
367       depends on BLK_DEV_DM
368       default n
369       select DM_PERSISTENT_DATA
370       select DM_BIO_PRISON
371	help
372	 dm-era tracks which parts of a block device are written to
373	 over time.  Useful for maintaining cache coherency when using
374	 vendor snapshots.
375
376config DM_CLONE
377       tristate "Clone target (EXPERIMENTAL)"
378       depends on BLK_DEV_DM
379       default n
380       select DM_PERSISTENT_DATA
381	help
382	 dm-clone produces a one-to-one copy of an existing, read-only source
383	 device into a writable destination device. The cloned device is
384	 visible/mountable immediately and the copy of the source device to the
385	 destination device happens in the background, in parallel with user
386	 I/O.
387
388	 If unsure, say N.
389
390config DM_MIRROR
391       tristate "Mirror target"
392       depends on BLK_DEV_DM
393	help
394	 Allow volume managers to mirror logical volumes, also
395	 needed for live data migration tools such as 'pvmove'.
396
397config DM_LOG_USERSPACE
398	tristate "Mirror userspace logging"
399	depends on DM_MIRROR && NET
400	select CONNECTOR
401	help
402	  The userspace logging module provides a mechanism for
403	  relaying the dm-dirty-log API to userspace.  Log designs
404	  which are more suited to userspace implementation (e.g.
405	  shared storage logs) or experimental logs can be implemented
406	  by leveraging this framework.
407
408config DM_RAID
409       tristate "RAID 1/4/5/6/10 target"
410       depends on BLK_DEV_DM
411       select MD_RAID0
412       select MD_RAID1
413       select MD_RAID10
414       select MD_RAID456
415       select BLK_DEV_MD
416	help
417	 A dm target that supports RAID1, RAID10, RAID4, RAID5 and RAID6 mappings
418
419	 A RAID-5 set of N drives with a capacity of C MB per drive provides
420	 the capacity of C * (N - 1) MB, and protects against a failure
421	 of a single drive. For a given sector (row) number, (N - 1) drives
422	 contain data sectors, and one drive contains the parity protection.
423	 For a RAID-4 set, the parity blocks are present on a single drive,
424	 while a RAID-5 set distributes the parity across the drives in one
425	 of the available parity distribution methods.
426
427	 A RAID-6 set of N drives with a capacity of C MB per drive
428	 provides the capacity of C * (N - 2) MB, and protects
429	 against a failure of any two drives. For a given sector
430	 (row) number, (N - 2) drives contain data sectors, and two
431	 drives contains two independent redundancy syndromes.  Like
432	 RAID-5, RAID-6 distributes the syndromes across the drives
433	 in one of the available parity distribution methods.
434
435config DM_ZERO
436	tristate "Zero target"
437	depends on BLK_DEV_DM
438	help
439	  A target that discards writes, and returns all zeroes for
440	  reads.  Useful in some recovery situations.
441
442config DM_MULTIPATH
443	tristate "Multipath target"
444	depends on BLK_DEV_DM
445	# nasty syntax but means make DM_MULTIPATH independent
446	# of SCSI_DH if the latter isn't defined but if
447	# it is, DM_MULTIPATH must depend on it.  We get a build
448	# error if SCSI_DH=m and DM_MULTIPATH=y
449	depends on !SCSI_DH || SCSI
450	help
451	  Allow volume managers to support multipath hardware.
452
453config DM_MULTIPATH_QL
454	tristate "I/O Path Selector based on the number of in-flight I/Os"
455	depends on DM_MULTIPATH
456	help
457	  This path selector is a dynamic load balancer which selects
458	  the path with the least number of in-flight I/Os.
459
460	  If unsure, say N.
461
462config DM_MULTIPATH_ST
463	tristate "I/O Path Selector based on the service time"
464	depends on DM_MULTIPATH
465	help
466	  This path selector is a dynamic load balancer which selects
467	  the path expected to complete the incoming I/O in the shortest
468	  time.
469
470	  If unsure, say N.
471
472config DM_MULTIPATH_HST
473	tristate "I/O Path Selector based on historical service time"
474	depends on DM_MULTIPATH
475	help
476	  This path selector is a dynamic load balancer which selects
477	  the path expected to complete the incoming I/O in the shortest
478	  time by comparing estimated service time (based on historical
479	  service time).
480
481	  If unsure, say N.
482
483config DM_MULTIPATH_IOA
484	tristate "I/O Path Selector based on CPU submission"
485	depends on DM_MULTIPATH
486	help
487	  This path selector selects the path based on the CPU the IO is
488	  executed on and the CPU to path mapping setup at path addition time.
489
490	  If unsure, say N.
491
492config DM_DELAY
493	tristate "I/O delaying target"
494	depends on BLK_DEV_DM
495	help
496	A target that delays reads and/or writes and can send
497	them to different devices.  Useful for testing.
498
499	If unsure, say N.
500
501config DM_DUST
502	tristate "Bad sector simulation target"
503	depends on BLK_DEV_DM
504	help
505	A target that simulates bad sector behavior.
506	Useful for testing.
507
508	If unsure, say N.
509
510config DM_INIT
511	bool "DM \"dm-mod.create=\" parameter support"
512	depends on BLK_DEV_DM=y
513	help
514	Enable "dm-mod.create=" parameter to create mapped devices at init time.
515	This option is useful to allow mounting rootfs without requiring an
516	initramfs.
517	See Documentation/admin-guide/device-mapper/dm-init.rst for dm-mod.create="..."
518	format.
519
520	If unsure, say N.
521
522config DM_UEVENT
523	bool "DM uevents"
524	depends on BLK_DEV_DM
525	help
526	Generate udev events for DM events.
527
528config DM_FLAKEY
529       tristate "Flakey target"
530       depends on BLK_DEV_DM
531	help
532	 A target that intermittently fails I/O for debugging purposes.
533
534config DM_VERITY
535	tristate "Verity target support"
536	depends on BLK_DEV_DM
537	select CRYPTO
538	select CRYPTO_HASH
539	select DM_BUFIO
540	help
541	  This device-mapper target creates a read-only device that
542	  transparently validates the data on one underlying device against
543	  a pre-generated tree of cryptographic checksums stored on a second
544	  device.
545
546	  You'll need to activate the digests you're going to use in the
547	  cryptoapi configuration.
548
549	  To compile this code as a module, choose M here: the module will
550	  be called dm-verity.
551
552	  If unsure, say N.
553
554config DM_VERITY_VERIFY_ROOTHASH_SIG
555	def_bool n
556	bool "Verity data device root hash signature verification support"
557	depends on DM_VERITY
558	select SYSTEM_DATA_VERIFICATION
559	help
560	  Add ability for dm-verity device to be validated if the
561	  pre-generated tree of cryptographic checksums passed has a pkcs#7
562	  signature file that can validate the roothash of the tree.
563
564	  By default, rely on the builtin trusted keyring.
565
566	  If unsure, say N.
567
568config DM_VERITY_VERIFY_ROOTHASH_SIG_SECONDARY_KEYRING
569	bool "Verity data device root hash signature verification with secondary keyring"
570	depends on DM_VERITY_VERIFY_ROOTHASH_SIG
571	depends on SECONDARY_TRUSTED_KEYRING
572	help
573	  Rely on the secondary trusted keyring to verify dm-verity signatures.
574
575	  If unsure, say N.
576
577config DM_VERITY_FEC
578	bool "Verity forward error correction support"
579	depends on DM_VERITY
580	select REED_SOLOMON
581	select REED_SOLOMON_DEC8
582	help
583	  Add forward error correction support to dm-verity. This option
584	  makes it possible to use pre-generated error correction data to
585	  recover from corrupted blocks.
586
587	  If unsure, say N.
588
589config DM_SWITCH
590	tristate "Switch target support (EXPERIMENTAL)"
591	depends on BLK_DEV_DM
592	help
593	  This device-mapper target creates a device that supports an arbitrary
594	  mapping of fixed-size regions of I/O across a fixed set of paths.
595	  The path used for any specific region can be switched dynamically
596	  by sending the target a message.
597
598	  To compile this code as a module, choose M here: the module will
599	  be called dm-switch.
600
601	  If unsure, say N.
602
603config DM_LOG_WRITES
604	tristate "Log writes target support"
605	depends on BLK_DEV_DM
606	help
607	  This device-mapper target takes two devices, one device to use
608	  normally, one to log all write operations done to the first device.
609	  This is for use by file system developers wishing to verify that
610	  their fs is writing a consistent file system at all times by allowing
611	  them to replay the log in a variety of ways and to check the
612	  contents.
613
614	  To compile this code as a module, choose M here: the module will
615	  be called dm-log-writes.
616
617	  If unsure, say N.
618
619config DM_INTEGRITY
620	tristate "Integrity target support"
621	depends on BLK_DEV_DM
622	select BLK_DEV_INTEGRITY
623	select DM_BUFIO
624	select CRYPTO
625	select CRYPTO_SKCIPHER
626	select ASYNC_XOR
627	select DM_AUDIT if AUDIT
628	help
629	  This device-mapper target emulates a block device that has
630	  additional per-sector tags that can be used for storing
631	  integrity information.
632
633	  This integrity target is used with the dm-crypt target to
634	  provide authenticated disk encryption or it can be used
635	  standalone.
636
637	  To compile this code as a module, choose M here: the module will
638	  be called dm-integrity.
639
640config DM_ZONED
641	tristate "Drive-managed zoned block device target support"
642	depends on BLK_DEV_DM
643	depends on BLK_DEV_ZONED
644	select CRC32
645	help
646	  This device-mapper target takes a host-managed or host-aware zoned
647	  block device and exposes most of its capacity as a regular block
648	  device (drive-managed zoned block device) without any write
649	  constraints. This is mainly intended for use with file systems that
650	  do not natively support zoned block devices but still want to
651	  benefit from the increased capacity offered by SMR disks. Other uses
652	  by applications using raw block devices (for example object stores)
653	  are also possible.
654
655	  To compile this code as a module, choose M here: the module will
656	  be called dm-zoned.
657
658	  If unsure, say N.
659
660config DM_AUDIT
661	bool "DM audit events"
662	depends on AUDIT
663	help
664	  Generate audit events for device-mapper.
665
666	  Enables audit logging of several security relevant events in the
667	  particular device-mapper targets, especially the integrity target.
668
669endif # MD
670