Linux Software Raid: Difference between revisions

From DWIKI
mNo edit summary
Line 14: Line 14:
*[https://unix.stackexchange.com/questions/332061/remove-drive-from-soft-raid Remove a disk from soft raid]
*[https://unix.stackexchange.com/questions/332061/remove-drive-from-soft-raid Remove a disk from soft raid]


=FAQ=
=HOWTO=
==Scan devices==
==Scan devices==
  mdadm --examine --scan --verbose /dev/sda2 /dev/sdb2 /dev/sdc2
  mdadm --examine --scan --verbose /dev/sda2 /dev/sdb2 /dev/sdc2
==Stop array==
mdadm --stop /dev/md0





Revision as of 13:21, 7 March 2023

Links

HOWTO

Scan devices

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

Stop array

mdadm --stop /dev/md0


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