Prompt
What’s the best way to set up shared file storage for a mix of VMs and containers, with snapshots and low monthly cost?
Latest observation
For a mix of VMs and containers, the best low-cost setup is usually a single Linux storage server exporting storage over the network, rather than trying to share disks directly between hosts.
Best overall choice
ZFS on a dedicated storage VM or small server
Use:
- ZFS for the filesystem/storage layer
- NFS for Linux VMs and containers
- SMB/Samba only if you also need Windows clients
- ZFS snapshots for cheap point-in-time backups/rollback
Why this is the best fit
- Snapshots are built in and very fast
- Low monthly cost: can run on one modest machine or a VPS with attached disks
- Works well for both VMs and containers
- Easy to manage compared with Ceph/Gluster
- Flexible: can present separate datasets for each VM/app/container
Recommended architecture
Option A: Cheapest/simple, good for small to medium setups
One storage host
- Install Linux + ZFS
- Create datasets like:
tank/vm-imagestank/container-datatank/shared
- Export them via:
- NFS to Linux VMs/containers
- SMB if needed for Windows
This is usually the best balance of cost and simplicity.
Option B: If you want block storage for some VMs
Use:
- ZFS
- iSCSI for VM disks
- NFS/SMB for file shares
This is useful if your hypervisor prefers block devices, but for most container and file workloads, NFS is simpler.
Snapshot strategy
With ZFS you can do:
- Frequent snapshots for quick rollback
- Replication to another cheap machine or object storage for off-site backup
Example:
- Hourly snapshots for 24 hours
- Daily snapshots for 7–30 days
- Weekly snapshots for long-term retention
Important: snapshots are not backups. They protect against accidental deletion or bad deploys, but not against disk loss, theft, or ransomware on the storage host.
Lowest-cost practical stack
If you want the cheapest useful setup:
- One x86 mini PC or small server
- 2 SSDs in mirror if budget allows, or 1 SSD + backups if not
- ZFS
- NFS
- WireGuard/VPN for remote access instead of exposing storage directly to the internet
If you’re in a cloud environment and want low cost:
- A small Linux VM
- Attached block volumes
- ZFS on top
- Export via NFS to your other VMs/containers
What to avoid
Avoid these for your use case:
- Directly sharing one filesystem mount across multiple VMs using raw disk tricks
- Ceph unless you already have 3+ nodes and need high availability
- GlusterFS for small setups; it’s more complex and often less reliable than people expect
- Consumer cloud file shares if you need snapshots and good cost control; they can get expensive fast
If you want the simplest answer
Use ZFS on one storage server and export it with NFS.
That gives you:
- shared access for VMs and containers
- snapshots
- low cost
- simple administration
If you want, I can also give you:
- a budget hardware/cloud option list, or
- a step-by-step setup guide for ZFS + NFS + snapshots.