Fstab - Disk Passthrough

Proxmox Disk Passthrough Guide#


1. Discovery Commands#

Use these commands to identify physical disks on the Proxmox host.

# Install hardware lister
apt install lshw

# List disks and storage controllers
lshw -class disk -class storage

# List all Physical Disk IDs (The ID needed for passthrough)
ls -l /dev/disk/by-id/

# Advanced list: Maps Device to ID and filters out partitions/LVM
lsblk |awk 'NR==1{print $0" DEVICE-ID(S)"}NR>1{dev=$1;printf $0" ";system("find /dev/disk/by-id -lname \"*"dev"\" -printf \" %p\"");print "";}'|grep -v -E 'part|lvm'

2. Configuration Requirements#

Adding Serials (Crucial for TrueNAS/ZFS)#

In TrueNAS manually edit the VM config file to ensure disk serials persist:

GPU Passthrough Guide

Proxmox GPU Passthrough Guide (NVIDIA Tesla P4)#


1. Proxmox Host Configuration#

Pre-requisites#

  • Ensure PCIe Bifurcation is set to OFF in the server BIOS.

Enable IOMMU#

  1. Open the GRUB configuration:
nano /etc/default/grub
  1. Modify the line GRUB_CMDLINE_LINUX_DEFAULT="quiet" to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
  1. Update GRUB:
update-grub
  1. Reboot the host.

Verify IOMMU Status#

dmesg | grep -e DMAR -e IOMMU

Note: Look for the line: DMAR: IOMMU enabled.


2. VM Configuration (Ubuntu 24.04)#

VM Hardware Settings#

  • Machine: q35
  • BIOS: SeaBIOS
  • Note: Do NOT run apt update or upgrade yet.

Add PCIe Device#

  1. Shut down the VM.
  2. Go to Hardware > Add > PCI Device.
  3. Select Raw Device > Select your GPU.
  4. Ensure All Functions and PCI-Express are checked.

3. Driver Installation in VM#

Verify Hardware Detection#

lspci -v
lspci -nnk | grep -iA2 nvidia

Prepare Build Environment#

Required for version 550+ drivers:

Grafana & InfluxDB Installation

Grafana & InfluxDB Installation Guide#


1. Install Grafana#

Documentation: Grafana Debian Installation
Video Reference: Grafana Setup Guide

Install Prerequisites#

apt-get install -y apt-transport-https software-properties-common wget

Import GPG Key#

