NFS share for storage on Proxmox

This article covers various things such as updating the system and the fallout from that, as well as using ZFS on an external USB device, and switching from SAMBA to NFS.

I have a Raspberry Pi 4 that runs Proxmox. I have many containers. These work. When I configured it I set it up as ZFS on an external USB. This was a bad choice. I ended up wiping the external storage and switching from ZFS to EXT4. I was able to do this because I’d set up backups for the containers that triggered on a regular basis. But first I updated the system and ended up dealing with several other problems.

After an update I noted that the system would not give me an IP address. So, I took the Pi to work to try to resolve the issue — I had more time there and easier access to view what was wrong (I use the Pi4 at home headless). This helped as I was able to modify the /etc/network/interfaces file and manually set the IP address and bridge.

When I finally figured that out wouldn’t you know I then had another issue. This was with getting the ZFS pool mounted. Because of the ZFS mounting problems I then had problems getting the containers to start.

I ran “sudo zpool scrub pi4zpool” repeatedly in order to get ZFS to clean issues with the pool, but this would not resolve it. It kept saying the pool was degraded.

My decision then was to backup the containers to my file server and then blow away the ZFS file system on the USB and reformat it as EXT4. This was more difficult than I expected as several other things cropped up that needed to be resolved first. Because the pool wouldn’t mount I couldn’t backup the containers. Since I had the containers backing up on a regular basis prior to the issues described here I just used those container backups instead. I was motivated at this time to get this migrated from SAMBA shares to NFS shares.

Here’s where the title of this posts makes sense.

I’m trying to create a “storage” on the file server within Proxmox (this “storage” is part of the Datacenter option of Proxmox and it is where you specify the locations of various storage pools that can be used for things like containers, VMs and backups). Originally I set this up with SAMBA because it was easiest to configure and I had the most experience with it. After watching a video on the performance differences between SAMBA and NFS I chose NFS. I had done this at my business offices and thought I would like to do the same at home with this Raspberry Pi.

On the Proxmox host you have to ensure that NFS is installed and then configure it. One of those steps is to create the exports and then put them into play. After that you can access the NFS shares via the Datacenter of Proxmox where you set up the “storages”.

This triggered another problem…time for more learning. Proxmox kept dumping out an error message.

create storage failed: mkdir /mnt/pve/BackupsAtShop/template: Permission denied at /usr/share/perl5/PVE/Storage/Plugin.pm line 1175. (500)

The key here is to read that carefully. It says that it is trying to make a directory at /mnt/pve/BackupsAtShop/template.

“template” is the key. I went into the folder and tried to give it permissions. However this would change the permissions of other stuff I have there. So, I created a folder called /mnt/pve/BackupsAtShop/rpipvebackups

Then I gave that 777 permissions.

I then did a “pwd” at the command line while in the folder and grabbed the full correct path.

Where the creation of the storage asked for the export I pasted the whole path into it.

This allowed me to properly set up the location where the PVE backup could write to.

I was then able to tell Proxmox to backup the containers to the NFS share.