How to configure storage when using Proxmox as a NAS

Wobblycogs

New Member
Jun 22, 2023
3
0
1
Apologies is this is really obvious, I've probably misunderstood something and become confused.

I have a machine that I want to use as combined virtualization server and NAS box. I have a 1TB M.2 that I'm using for Proxmox and VM / Container space and a 43TB 5 drive RAIDZ2 array which I want to use for general storage.

I've created a Debian 12 container running Samba (and Cockpit) which will act as the NAS. On the host I've created a new dataset "/tank/scratch" which will be my first shared location.

Now for where I'm struggling. I know that I need to bind mount the "/tank/scratch" directory to the container and I've read up on modifying the containers conf file to do this. I think I'm even starting to understand uid/gid mapping. I'm happy to set this bind mount up manually but I'm not sure this is the best way. Manually setting it up would mean Proxmox wouldn't know anything about "/tank/scratch".

It feels like I should add a directory in Proxmox that points to "/tank/scratch"? I believe I could then add the bind mount though the Proxmox interface. Is there any advantage / disadvantage to this? I think my confusion comes from having to specify what type of file will be stored in a Proxmox directory, I don't want to store ISO's or templates etc in there, I want it to just be general storage space.
 
Hello

I would recommend adding an additional storage at Datacenter > Storage > Add > ZFS

ID: nas_storage
ZFS Pool: /tank/scratch
Content: Container
Thin provision: checked

after that you can add it at Debian 12 container > Resources > Add > Mount Point
 
There is no need to create a dataset if you want Proxmox to manage the ZFS storage.
That means adding the pool. Then Proxmox will create and manage volumes and snapshots.

Dataset must be added as Directory storage type.
Directory is just files. It lacks snapshots (except for .qcow2 VM disks) but works in all kinds of scenarios.
ZFS pool adds block level management, including snapshots. It will perform better normally, but it's for container or disk storage only.

If you insist on dataset (files basically), the Directory storage can contain all the storage types.
Just make sure Container storage type is selected; then add the bind mount (use the GUI).

In the end it depends on how you want to manage the disks.
For example an alternative approach is to create a NAS VM, attach (pass through) the disks to the VM, and let the NAS manage the disks instead of Proxmox.
 
Thanks for the help.

I decided to manually bind mount the the ZFS dataset to the NAS container. I initially went down the route of adding the dataset as ZFS storage in Proxmox but that just added complexity for no benefit that I could see.

Maybe if I did this again I'd pass through the disks to a virtual machine. I like simple solutions though and that has more parts to go wrong. I'm happy enough with Proxmox managing the ZFS array.
 

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!