Linux Software Raid: Difference between revisions

From DWIKI
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Links=
=Links=
*[https://raid.wiki.kernel.org/index.php/A_guide_to_mdadm A guide to mdadm]
*[https://raid.wiki.kernel.org/index.php/Mdstat mdstat]
*[https://www.snel.com/support/how-to-use-mdadm-to-manage-software-raid-disc-arrays/ How to use MDADM to manage software RAID disc arrays]
*[https://www.digitalocean.com/community/tutorials/how-to-create-raid-arrays-with-mdadm-on-ubuntu-16-04 How To Manage RAID Arrays with mdadm ]
*[[RAID]]
*[[RAID]]
*[http://tldp.org/HOWTO/Software-RAID-HOWTO.html Software RAID Howto]
*[http://tldp.org/HOWTO/Software-RAID-HOWTO.html Software RAID Howto]
*[http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch26_:_Linux_Software_RAID A better guide]
*[http://www.linux.com/base/ldp/howto/Software-RAID-0.4x-HOWTO.html#toc4 Another raid howto]
*http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID
*http://gentoo-wiki.com/HOWTO_Gentoo_Install_on_Software_RAID
*[http://www.snia.org/tech_activities/standards/curr_standards/ddf/ COMMON RAID DISK DATA FORMAT (DDF)]
*[http://www.snia.org/tech_activities/standards/curr_standards/ddf/ COMMON RAID DISK DATA FORMAT (DDF)]
*[http://www.mepis.org/docs/en/index.php/Software_RAID_mirror Switching to mirroring]
*[http://www.mepis.org/docs/en/index.php/Software_RAID_mirror Switching to mirroring]
*http://www.sanitarium.net/golug/Linux_Software_RAID.html
*http://www.sanitarium.net/golug/Linux_Software_RAID.html
*[https://unix.stackexchange.com/questions/332061/remove-drive-from-soft-raid Remove a disk from soft raid]
*[https://www.thomas-krenn.com/en/wiki/Mdadm_recovery_and_resync Mdadm recovery and resync]
=HOWTO=
==Scan devices==
mdadm --examine --scan --verbose /dev/sda2 /dev/sdb2 /dev/sdc2
==Stop array==
mdadm --stop /dev/md0
==Re-add disk to array==
mdadm /dev/md0 --re-add /dev/sdc1
==List devices==
Just
cat /proc/mdstat


=What the howto and man mdadm don't tell=
=What the howto and man mdadm don't tell=

Latest revision as of 14:41, 15 April 2024

Links

HOWTO

Scan devices

mdadm --examine --scan --verbose /dev/sda2 /dev/sdb2 /dev/sdc2

Stop array

mdadm --stop /dev/md0


Re-add disk to array

mdadm /dev/md0 --re-add /dev/sdc1


List devices

Just

cat /proc/mdstat

What the howto and man mdadm don't tell

Checking the raid units

From man md:

echo check > /sys/block/md0/md/sync_action

check /proc/mdstat for status, and then set back to idle:

echo idle > /sys/block/md0/md/sync_action

Looking at your raid units

cat /proc/mdstat
mdadm --detail /dev/md0

(also shows what's going on when checking/resynching)

Hotswapping (scsi) disks

eject -s /dev/sda