Skip to content

Instantly share code, notes, and snippets.

TrueNAS iSCSI Setup for Linux Clients

πŸ”§ TrueNAS Configuration

1. Create a Zvol

  • Navigate to Datasets, select your Dataset
  • Click Add Zvol
    • Name: e.g., iscsi-disk01
  • Size: e.g., 10GiB

Video Compression Using FFmpeg (HEVC / H.265 & H.264)

This note explains how to compress videos using FFmpeg with HEVC (H.265) and H.264 (AVC), focusing on broad compatibility across devices β€” PCs, TVs, ARM devices, mobile, and browsers.


1. Recommended Format & Codec

Parameter Recommendation

Drive speed test

This script benchmarks a TrueNAS ZFS pool, including sequential and random I/O tests, and logs results for analysis.

#!/bin/sh
# trueNAS_pool_benchmark.sh
# Usage: sh trueNAS_pool_benchmark.sh <pool_name>
# Example: sh trueNAS_pool_benchmark.sh pool-01

POOL=$1
@ngoc-minh-do
ngoc-minh-do / ipv6.md
Last active September 30, 2025 08:25

🌐 IPv6

πŸ”Ή IPv4 vs IPv6 Basics

Feature IPv4 IPv6
Address Size 32-bit (~4.3 billion addresses) 128-bit (~340 undecillion addresses)
Format 4 decimal numbers, dot-separated 8 groups of 4 hex digits, colon-separated
Example 192.168.0.21 2401:xxxx:xxxx:xxxx::21
NAT Common (private β†’ public mapping) Not needed, direct global addressing

TrueNAS on Proxmox with HBA (LSI/Broadcom 9300-16i)

This guide covers:

  • Checking HBA firmware & mode
  • Updating firmware (IT mode)
  • Enabling PCI passthrough in Proxmox
  • Migrating HDDs from motherboard SATA to HBA
  • Setting up VFIO bindings
  • Verifying PCIe lanes per chip
  • Listing disks per HBA chip

Proxmox PCI Passthrough (IOMMU)

0. BIOS Setup (Required)

Before configuring Proxmox, enable the following in your system BIOS/UEFI:

  • Intel CPUs:
    • Intel Virtualization Technology (VT-x)
    • Intel VT-d (Directed I/O)

Docker Build & Cache

1. Build Caching Basics

  • Docker caches layers based on commands in the Dockerfile.
  • To take advantage of caching:
    • Copy dependency files (pyproject.toml, uv.lock, etc.) before source code.
    • Run dependency installation (uv sync, pip install) before copying the app code.
  • Cache is reused if the files/commands in a layer haven't changed.

Python Setup with uv

uv is a fast and modern Python package, environment, and project manager that can:

  • Install and manage Python versions (like pyenv)
  • Handle dependencies and virtual environments (like Poetry)
  • Run CLI tools without global installs (like pipx)

Proxmox LXC

Downloading Templates

Option 1 – Web UI (Easiest)

  1. Open Proxmox Web Interface β†’ Storage (e.g., local, local-lvm).
  2. Select CT Templates.
  3. Click Templates (top-right).
  4. Choose a template (Debian, Ubuntu, Alpine, etc.) β†’ Download.

Tmux Quick Reference Guide

1. Install & Start Tmux

sudo apt install tmux
tmux
  • Starts a new tmux session.
  • Even if SSH disconnects, the session keeps running in the background.