Child pages
  • Multiple devices (md, software RAID)

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

mdadm --zero-superblock /dev/sda2

TODO: is this next step necessary or even possible (it was not in PTDC-361)

Finally remove the device:

mdadm --remove /dev/md1

Booting from an md RAID 1 device

...

When a RAID 1 md device is used for /boot, GRUB should be installed to both underlying devices, not to the md device.  This is done using

dpkg-reconfigure grub-pc-grub

GRUB2 can be configured to include md support so can assemble the /boot md before loading initrd (or the kernel directly) but Blue Light accepts what the distro delivers.

...

/usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf

It is prudent to rebuild the initramfs after changing mdadm.conf:

update-initramfs -u

mdadm syntax table

In case mdadm --help and the mdam man page are not what is needed.

...


Mode
device
before
options

Options

Notes
--assembleYbitmap, uuid, super-minor, name, config, scan, run, force, update, no-degraded 
--buildY  
--createY  
--growN  
--incrementalNo options  
--miscN  
--manageYadd, remove, fail, set-faulty, run, stop, readonly, readwrite--manage may be omitted
--monitorNo device  

Troubleshooting

Degraded array report

The system my detect a problem with the array and drop an underlying device.  This is normally reported by mail and by Nagios.

It can be confirmed and the excluded underlying device (partition) identified by cat /proc/mdstat

Defects in the physical device may be identified in kern.log and by smartctl -a /dev/sd<letter>

In case smartctl output shows extended tests are not being run (old build computers), update /etc/smarttd.conf from git and edit to suit.

In case no defects are found, there is no choice but to add the excluded underlying device back into the md device as documented under "Replacing an underlying device" above.

If defects are found, ensure the underlying device is not used again by zeroing its md superblock as documented under "Remove an underlying device (md device not in use)" above.

(warning) In one case (bafi), during boot an array was assembled from a defective underlying device and the good underlying device excluded.

initrd fails to assemble md devices

...