Storage Configurationยถ
Comprehensive storage setup for Proxmox VE including ZFS configuration and directory management.
๐ Storage Overviewยถ
Proxmox VE supports multiple storage types:
Local: Direct attached storage (DAS)
ZFS: Advanced filesystem with snapshots and compression
LVM: Logical Volume Manager
Network Storage: NFS, iSCSI, Ceph
Cloud Storage: Various cloud providers
๐ง Initial Storage Reconfigurationยถ
Remove Local-LVM and Extend Rootยถ
By default, Proxmox creates a small root partition and large local-lvm. For single-node setups, itโs often better to use all space for root:
# Remove local-lvm storage
lvremove /dev/pve/data
# Extend root partition to use all available space
lvresize -l +100%FREE /dev/pve/root
resize2fs /dev/mapper/pve-root
# Verify the change
df -h
Update Storage Configurationยถ
In Proxmox web interface:
Datacenter โ Storage
Remove
local-lvmstorageEdit
localstorageEnable all content types: VZDump backup, ISO image, Container template, Disk image, Container, Snippets
๐๏ธ ZFS Storage Setupยถ
ZFS provides advanced features like snapshots, compression, and data integrity checking.
ZFS Pool Creationยถ
Create ZFS storage pool:
# Wipe existing partitions on target disks
wipefs -a /dev/sdb /dev/sdc
# Create ZFS pool (adjust disk names as needed)
zpool create -f ZFS01 /dev/sdb /dev/sdc
# Create dataset with mountpoint
zfs create ZFS01/Data01
zfs set mountpoint=/zfsdata ZFS01/Data01
ZFS Configuration Optionsยถ
Optimize ZFS for your use case:
# Enable compression (saves space, improves performance)
zfs set compression=lz4 ZFS01/Data01
# Set recordsize for VM images (improves performance)
zfs set recordsize=64K ZFS01/Data01
# Enable deduplication (use carefully, requires lots of RAM)
# zfs set dedup=on ZFS01/Data01
Add ZFS Storage to Proxmoxยถ
In Proxmox web interface:
Datacenter โ Storage โ Add โ Directory
Configuration: - ID:
ZFSData01- Directory:/zfsdata- Content: Select all needed types - Shared: No (unless using shared storage)
๐ Directory Structure Setupยถ
Create organized directory structure for different services:
# Main storage directories
mkdir -p /zfsdata/{vms,containers,backups,iso,templates}
# Docker service directories
mkdir -p /docker/{transmission/{data,watch},prowlarr/config,radarr/config,bazarr/config}
# Media storage (adjust path based on your setup)
mkdir -p /mnt/nas-library/MULTIMEDIA/{movies,tv-shows,Downloads/{complete,incomplete}}
# Backup directories
mkdir -p /backup/{proxmox,docker-configs,media-metadata}
Set Proper Permissionsยถ
# Create service user
adduser arr-stack --uid 1002 --disabled-password --gecos ""
# Set permissions for Docker directories
chown -R 1002:1002 /docker/
# Set permissions for media directories
chown -R 1002:1002 /mnt/nas-library/MULTIMEDIA/
# Backup directory permissions
chown -R root:root /backup/
chmod 750 /backup/
๐ Network Storage Configurationยถ
NFS Storage Setupยถ
For network-attached storage:
# Install NFS client
apt install nfs-common
# Create mount point
mkdir -p /mnt/nas-storage
# Add to fstab for persistent mounting
echo "192.168.1.100:/volume1/proxmox /mnt/nas-storage nfs defaults 0 0" >> /etc/fstab
# Mount immediately
mount -a
Add NFS to Proxmox:
Datacenter โ Storage โ Add โ NFS
Configuration: - ID:
NAS-Storage- Server:192.168.1.100- Export:/volume1/proxmox- Content: Select appropriate types
iSCSI Storage Setupยถ
For iSCSI targets:
# Install iSCSI initiator
apt install open-iscsi
# Discover iSCSI targets
iscsiadm -m discovery -t st -p 192.168.1.200
# Login to target
iscsiadm -m node --login
๐ Storage Monitoringยถ
Monitor storage usage and health:
# Check disk usage
df -h
# ZFS pool status
zpool status
# ZFS dataset usage
zfs list
# Check for disk errors
dmesg | grep -i error
Storage Health Scriptยถ
Create monitoring script:
cat > /usr/local/bin/storage-health.sh << 'EOF'
#!/bin/bash
echo "=== Storage Health Report ==="
echo "Date: $(date)"
echo
echo "=== Disk Usage ==="
df -h
echo
echo "=== ZFS Pool Status ==="
zpool status
echo
echo "=== ZFS Dataset Usage ==="
zfs list
echo
echo "=== Recent Disk Errors ==="
dmesg | grep -i error | tail -10
EOF
chmod +x /usr/local/bin/storage-health.sh
๐ Backup Configurationยถ
Automated Backup Setupยถ
Configure automated backups for critical data:
# Create backup script
cat > /usr/local/bin/storage-backup.sh << 'EOF'
#!/bin/bash
BACKUP_DIR="/backup"
DATE=$(date +%Y%m%d_%H%M%S)
# Backup Proxmox configuration
tar -czf "$BACKUP_DIR/pve-config-$DATE.tar.gz" /etc/pve/
# Backup Docker configurations
tar -czf "$BACKUP_DIR/docker-configs-$DATE.tar.gz" /docker/
# ZFS snapshot (if using ZFS)
zfs snapshot ZFS01/Data01@backup-$DATE
# Clean old backups (keep 7 days)
find "$BACKUP_DIR" -name "*.tar.gz" -mtime +7 -delete
# Clean old ZFS snapshots (keep 14 days)
zfs list -t snapshot | grep backup- | awk '{print $1}' | while read snap; do
creation=$(zfs get -H -o value creation "$snap")
if [[ $(date -d "$creation" +%s) -lt $(date -d "14 days ago" +%s) ]]; then
zfs destroy "$snap"
fi
done
EOF
chmod +x /usr/local/bin/storage-backup.sh
Schedule Backupsยถ
Add to crontab:
# Edit root crontab
crontab -e
# Add daily backup at 2 AM
0 2 * * * /usr/local/bin/storage-backup.sh
๐จ Troubleshootingยถ
Common Storage Issuesยถ
ZFS Pool Import Issues:
# Force import pool
zpool import -f ZFS01
# Check pool status
zpool status ZFS01
Mount Issues:
# Check mount status
mount | grep zfs
# Remount if needed
zfs mount ZFS01/Data01
Permission Issues:
# Reset permissions
chown -R 1002:1002 /docker/
chmod -R 755 /docker/
๐ Storage Configuration Checklistยถ
After storage configuration:
[ ] Root partition extended and local-lvm removed
[ ] ZFS pool created and mounted
[ ] Directory structure organized
[ ] Permissions set correctly
[ ] Network storage configured (if applicable)
[ ] Backup procedures implemented
[ ] Monitoring scripts installed
[ ] Storage added to Proxmox web interface