MAL - Memória Auxiliar do Lutieri

domingo, setembro 11, 2011

mounting RAID devices on boot

if you already have a software RAID configured with mdadm it won't reassemble automatically on each boot. in order to have it reassembling do the following:

mdadm --detail --scan > /etc/mdadm.conf 

That's pretty much it!

Other useful commands:


Creating a RAID:


mdadm -Cv /dev/md1 -level=1 -n2 /dev/sdb1 /dev/sdc1



watching the building/rebuild status

cat /proc/mdstat

Check the RAID state:

mdadm -D /dev/md1


Simulates a failed drive:

mdadm /dev/md1 -f /dev/sdc1


Add a new drive (partition) to replaced the failed one:

mdadm --manage /dev/md1 -a /dev/sdb2


To reuse the failed drive one have to remove it and add it again to the array:

mdadm --manage /dev/md1 -r /dev/sdc1
mdadm --manage /dev/dm1 -a /dev/sdc1

Stopping a RAID:

mdadm -S /dev/md1



To "remount" a stopped or un-assembled RAID:

mdadm --assemble /dev/md1 /dev/sdb1 /dev/sdc1

OR

mdadm --assemble --scan


one more time the gentoo wiki has thousands of good info regarding software-based RAID:
http://en.gentoo-wiki.com/wiki/RAID/Software

Marcadores:

0 Comentários:

Postar um comentário

<< Home



Chat with Lutieri G. B.

Subscribe in a reader