diff options
author | Julien Dessaux | 2020-04-28 17:29:52 +0200 |
---|---|---|
committer | Julien Dessaux | 2020-04-28 17:29:52 +0200 |
commit | 6cc9d8c72a56563b6d1a12b8b441dfa9dde345e9 (patch) | |
tree | 042852f7a8a18f65c8d5191234c8ed1cb85fd8a4 /content/en/blog/commands/mdadm.md | |
parent | Initial import (diff) | |
download | www-6cc9d8c72a56563b6d1a12b8b441dfa9dde345e9.tar.gz www-6cc9d8c72a56563b6d1a12b8b441dfa9dde345e9.tar.bz2 www-6cc9d8c72a56563b6d1a12b8b441dfa9dde345e9.zip |
Long overdue first commit with content
Diffstat (limited to '')
-rw-r--r-- | content/en/blog/commands/mdadm.md | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/content/en/blog/commands/mdadm.md b/content/en/blog/commands/mdadm.md new file mode 100644 index 0000000..1dbc3f8 --- /dev/null +++ b/content/en/blog/commands/mdadm.md @@ -0,0 +1,42 @@ +--- +title: "mdadm" +linkTitle: "mdadm" +date: 2011-11-15 +description: > + mdadm +--- + +## Watch the array status + +{{< highlight sh >}} +watch -d -n10 mdadm --detail /dev/md127 +{{< /highlight >}} + +## Recovery from livecd + +{{< highlight sh >}} +mdadm --examine --scan >> /etc/mdadm.conf +mdadm --assemble --scan /dev/md/root +mount /dev/md127 /mnt # or vgscan... +{{< /highlight >}} + +If auto detection does not work, you can still assemble an array manually : +{{< highlight sh >}} +mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 +{{< /highlight >}} + +## Resync an array + +First rigorously check the output of `cat /proc/mdstat` +{{< highlight sh >}} +mdadm --manage --re-add /dev/md0 /dev/sdb1 +{{< /highlight >}} + +## Destroy an array + +{{< highlight sh >}} +mdadm --stop /dev/md0 +mdadm --zero-superblock /dev/sda +mdadm --zero-superblock /dev/sdb +{{< /highlight >}} + |