When it comes to creating a robust and efficient NAS (Network Attached Storage), Proxmox offers a unique advantage. Unlike traditional setups that rely on virtual machines (VMs) or containers, you can harness Proxmox’s Debian roots and built-in ZFS support to build a NAS directly on your server, eliminating any performance overhead.
In this guide, we’ll walk you through setting up a high-performance NAS on Proxmox step by step.
Why Build a NAS Without VMs or Containers?
- Performance Boost: Avoid the overhead introduced by virtualization layers.
- Simplified Management: Use Proxmox’s native tools and command-line utilities.
- Cost-Effectiveness: Maximize your server’s efficiency without additional software.
Step 1: Create a ZFS Pool
ZFS Advantages:
- RAID Support: Ensure redundancy with RAID-Z or mirror setups.
- Snapshots and Self-Healing: Automatically detect and repair file corruption.
Steps:
- Prepare Drives:
- Plug the drives into your Proxmox server.
- Navigate to the Disks tab in the Proxmox web UI and wipe the drives to prepare them for use.
- Create the ZFS Pool:
- Go to the ZFS tab.
- Click Create ZFS and provide a name for your pool.
- Choose a RAID level (e.g., RAID-Z for redundancy or striping for performance).
- Click Create to finalize the setup.
Step 2: Set Up a Samba Share
Samba allows devices on your network to access the storage as a shared directory.
Install Samba:
Run the following command in the Proxmox shell:
apt install samba smbclient -y
Create the Share Directory:
mkdir /<zfs_pool_name>/<share_name>
Add a User for the Share:
useradd -m <user_name>
passwd <user_name>
Set an SMB Password:
smbpasswd -a <user_name>
Configure Samba:
- Edit the Samba configuration file:
nano /etc/samba/smb.conf
- Add the following to the bottom of the file:
[<share_name>] path = /<zfs_pool_name>/<share_name> read only = no valid users = <user_name> writeable = yes
- Save and exit by pressing Ctrl+X, then Y, and Enter.
Adjust Permissions:
chmod 777 /<zfs_pool_name>/<share_name>
Restart Samba:
systemctl restart smbd.service
Step 3: Access the Network Share
To access the share from another device, follow these steps:
On Windows:
- Open File Explorer.
- In the address bar, enter the Proxmox server’s IP (e.g.,
\\192.168.1.100
). - When prompted, enter the Samba username and password.
On Linux:
Use the following command to mount the share:
sudo mount -t cifs //<proxmox_ip>/<share_name> /mnt/<local_mount_point> -o username=<user_name>,password=<password>
Step 4: Manage Your NAS
Regular Maintenance Tasks:
- Scrubbing: Checks for data integrity.
zpool scrub <zfs_pool_name>
- Trimming: Optimizes SSDs.
zpool trim <zfs_pool_name>
- Resilvering: Rebuilds RAID when a drive is replaced.
Why Use Proxmox for a NAS?
While dedicated NAS operating systems like TrueNAS offer a polished experience, Proxmox provides unmatched flexibility:
- Native ZFS Support: Leverage Proxmox’s powerful ZFS capabilities without additional overhead.
- Custom Workflows: Add more services or even deploy a hybrid setup using VMs for other purposes.
- Low Hardware Requirements: Efficiently utilize resources without the need for a separate NAS OS.
By following this guide, you can transform your Proxmox server into a high-performance NAS without relying on VMs or containers. This setup combines the robustness of ZFS with the simplicity of Samba, delivering a scalable and efficient storage solution for your network.