RAID1(mdadm) NFS

ewlesian

New Member
Feb 9, 2020
6
0
1
I started by SSH into Proxmox server and verify two hard drives show up.
Disk /dev/sda: 4001GB
Disk /dev/sdb: 4001GB

Now I prepare the drives:
parted /dev/sda
mklabel gpt
mkpart primary 1M 4001GB
repeat for /dev/sdb

Enable raid:
sudo mdadm --verbose --create /dev/md0 --level=raid1 --raid-devices=2 /dev/sda1 /dev/sdb1
sudo mkfs.ext4 /dev/md0

Setup NFS Server:
apt-get install nfs-kernel-server
vim /etc/exports
/mnt/md0 192.168.1.20/255.255.255.0(rw,no_root_squash)
service nfs-common start -> Error message (nfs-common.service is masked.)
rm /lib/systemd/system/nfs-common.service
systemctl daemon-reload
service nfs-common start
service nfs-kernel-server start
mount /dev/md0 /mnt/md0

Verify:
df -h
/dev/md0 3.6T 89M 3.4T 1% /mnt/md0

Now how do I share this raid array with a VM, so that I can store files on it?
 
There is no special share-to-VM function. Your VM acts like any other computer which means you will have to connect to your NFS from within your VM.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!