summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthel Morgan <eth@ethulhu.co.uk>2020-08-27 22:19:13 +0100
committerEthel Morgan <eth@ethulhu.co.uk>2020-08-27 22:19:13 +0100
commit581e95391a6553ce7ad51735496fcd6e27c59922 (patch)
tree121ca98ab7712158a84829e908520c90b4f613d0
parent2e3b748eedf4c40594c11c545a52b8a255420be7 (diff)
add very basic notes on RAID / mdadm
-rw-r--r--src/raid.thrust64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/raid.thrust b/src/raid.thrust
new file mode 100644
index 0000000..3c92f27
--- /dev/null
+++ b/src/raid.thrust
@@ -0,0 +1,64 @@
+---
+title: Scrappy notes about RAID & mdadm
+date: 2020-08-27
+---
+{% extends 'templates/base.html' %}
+{% block body %}
+ <nav>
+ <a href='/'>&gt; index</a>
+ </nav>
+ <header>
+ <h1>{{ title }}</h1>
+ </header>
+ <article>
+ {% markdown %}
+
+## Recover from a disk failure
+
+Below is "what worked last time", but there is more comprehensive documentation [elsewhere](https://raid.wiki.kernel.org/index.php/RAID_Recovery).
+
+Disconnect the existing RAID array:
+
+```
+$ mdadm --stop /dev/md127
+```
+
+Create a new array out of the working disks:
+
+```
+$ mdadm \
+ --verbose \
+ --assemble \
+ --force \
+ /dev/md0 \
+ /dev/sdc1 /dev/sdd1
+```
+
+Try mounting it, check everything's OK:
+
+```
+$ mount /dev/md0 /mnt/md0
+```
+
+Add the new disk:
+
+```
+$ mdadm --manage /dev/md0 --add /dev/sdb1
+```
+
+Watch it rebuild, and hope:
+
+```
+$ cat /proc/mdstat
+```
+
+## Misc
+
+### Identify a physical disk
+
+```
+$ hdparm -I /dev/sda | grep Serial
+```
+ {% endmarkdown %}
+ </article>
+{% endblock %}