quickreference:mdadm
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| quickreference:mdadm [2018/10/27 23:16] – external edit 127.0.0.1 | quickreference:mdadm [2026/04/13 20:50] (current) – rodolico | ||
|---|---|---|---|
| Line 29: | Line 29: | ||
| ==== Create RAID ===== | ==== Create RAID ===== | ||
| <code bash> | <code bash> | ||
| - | mdadm --create /dev/md2 --raid-devices=3 --spare-devices=0 --level=5 --run / | + | mdadm --create / |
| </ | </ | ||
| + | |||
| + | Note: --assume-clean is for SSD's which are **known** to be clean (no bad blocks). It will not do a resync on the underlying system, ' | ||
| Note: see Setting GRUB on a drive if you are setting up a bootable RAID-1 | Note: see Setting GRUB on a drive if you are setting up a bootable RAID-1 | ||
| Line 209: | Line 211: | ||
| </ | </ | ||
| This stops the array as /dev/md127 and then reassembles it as /dev/md0. The reassembly looks for devices which have an existing minor number of 127, not 0 (-m127), and then updates the minors in the superblocks to the new number. I included the original members (sdb, sdc and sdd) as / | This stops the array as /dev/md127 and then reassembles it as /dev/md0. The reassembly looks for devices which have an existing minor number of 127, not 0 (-m127), and then updates the minors in the superblocks to the new number. I included the original members (sdb, sdc and sdd) as / | ||
| + | |||
| + | Note: If you have LVM2 running on top of your RAID set, you must do the following for each LV listed. | ||
| + | <code bash> | ||
| + | for lv in `ls / | ||
| + | do | ||
| + | | ||
| + | done | ||
| + | vgchange -an vgname | ||
| + | </ | ||
| + | change vgname to the actual name of you volume group. You must do this before you can stop the md | ||
| ==== Converting from one RAID level to another ===== | ==== Converting from one RAID level to another ===== | ||
quickreference/mdadm.1540700161.txt.gz · Last modified: by 127.0.0.1
