HowTo steps required additional HDD for multiple LXC (beginner)

CeKa

Member
Dec 21, 2018
1
0
6
Germany
Hi guys,
I started with PVE this year, so basically I'm a newbie on PVE-topics.
Please give hints, where I'm on the wrong way.
Actually I have 5 LXC and VM on my PVE and I'm more than happy to have such great playground.
Now that my diskspace will run slow somewhen in the future (I just created a LXC with DMS), I bought an external 4TB HDD (USB).
The disk is formatted and mounted but now now I'm lost after several hours googeling.

My idea: have the new external disk accessible for more than one LXC/VM.
- one VM would need it as storage for documents
- one VM would need it for images/pictures
- I would like to access such content from local network outside PVE

If this in general feasible: which steps to take?
If not: any suggestion?

best regards,
Carsten
 
My idea: have the new external disk accessible for more than one LXC/VM.
- one VM would need it as storage for documents
- one VM would need it for images/pictures
- I would like to access such content from local network outside PVE


Possible solution: to use Proxmox host as nfs server. To enable nfs access as client in LXC containers you have to (apart from nfs client package installation in the container):

- add in /etc/apparmor.d/lxc/lxc-default-cgns the following line:
Code:
  mount fstype=nfs,
- add in /etc/pve/lxc/<ct-id>.conf the following line:
Code:
lxc.apparmor.profile: lxc-container-default-cgns

Aftrer that restart both apparmor service and container.