mkdir -p /etc/apt/keyrings/
wget -q -O - [https://apt.grafana.com/gpg.key](https://apt.grafana.com/gpg.key) | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null

Add Stable Repository#

echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] [https://apt.grafana.com](https://apt.grafana.com) stable main" | tee -a /etc/apt/sources.list.d/grafana.list

Install Grafana OSS#

apt-get update
apt-get install grafana -y

Enable and Start Service#

systemctl daemon-reload
systemctl enable grafana-server
systemctl start grafana-server
systemctl status grafana-server

2. Install InfluxDB#

Documentation: InfluxDB Installation

Linux - Various Command Lines

Linux & Proxmox Command Line Toolbox#


1. Storage & Disk Management#

Clean Up & Space Recovery#

# Purge unused packages and clean cache
apt autoremove --purge && apt autoclean
# Reclaim journal log space (limit to 500MB)
journalctl --vacuum-size=500M

Identify Large Files & Folders#

# List all files with human-readable sizes
ls -lah
# Summary of folder sizes in current directory
du -sh *
# Identify top 10 largest folders on root
sudo du -xh / | sort -rh | head -n 10
# Disk space usage summary (filtered for MB/GB)
du -cha --max-depth=1 / | grep -E "M|G"

Hugo Project Specifics (Size Checks)#

# Find files larger than 25MB in project
find /home/marc/hugo/canada2argentina -type f -size +25M -exec ls -lh {} +
# Count total files in the public build folder
find /home/marc/hugo/canada2argentina/public -type f | wc -l
# List top 25 largest files in project
find /home/marc/hugo/canada2argentina -type f -exec du -h {} + | sort -rh | head -n 25

Disk Health & Partitions#

# Wipe all partitions/signatures from a disk (CAUTION)
sgdisk --zap-all /dev/sdX
# Detailed SMART health report
smartctl -a /dev/sda | less
# Deep scan for bad blocks (Takes a long time)
badblocks -v /dev/sda -s

2. Proxmox & Virtualization#

VM / Container Management#

# Unlock a stuck VM or Container
qm unlock <vmid>
pct unlock <ctid>
# Resize a container disk (Final size, cannot shrink)
pct resize 103 rootfs 16G
# List running LXC containers
pct list | awk 'NR>1'

High Availability (HA) Fixes#

# Disable HA for a specific VM/CT to allow manual fixes
ha-manager set vm:200 --state disabled
ha-manager set ct:103 --state disabled

Repository & Templates#

# Update and list available CT templates
pveam update
pveam available
# List all active apt sources
grep -r '' /etc/apt/sources.list*

Proxmox Boot & Kernel#

# List and pin a specific kernel
proxmox-boot-tool kernel list
proxmox-boot-tool kernel pin 6.8.8-4-pve

3. Networking & Connectivity#

Troubleshooting & Discovery#

# Check DNS resolution
nslookup google.com
nslookup pi.hole
# Check open listening ports
ss -lntu
netstat -plant
# Performance test (Client mode, 8 parallel streams)
iperf3 -c 10.1.1.11 -P8

SSH & Remote Access#

# View real-time system logs for USB/Kernel errors
dmesg -w
dmesg -T | grep usb
# Clear "Remote Host Identification Changed" error
nano ~/.ssh/known_hosts

File Transfers (SCP)#

# Copy local images from Mac to Hugo site on Server
scp -v /Users/marc/Downloads/to_convert/* root@10.1.2.202:/home/marc/hugo/canada2argentina/static/images/
# Backup and transfer a folder between servers
tar -czvf "$(date +%Y-%m-%d_%Hh%M)_PangolinBackup.tar.gz" pangolin/
scp pangolin.tar.gz root@72.11.147.220:/home/marc/docker-compose

4. System & Hardware Info#

RAM & CPU#

# Clear RAM cache (Drop caches)
sync && echo 3 | tee /proc/sys/vm/drop_caches
# Check ZFS ARC summary and free RAM
arc_summary -s arc && free -h

BIOS & Hardware#

# Get BIOS version and serial info
sudo dmidecode -t bios
# List SCSI and PCIe hardware
lsscsi -u
lspci

Legacy iLO3 Fix (Firefox)#

  1. Type about:config in address bar.
  2. Search: security.tls.version.enable-deprecated.
  3. Set to: true.

5. Miscellaneous Utilities#

Permissions & Scripts#

# Make script executable and run
chmod +x ./unifi-9.0.114.sh && ./unifi-9.0.114.sh

Scheduling & Processes#

# Instant test of cron behavior (Sends message to all terminals)
* * * * * echo "Hello from cron" | wall
# Cancel a pending shutdown
shutdown -c
# Print the path of the folder you are in
pwd

Pangolin Backup Strategy

1 VPS BACKUP SYSTEM: Pangolin Docker#

Target VPS: 72.11.147.220
VPS Provider: RackNerd (RN-VPS)
Backup LXC: Proxmox 102
Retention: 28 Files (14 Days)

The backup is a pull operation: Proxmox LXC 102 initiates SSH to the VPS. The home ISP public IP is therefore used as the source IP seen by the VPS firewall. On 2026-08-12, the home IP was 208.96.219.86; this address is dynamic and must be updated if the ISP changes it.

Proxmox - Configuration

Proxmox Setup & Management Guide#

For fresh installations and initial server builds, please refer to the Proxmox - Initial Setup guide for automated provisioning steps.


1. Storage Management#

1.1 Storage: ZFS Pool Creation#

Create a simple mirrored or striped ZFS pool via CLI.

# Create a pool named 'Storage' using two disks
zpool create Storage sdb sdc

# The pool will now appear in Node > Storage > ZFS

1.2 Storage Specific Tests#

# Test SMB Share Throughput
dd if=/dev/zero of=/mnt/pve/HP1Storage/test.file bs=1M count=4000

# Test local-lvm Performance
dd if=/dev/zero of=/var/lib/vz/test.file bs=1M count=4000

2. Networking#

2.1 Add Second Network Bridge (Isolated VM Traffic)#

Use this for dedicated VM traffic on a specific physical port (e.g., eno6).

Proxmox - Node Backup and Restore

Proxmox VE Host Backup & Restore Guide#

This guide covers the automated backup and restoration process for all Proxmox VE nodes using the dedicated PVE-only scripts.

Proxmox VE 9 Network Interface Disconnection Warning

On fresh Proxmox VE 9 installations, interfaces are pinned automatically (e.g., nic0nic5). Overwriting /etc/network/interfaces with a legacy backup containing older naming schemes (such as eno5, eno6, or eno49) will cause the network interfaces to fail on reboot, resulting in a total loss of Web UI and SSH access.

Proxmox Backup Server - Setup

Proxmox Backup Server (PBS)#


1 Installation & Post-Install#

1.1 Post-Install Optimization#

Run this script to configure repositories and optimize settings:

bash -c "$(wget -qLO - [https://github.com/community-scripts/ProxmoxVE/raw/main/misc/post-pbs-install.sh](https://github.com/community-scripts/ProxmoxVE/raw/main/misc/post-pbs-install.sh))"

1.2 Install File Browser#

bash -c "$(wget -qLO - [https://github.com/tteck/Proxmox/raw/main/misc/filebrowser.sh](https://github.com/tteck/Proxmox/raw/main/misc/filebrowser.sh))"

2 Setup VM with SMB Datastore#

2.1 Create Mount Directory#

mkdir /mnt/HP1ProxmoxBackupServer

2.2 Configure Credentials#

nano /etc/samba/.smbcreds

File Content:

username=proxmox
password=private

2.3 Set Permissions#

Change permission to Read-Only by root:

chmod 400 /etc/samba/.smbcreds

2.4 Manual Mount Test#

mount -t cifs -o rw,vers=3.0,credentials=/etc/samba/.smbcreds,uid=34,gid=34 //10.1.1.225/HP1ProxmoxBackupServer /mnt/HP1ProxmoxBackupServer

2.5 Permanent Mount (fstab)#

nano /etc/fstab

Add line:

Tailscale Installation & Subnet Routing

Tailscale Installation & Subnet Routing Guide#


1. Proxmox LXC Container Preparation#

If you are installing Tailscale inside an LXC container, you must allow TUN device access from the Proxmox host.

Modify Container Config#

On the Proxmox host, edit the configuration file for the specific container (e.g., ID 119):

nano /etc/pve/lxc/119.conf

Add these lines to the bottom:

lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file

Reboot the container:

pct reboot 119

2. Installation by OS#

Debian 12 (Bookworm)#

curl -fsSL [https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg](https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg) | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL [https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list](https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list) | sudo tee /etc/apt/sources.list.d/tailscale.list
apt update && apt install tailscale -y

Ubuntu 24.04 (Noble)#

curl -fsSL [https://pkgs.tailscale.com/stable/ubuntu/noble.noarmor.gpg](https://pkgs.tailscale.com/stable/ubuntu/noble.noarmor.gpg) | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL [https://pkgs.tailscale.com/stable/ubuntu/noble.tailscale-keyring.list](https://pkgs.tailscale.com/stable/ubuntu/noble.tailscale-keyring.list) | sudo tee /etc/apt/sources.list.d/tailscale.list
apt update && apt install tailscale -y

Ubiquiti UDM-SE#

# Install the latest version of Tailscale UDM
curl -sSLq https://raw.github.com/SierraSoftworks/tailscale-udm/main/install.sh | sh

3. Subnet Router & Exit Node Setup#

Enable IP Forwarding#

This is required if you want this node to act as a bridge to your local network.

TrueNAS Administration Guide

TrueNAS Administration Guide#

The complete UNAS-Pro backup architecture, schedules, TrueNAS node configuration, and recovery procedures are documented in Unifi UNAS-Pro Backup Strategy.


1. TrueNAS Scale: Initial Setup & Security#

Virtual Machine Configuration (Proxmox)#

  • Initial Setup: Create the VM. Add a second virtual disk (10GB) for apps and home directories.
  • Post-Login: Verify the Time Zone is accurate.
  • Duplicate Serial Error: If Proxmox reports Disks have duplicate serial numbers, add serials manually in the PVE host:
    nano /etc/pve/qemu-server/212.conf
    # Add serial strings:
    scsi0: Storage:vm-212-disk-0,discard=on,size=32G,ssd=1,serial=PROX-001
    scsi1: Storage:vm-212-disk-1,discard=on,size=1G,ssd=1,serial=PROX-002

Datasets & Users#

  1. Datasets: Create HP3-10Gb-Apps-HomeDirs. Add sub-datasets Apps (Type: Apps) and HomeDirs (Type: Generic).
  2. Standard User: Create user marc for SMB shares.
  3. Sync User: Create backupuser. Set a home directory, uncheck Samba authentication, and do not set a password.
  4. Admin Hardening: - Create user marcoue with full admin rights.
    • Upload SSH keys and enable 2FA for marcoue.
    • Disable the default truenas_admin account once verified.

SSH Hardening#

sudo nano /etc/ssh/sshd_config
# Modify/Add:
PermitRootLogin prohibit-password
PubkeyAuthentication yes

sudo systemctl restart sshd
  • Services: Go to System > Services > SSH and disable “Allow Password Authentication.”

2. System & Networking Optimization#

Startup Scripts & Cron#

  • Cron Shutdown: (System Settings > Advanced)
    • Command: /sbin/shutdown -h now
  • Init Scripts: (Post Init)
    • Command: iperf3 -s -d
  • Session Timeout: (Access > Configure) Set to 2147482.

Host Identification & Email#

  • Hostname/NetBIOS: Set to HP2TrueNAS.
  • Gmail OAuth/SMTP: - Use OAuth login if available.
    • SMTP: smtp.gmail.com | Port: 25 or 587.
    • Use an App Password from 1Password.

3. Data Protection & Replication#

Periodic Snapshots (Source)#

  • Path: Data Protection > Periodic Snapshot Tasks.
  • Settings: Uncheck “Recursive” (unless needed). Uncheck “Taking Empty Snapshot.”
  • Schedule: Daily at 08:30, retention 7 days.

Replication Task (Remote Server Pull)#

  1. Source: Different System.
  2. Connection: New SSH (Semi-Auto).
  3. Settings: Admin: marcoue, User: backupuser. Enable passwordless sudo.
  4. ZFS Commands: Check “Use Sudo for ZFS Commands.”
  5. Schedule: Every hour at 08:45.

4. Syncthing Deployment#

TrueNAS Scale Implementation#

  1. System Settings > Advanced > Sysctl:
    • Var: fs.inotify.max_user_watches | Value: 524288.
  2. Apps > Advanced: Disable “Host Path Safety Check.”
  3. App Setup: Install Enterprise Version. Use Host Path for storage (e.g., /mnt/HP1-4TBSSD-Raid0/HP1Storage).

5. Hardware-Specific Configurations#

Mac Pro Auto-Restart (After Power Outage)#

cd /sys/bus/pci/devices/0000:00:1f.0
sudo chmod -R 777 config
setpci -s 0:1f.0 0xa4.b=0

Wake-on-LAN (WOL) Persistence#

Create a systemd service to ensure WOL stays active: