Create RAID Array on Azure Linux VM

This article will show you how to create RAID 0 (for best performance), or RAID 1 (for fault tolerance) Array on an Azure Linux VM. And will take HB120v3 as example to stripe its 2 local 960GiB NVMe disks.

1. Use lsblk command to find the device names.

In HB120v3, you would see 2 NVMe devices: “nvme0n1″ & “nvme1n1″.

2. Create RAID 0 Array.

# Create a logical RAID 0 device named "NVME_RAID". 
# Please change from --level=0 to --level=1" if you would like to create RAID 1 Array
sudo mdadm --create --verbose /dev/md0 --level=0 --name=NVME_RAID --raid-devices=2 /dev/nvme0n1 /dev/nvme1n1
# Create an ext4 file system with label "NVME_RAID"
sudo mkfs.ext4 -L NVME_RAID /dev/md0
# To ensure RAID array is reassembled automatically on boot
sudo mdadm --detail --scan | sudo tee -a /etc/mdadm.conf
# Create a new ramdisk image
sudo dracut -H -f /boot/initramfs-$(uname -r).img $(uname -r)
# Create a mount point
sudo mkdir -p /mnt/raid
# Mount the RAID device
sudo mount LABEL=NVME_RAID /mnt/raid

3. Verify that the 2 NVMe devices have been striped together as an 1.8TiB RAID 0 Array.

[hpcadmin@hb120v3 ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        221G     0  221G   0% /dev
tmpfs           221G     0  221G   0% /dev/shm
tmpfs           221G  9.0M  221G   1% /run
tmpfs           221G     0  221G   0% /sys/fs/cgroup
/dev/sda2        30G   14G   16G  45% /
/dev/sda1       494M  113M  382M  23% /boot
/dev/sda15      495M   12M  484M   3% /boot/efi
/dev/sdb1       473G   73M  449G   1% /mnt/resource
/dev/md0        1.8T   77M  1.7T   1% /mnt/raid
tmpfs            45G     0   45G   0% /run/user/1000

For Windows VM: Create RAID Array on Azure Windows VM – Raymond’s Tech Thoughts

Create RAID Array on Azure Linux VM 有 “ 1 則迴響 ”

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com 標誌

您的留言將使用 WordPress.com 帳號。 登出 /  變更 )

Google photo

您的留言將使用 Google 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 /  變更 )

連結到 %s