wuertele.com

Search Results Matching Your Query: Zero
Recovering degraded RAID/LVM array in Linux

Attempting here to document a process that I always seem to need but never seem to be able to remember.

# Force the degraded array to assemble even if it would
# be unsafe

mdadm --assemble --scan --force
# Look at details of array to discover which disks are
# removed
mdadm -D /dev/md0
# Add any disks that are removed to the array so that they
# start recovery
mdadm /dev/md0 -a /dev/sde1
mdadm /dev/md0 -a /dev/sdf1
# Tell Linux to increase the amount of time it spends
# recovering RAID devices

echo 100000 > /proc/sys/dev/raid/speed_limit_min
# Create a window to monitor the recovery progress
xterm -e watch -n 10 cat /proc/mdstat &
# Discover the names of the volume groups
pvscan
# Activate all known volume groups
vgchange -ay

# Recover journal and sanity check
fsck /dev/mapper/lvm--raid-lvm0

Other potentially useful links: Linux RAID wiki, hacking lvm