Projekt

Allgemein

Profil

Aktionen

Howto mdadm » Historie » Revision 4

« Zurück | Revision 4/5 (Vergleich) | Weiter »
Jeremias Keihsler, 17.09.2024 13:43


Howto mdadm

lsblk is your best friend

lsblk

we are going to use partitions as base for the raid

create Linux RAID partitions

fdisk /dev/nvme0n1

create new GPT disklabel

g

create new partion

n

change type to Linux RAID

t
29

repeat for all drives e.g. /dev/nvme0n1 and /dev/nvme1n1

check with lsblk

create Raid

mdadm --create /dev/md20 --level=1 --raid-devices=2 /dev/nvme0n1p1 /dev/nvme1n1p1

check with lsblk

create filesystem on Raid

mkfs.xfs /dev/md20

update mdadm.conf

mdadm --detail --scan

add the ARRAY info in /etc/mdadm.conf
should look similar to this

# JKE 2024-09-17
#ARRAY /dev/md20 metadata=1.2 name=hostXX.example.com:20 UUID=d80d7e3a:833baf6d:a428f02d:6f27f791
ARRAY /dev/md20 UUID=d80d7e3a:833baf6d:a428f02d:6f27f791

assemble raid

mdadm --assemble --scan

check raid

cat /proc/mdstat

mount raid

mkdir /mnt/raid
mount /dev/md20 /mnt/raid/

add mount to fstab

add following line to fstab

/dev/md20    /mnt/raid    xfs   defaults   0 0

Von Jeremias Keihsler vor 2 Monaten aktualisiert · 4 Revisionen