Formatting code for SoftwareRAID
{{parent page="Storage"}}
===Linux RAID===
%%
# Scan existing raid config
mdadm --detail --scan
# Scan existing raid volumes and perform assembly
mdadm -A --scan
%%
Create a volume with missing drive
%%
mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/sdb6 missing
%%
Add a device to a raid volume
%%
mdadm /dev/md3 --add /dev/sda6
%%
===Stripe cache===
If you are running raid4,5,6, setting a higher stripe cache may boost write performance signficantly
%%
echo 8192 > /sys/block/md2/md/stripe_cache_size
%%
http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-06/msg03344.html
===Linux RAID===
%%
# Scan existing raid config
mdadm --detail --scan
# Scan existing raid volumes and perform assembly
mdadm -A --scan
%%
Create a volume with missing drive
%%
mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/sdb6 missing
%%
Add a device to a raid volume
%%
mdadm /dev/md3 --add /dev/sda6
%%
===Stripe cache===
If you are running raid4,5,6, setting a higher stripe cache may boost write performance signficantly
%%
echo 8192 > /sys/block/md2/md/stripe_cache_size
%%
http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-06/msg03344.html