mdadm

A tool for creating, maintaining, and monitoring Linux
Download

mdadm Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Neil Brown
  • Publisher web site:
  • http://neil.brown.name/portmap/

mdadm Tags


mdadm Description

A tool for creating, maintaining, and monitoring Linux mdadm project is a tool for maintaining, creating, and monitoring Linux "md" device arrays, also known as Software RAID.These notes apply to 2.6 kernels only and, in some cases, to 2.6.15 or later.Md arrays can be assembled at boot time using the 'autodetect' functionalitywhich is triggered by storing components of an array in partitions of type'fd' - Linux Raid Autodetect.They can also be assembled by specifying the component devices in akernel parameter such as md=0,/dev/sda,/dev/sdbIn this case, /dev/md0 will be assembled (because of the 0) from the listeddevices.These mechanisms, while useful, do not provide complete functionalityand are unlikely to be extended. The preferred way to assemble md arrays at boot time is using 'mdadm' or 'mdassemble' (which is a trimmed-down mdadm).To assemble an array which contains the root filesystem, mdadm needs to be run before that filesystem is mounted, and so needs to be run from an initial-ram-fs. It is how this can work that is the primary focus of this document.It should be noted up front that only the array containing the rootfilesystem should be assembled from the initramfs. Any other arraysshould be assembled under the control of files on the main filesystemas this enhanced flexibility and maintainability.A minimal initramfs for assembling md arrays can be created using 3 files and one directory. These are:/bin Directory/bin/mdadm statically linked mdadm binary/bin/busybox statically linked busybox binary/bin/sh hard link to /bin/busybox/init a shell script which call mdadm appropriately.An example init script is:#!/bin/shecho 'Auto-assembling boot md array'mkdir /procmount -t proc proc /procif then arg=--uuid=$rootuuidelif then arg=--super-minor=$mdminorelse arg=--super-minor=0fiecho "Using $arg"mdadm -Acpartitions $arg --auto=part /dev/mdacd /mount /dev/mda1 /root || mount /dev/mda /rootumount /proccd /rootexec chroot . /sbin/init < /dev/console > /dev/console 2>&1


mdadm Related Software