...
This guide provides step-by-step instructions for setting up a RAID array with two ADATA 256 NVME gen 3.0 drives on Ubuntu Server 23.04.
Table of Contents
Anchor | ||||
---|---|---|---|---|
|
2x A-data legend 710 NVMEs
Ubuntu Server 23.04 (Customer image)
...
Command: sudo dd if=/dev/nvme0n1 of=/dev/null bs=4M status=progress; sync
Result: 255 GB copied in 111 seconds at a rate of 2.3 GB/s.
Anchor | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
For each disk you want to include in the RAID configuration:
Run:
parted /dev/sdX mklabel gpt
to create a new GPT labelCreate a primary partition with:
parted /dev/sdX mkpart primary ext4 0% 100%
Set the RAID flag with:
parted /dev/sdX set 1 raid on
Anchor | ||||
---|---|---|---|---|
|
Use mdadm to create the RAID array:
mdadm --create --verbose /dev/md0 --raid-devices=<number of disks> --level=0 /dev/<partition of first disk> /dev/<partition of second disk> <more disks>
Info |
---|
|
Anchor | ||||
---|---|---|---|---|
|
Format RAID device with:
mkfs.ext4 /dev/md0
Info |
---|
/dev/md0 is used because in the previous command we created it with the name /dev/md0 |
Anchor | ||||
---|---|---|---|---|
|
Run
blkid
to ge the UUID of the /dev/md0 partitionExample:
UUID="2ff3d24d-c123c-43d5-41ed-627bcdf54154"
Anchor | ||||
---|---|---|---|---|
|
Open /etc/fstab using
vi /etc/fstab
Add the Line
<Your UUID> /home ext4 defaults 0 1
Replace <>Your UUID> with the actual UUID from the previous step
You can also change /home which is the destination point to mount the RAID disk
Anchor | ||||
---|---|---|---|---|
|
Run
mount -a
to mount all filesystemsVerify with
df -h
to see if the filesystem got mounted
...