mdadm command for Raid

mdadm –create /dev/md0 –level=0 –raid-devices=2 /dev/sdb1 /dev/sdb2

This will crate raid devices level 0 with /dev/sdb1 /dev/sdb2

mdadm –query /dev/name-of-device

This will find out if a given device is a RAID array, or is part of one, and will provide brief information about the device.

mdadm –assemble –scan

This will assemble and start all arrays listed in the standard config file. This command will typically go in a system startup file.

mdadm –stop –scan

This will shut down all arrays that can be shut down (i.e. are not currently in use). This will typically go in a system shutdown script.

Comments are closed.