Mdadm: Difference between revisions

From David's Wiki
(Created page with "Mdadm is used to create linux MD raids. ==Usage== <syntaxhighlight> # Check the status of /dev/md0 mdadm -D /dev/md0 </syntaxhighlight> ===Create a raid array=== See https://www.tecmint.com/create-raid-6-in-linux/ First use gdisk to create a linux raid partition (FD00) on all your disks. Note that is purely convention and is optional. Then run the following to create /dev/md0. <syntaxhighlight lang="bash"> mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sda1 /...")
 
No edit summary
Line 2: Line 2:


==Usage==
==Usage==
<syntaxhighlight>
<syntaxhighlight lang="bash">
# Check the status of /dev/md0
# Check the status of /dev/md0
mdadm -D /dev/md0
mdadm -D /dev/md0

Revision as of 00:56, 14 March 2023

Mdadm is used to create linux MD raids.

Usage

# Check the status of /dev/md0
mdadm -D /dev/md0

Create a raid array

See https://www.tecmint.com/create-raid-6-in-linux/

First use gdisk to create a linux raid partition (FD00) on all your disks. Note that is purely convention and is optional.

Then run the following to create /dev/md0.

mdadm --create /dev/md0 --level=6 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1

# Now you have a block device /dev/md0 on which you can add LUKS, LVM, or a filesystem.

Scrubs

On Ubuntu, md will automatically scrub on the first Sunday of every month using a systemd timer.