Dec. 13th, 2014


# figure out how the new drives are called:
lsscsi -s
# or
sudo lshw -C disk

# let's say it's /dev/sdb and /dev/sdc
# create partitions as needed
sudo fdisk /dev/sdb
sudo fdisk /dev/sdc

# create the RAID (in this case --level=1 => RAID1)
sudo mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 /dev/sdc1 --verbose

# check on its status
sudo mdadm --detail /dev/md0
watch -d cat /proc/mdstat

# format
sudo mkfs.ext4 /dev/md0
# optional -- configure to use 99% of capacity
sudo tune2fs -m 1 /dev/md0

# define mount point: add the following line to /etc/fstab:
# /dev/md0 /mnt/raid ext4 defaults 1 2
sudo mount -a

# finally, configure the email notifications
# assuming you are running postfix, add a line to /etc/aliases:
# root: your@email
newaliases
# test:
sudo mdadm --monitor --scan --test --oneshot
Tags:

June 2025

S M T W T F S
123456 7
891011121314
15161718192021
22232425262728
2930     

Expand Cut Tags

No cut tags

Style Credit