Skip to content

NAS -LXC

I wanted my NAS to be virtualized within my Proxmox and light as possible since I was servicing NFS and CIFS shares. I decided on Turnkey fileserver lxc partially as this was a readily available CT template accessible within proxmox. I like the idea with LXC you set minimal resources and the machine will burst when required which is opposite to a VM which you reserve the maximum expected resources. Knowing that this machine would be idle much of the time reserving big resources seemed a waste.

I build my machine with

  • 1 Gig ram
  • 2 cores
  • 8 gig storage
  • I will add a mount point of a 2 Terabyte NVME later.
  • I set the LXC to be privileged, to easily configure read/write to the mount point without setting up special permissions. I also set a static IP for my network.

The disk.

I had a 2 terabyte NVME in my server unused. I went to the PVE/Disk section and created a ZFS storage pool. Next I went to Datacenter/Storage section of proxmox and mounted a ZFS storage pool with this one disk and named it nfs.

from the shell you can now see /mnt/pve/nfs. you can test this by going into NFS and create a file by

touch test.txt

Now you can create a mount point to your LXC from the pve shell.

pct set 106 -mp0 /mnt/pve/nfs,mp=/mnt/data

where 106 is the image number

/mnt/data is the mount point within the fileserver. The host is now complete and you can go ahead and configure the shares.

NFS.

within the proxmox PVE shell

apt update
apt install nfs-kernel-server

Next we need to configure the publish path or “exports”

sudo nano /etc/exports

within the file add the following

/mnt/data *(rw,all_squash,insecure,async,no_subtree_check,anonuid=1000,anongid=1000)

save by

control-o, return, control-x

now we update the nfs server with the new settings

sudo exportfs -ra

then we restart the service

sudo systemctl restart nfs-kernel-server

on your personal machine you can test by

show mount -e <ip of fileserver>

On linux vis you can now mount. On my Mac I needed to add an smb share to connect. which I will probably replace with a docker app.

Published inUncategorized

Comments are closed.