How to create a basic RAID 1 array on Linux. We use Linux Mint 21.3 to create a 1 TB mirrored array using the command line.
Commands/Steps used in this video:
1) Open terminal
2) List block devices
lsblk
3) Choose devices for array
/dev/sdb and dev/sdc
4) Check RAID status
cat /proc/mdstat
5) Create Array
mdadm --create --verbose /dev/md1 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
6) Check RAID status
cat /proc/mdstat
7) Create a filesystem
mkfs.ext4 /dev/md1
8) Create a mount point
mkdir -p /mnt/md1
9) Mount the drive
mount /dev/md1 /mnt/md1
10) Check if mounted
df -h -x tmpfs
11) Save array layout
mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
12) Check if saved
cat /ect/mdadm/mdadm.conf
13) Update the initramfs, or initial RAM file system
update-initramfs -u
14) Add the new filesystem mount option to the /etc/fstab file for automatic mounting at boot:
echo '/dev/md1 /mnt/md1 ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab
15) Find UUID
blkid
16) Change fstab to UUID
nano /etc/fstab
On this page of the site you can watch the video online Create A Basic RAID1 Array on Linux with a duration of hours minute second in good quality, which was uploaded by the user Guy Hokanson 09 December 2024, share the link with friends and acquaintances, this video has already been watched 1,049 times on youtube and it was liked by 15 viewers. Enjoy your viewing!