Why Use Network Storage in Proxmox?
Network storage provides several advantages:
- Centralized storage for multiple Proxmox nodes.
- Live migration of VMs between nodes.
- Redundancy and improved backup strategies.
- Scalability for growing environments.
Proxmox supports multiple network storage types, including:
- NFS (Network File System) – Easy to set up for shared storage.
- iSCSI (Internet Small Computer System Interface) – Offers block-level storage.
- CephFS/RBD – Highly scalable distributed storage.
- GlusterFS – Suitable for redundant and distributed storage.
For this guide, we will focus on setting up NFS and iSCSI.
1. Setting Up NFS Storage in Proxmox
Step 1: Install NFS Server (If Not Already Set Up)
If you don’t have an NFS server, install one on a separate storage machine (Ubuntu example):
sudo apt update && sudo apt install nfs-kernel-server -y
Step 2: Configure the NFS Export
Create a directory for Proxmox storage and configure it for NFS sharing:
sudo mkdir -p /srv/nfs/proxmox
sudo chown -R nobody:nogroup /srv/nfs/proxmox
sudo chmod 777 /srv/nfs/proxmox
Edit the NFS exports file:
sudo nano /etc/exports
Add the following line to allow access from the Proxmox network (adjust IP as needed):
/srv/nfs/proxmox 192.168.1.0/24(rw,sync,no_root_squash)
Save and exit, then apply the changes:
sudo exportfs -a
sudo systemctl restart nfs-kernel-server
Step 3: Add NFS Storage in Proxmox
1. Log in to the Proxmox Web UI.
2. Navigate to Datacenter > Storage and click Add > NFS.
3. Enter:
- ID: A unique name for the storage (e.g., `nfs-storage`).
- Server: The IP address of your NFS server.
- Export: Select the shared directory (`/srv/nfs/proxmox`).
- Content: Choose the types of data to store (e.g., VMs, backups, etc.).
4. Click Add to finalize.
Your Proxmox nodes can now use this NFS storage for VMs and backups.
2. Setting Up iSCSI Storage in Proxmox
Step 1: Install iSCSI Target on the Storage Server
If using an Ubuntu-based storage server, install the iSCSI target:
sudo apt update && sudo apt install tgt -y
Step 2: Configure the iSCSI Target
Edit the iSCSI target configuration file:
sudo nano /etc/tgt/conf.d/iscsi.conf
Add the following lines:
target iqn.2024-02.local.server:storage {
backing-store /dev/sdb
initiator-address 192.168.1.0/24
}
Replace `/dev/sdb` with your actual storage device.
Restart the iSCSI target service:
sudo systemctl restart tgt
Step 3: Add iSCSI Storage in Proxmox
1. Go to Datacenter > Storage and click Add > iSCSI.
2. Enter:
- ID: Unique storage name (e.g., `iscsi-storage`).
- Portal: IP of the iSCSI server.
- Target: Select the available iSCSI target.
3. Click Add.
To use iSCSI as a VM disk backend, integrate it with LVM over iSCSI by adding LVM-Thin in Proxmox’s storage settings.
Conclusion
By setting up network storage in Proxmox using NFS or iSCSI, you enable better resource sharing, redundancy, and VM mobility across multiple nodes. Choose the storage type that fits your needs and scale your Proxmox environment efficiently.
COMMENTS