Skip to content

Homelab Migration

Moving from a Lenovo M920q to a custom ATX build.

Hardware Old New Description
CPU Intel Core i5-9500T vPro Ryzen 9 3900X Upgrade from 6 cores / 6 threads at 2.30 GHz to 12 cores / 24 threads at 3.8 GHz.
RAM 32 GB DDR4 SODIMM 48 GB (2 x 16 GB, 2 x 8 GB) Corsair Vengeance LPX DDR4 More memory and a change from laptop to desktop RAM.
GPU Integrated Intel UHD Graphics 630 NVIDIA GTX 1080 Ti A dedicated GPU supports running local models.
PSU 135 W adapter (approx.) Thermaltake Smart 750W 80+ Bronze Provides power for the new build; a more efficient unit may be needed in a future upgrade.
Storage Old New Description
Boot drive 1 TB 2.5-inch Toshiba HDD 500 GB Samsung 840 EVO SSD Container root disks and databases, such as Immich PostgreSQL, will use the SSD. Keeps the UI and app response times fast.
Dedicated game servers 500 GB NVMe 500 GB NVMe (unchanged) Used by Pterodactyl Panel for Minecraft, Source, and other game server nodes.
Immich Drobo DAS, 3 x 2 TB (1 TB used) Proxmox ZFS pool, RAIDZ1 (4 x 2 TB HDD) Replaces the unsupported Drobo DAS and provides more control over bulk photo and video storage.
OpenMediaVault (NAS) Drobo DAS, 3 x 2 TB (1 TB used) Proxmox ZFS pool, RAIDZ1 (4 x 2 TB HDD) Replaces the Drobo with native Proxmox ZFS and a lightweight LXC serving SMB/NFS over bind mounts.
Local LLM N/A Proxmox ZFS pool, RAIDZ1 (4 x 2 TB HDD) Storage for local LLM and agent experiments.
General Docker data Old boot drive Proxmox ZFS pool, RAIDZ1 (4 x 2 TB HDD) Stores Docker applications managed with Dockge.

Installing Proxmox Virtual Environment (PVE)

Section titled “Installing Proxmox Virtual Environment (PVE)”
  1. Use Rufus to write the PVE ISO to a USB drive.
  2. Plug the USB drive into the computer and boot from it.
  3. Follow the on-screen prompts and configure the network:
    1. If entering an IP address, use an address in an existing subnet. Set the gateway to your router and configure a DNS server, such as Cloudflare’s 1.1.1.1.
    2. Alternatively, leave the network fields blank to use the suggested settings. After installation, the assigned IP address appears near the top of the console.
  4. Once installation is complete, open a browser on another system and enter the configured IP address followed by :8006 (for example, https://192.168.15.XXX:8006).
  5. Continue with the PVE configuration.

Now configure the Proxmox host.

Run:

Terminal window
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.sh)"

This community helper script automates tasks such as removing the subscription notice. Review community scripts before running them because they execute with elevated privileges.

local storages

Warning: These steps remove the local-lvm logical volume. Confirm that no VMs or LXCs depend on it and that any needed data is backed up before proceeding.

  1. Select the PVE node and open the Shell tab.

  2. Remove the local-lvm storage entry:

    Terminal window
    pvesm remove local-lvm
  3. Remove its logical volume:

    Terminal window
    lvremove /dev/pve/data
  4. Extend the local volume and filesystem:

    Terminal window
    lvextend -l +100%FREE /dev/pve/root
    resize2fs /dev/pve/root
  5. In the left sidebar, select Datacenter > Storage.

  6. Edit the local storage and select the desired content types.

Before we install ethtool, make sure you have wake-on-lan enabled your motherboard’s BIOS as well. It may be under Advanced > APM Configuration. Set Power On by PCI-E to Enabled.

  1. Install ethtool
    Terminal window
    apt update && apt install ethtool -y
  2. Identify your physical network interface
    Terminal window
    ip a
    In my case, it is nic0
  3. Enable WoL temporarily
    Terminal window
    ethtool -s <interface_name> wol g

To make it persistent across reboots:

  1. Create a service file
    Terminal window
    nano /etc/systemd/system/wol.service
  2. Paste the following configuration:
    Terminal window
    [Unit]
    Description=Enable Wake-on-LAN
    After=network.target
    [Service]
    Type=oneshot
    ExecStart=/usr/sbin/ethtool -s <interface_name> wol g
    [Install]
    WantedBy=multi-user.target
  3. Save the file (Ctrl+O, Enter, Ctrl+X) and enable the service
    Terminal window
    systemctl daemon-reload
    systemctl enable wol.service
    systemctl start wol.service

This configuration combines four 2 TB HDDs into a RAIDZ1 pool. RAIDZ1 may be suitable for these drives because they are used for bulk storage, while the 500 GB SSD is used for application root disks. Consider your capacity, performance, and redundancy requirements before choosing a RAID level. [^1] [^2]

  1. Select the PVE node, open Disks, and choose ZFS.
  2. Click Create: ZFS and enter a pool name.
  3. Set RAID Level to RAIDZ.
  4. Set Compression to on.
  5. Set ashift to 12.
  6. Select the four 2 TB HDDs, or select the drives for your setup.
  7. Click Create.

Create datasets in the ZFS pool for Immich, the NAS, models, Docker data, and other uses:

  • zfs create - the core command used to create a new dataset
  • (Optional) -o recordsize=1M - the o flag sets the ZFS property specifically for that dataset and recordsize=1M overrides the default size from 128KB to 1M (1 Megabyte)
    • A 10 GB file uses approximately 10,000 1 MB records instead of 80,000 128 KB records.
    • This can reduce metadata overhead for large files.
    • Use this setting only for datasets whose workloads benefit from a larger record size.
Terminal window
# Create the zfs dataset
zfs create -o recordsize=1M pool_name/dataset_name
# Verify the datasets and their properties.
zfs list -o name,used,avail,refer,recordsize,compression

Now we can set the maximum Adaptive Replacement Cache (ARC) size (so the RAM doesn’t get consumed so heavily).

  1. On the PVE shell, create a configuration file for the ZFS module parameters: nano /etc/modprobe.d/zfs.conf
  2. Set the maximum (and optionally, minimum) ARC size
Terminal window
# Set maximum ARC size to 4GB (adjust in bytes as needed)
options zfs zfs_arc_max=4294967296
# Optional: Set minimum ARC size to 2GB (2147483648 bytes)
# options zfs zfs_arc_min=2147483648
  1. Save and exit, then apply the new module parameters to the boot image: update-initramfs -u -k all

Make sure the command completes without errors. You will need to reboot the Proxmox host for the changes to take effect.

Connecting PVE to the Proxmox Backup Server (PBS)

Section titled “Connecting PVE to the Proxmox Backup Server (PBS)”

Since I already have an existing backup server:

On PBS:

  1. Go to the Dashboard
  2. Look for the Show Fingerprint button and click it
  3. Copy the fingerprint

On PVE:

  1. Select Datacenter –> Storage
  2. Click Add –> Proxmox Backup Server
  3. Fill out the fields as follows:
Field What to enter
ID The name of storage location, similar to local or the ZFS pool name
Server IP Address or Hostname of the PBS
Username root@pam or whatever the dedicated user is
Password Password for the PBS user account
Datastore The exact name of the datastore that is set on PBS
Fingerprint The long string characters you copied earlier

Since PBS is connected to PVE:

  1. Open the PBS storage (in this example, Backup > Backups).
  2. Select the VM/LXC to restore and click Restore.
  3. Wait for the restore to finish, then start the VM/LXC.

If the LXC receives a new IP address:

  1. In the LXC console, edit /etc/pterodactyl/config.yml and update the address under remote.

  2. Log in to the Pterodactyl Panel.

  3. Go to Nodes > Settings and update the Fully Qualified Domain Name.

  4. Go to Nodes > Allocation and update the allocations:

    Field What to enter
    IP Address The new IP address
    IP Alias A name to help organize or track allocated IPs
    Ports The ports used by the game server
  5. Go to Servers > Server Name > Build Configuration and reassign the new IP address.

  6. Under Allocation Management, add the new allocation and click Update Build Configuration.

  7. Select the new allocation(s) under Game Port.

  8. Remove the old port(s) and click Update Build Configuration again.

  9. Repeat these steps for each game server.

  10. If you use playit.gg tunnels, update the IP addresses there as well.

If the IP address has not changed, no updates are needed.

The original root disk was on the Drobo DAS. Restore the LXC to local storage first, then copy the media to the ZFS dataset.

  1. Go to PBS Storage > Backups.

  2. Select the Immich LXC backup and click Restore.

  3. Choose a target LXC ID and set Storage to local storage.

  4. Complete the restore, but do not start the container yet.

  5. In the PVE node’s Shell, mount the restored LXC filesystem (replace 101 with its ID):

    Terminal window
    pct mount 101
  6. Verify the source directory, copy the files to the ZFS dataset, and set ownership. Adjust the paths and UID:GID for your setup:

    Terminal window
    ls -la /var/lib/lxc/101/rootfs/opt/immich/upload
    rsync -avP /var/lib/lxc/101/rootfs/opt/immich/upload/ /poolname/immich/
    chown -R 100000:100000 /poolname/immich

    Verify the copied data before removing any source files. If you choose to remove the original files, take care to target only the confirmed source directory.

    Terminal window
    rm -rf /var/lib/lxc/101/rootfs/opt/immich/upload/*
  7. Unmount the LXC:

    Terminal window
    pct unmount 101
  8. Edit the restored LXC’s configuration (replace xxx with its ID):

    Terminal window
    nano /etc/pve/lxc/xxx.conf
  9. Add a mount point for the path inside the LXC where Immich stores media:

    mp0: /pool_name/dataset_name,mp=/usr/src/app/upload

    If mp0 is already in use, use mp1.

  10. Adjust the root filesystem size as needed. This LXC was previously on a 2 TB partition, so the configuration may show 2000G.

  11. Save the file and verify the configuration with pct config <LXC_ID>. If there are no errors, start the container.

If the media is available, run a backup and restore to local storage to reflect the new virtual disk size.

This migration replaces OpenMediaVault with a Samba (SMB) share.

  1. Create an LXC with your preferred supported OS (Debian 13 in this example).

  2. In the PVE shell, set ownership for an unprivileged container and add a bind mount:

    Terminal window
    chown -R UID:GID /poolname/datasetname
    echo "mp0: /poolname/datasetname,mp=/mnt/shares" >> /etc/pve/lxc/103.conf
  3. Start the LXC, install Samba, and verify the service:

    Terminal window
    apt update
    apt install -y samba
    systemctl status smbd
  4. Create a NAS/Samba user, set its password, and grant it ownership of the share:

    Terminal window
    useradd -s /usr/sbin/nologin nasuser
    smbpasswd -a nasuser
    chown -R nasuser:nasuser /mnt/shares
  5. Edit /etc/samba/smb.conf and add the following share definition:

    [shares]
    path = /mnt/shares
    browseable = yes
    read only = no
    valid users = nasuser
    create mask = 0660
    directory mask = 0770
    force user = nasuser
  6. Restart the Samba daemon inside the LXC:

    Terminal window
    systemctl restart smbd

Connect to the SMB share using the nasuser account to verify the setup.

The only service on the old setup was a Discord bot, so this guide creates a new Dockge LXC using the Proxmox VE Helper script.

  1. Create an LXC with an OS supported by Dockge (Debian 13 in this example).

  2. In the PVE shell, set ownership for an unprivileged container and add a bind mount for the stacks directory:

    Terminal window
    chown -R UID:GID /poolname/datasetname
    echo "mp0: /poolname/datasetname,mp=/opt/stacks" >> /etc/pve/lxc/102.conf

    Save and exit. /opt/stacks stores the stacks created in Dockge; /opt/dockge is the Dockge application directory. This bind mount stores stack data on the ZFS pool.

  3. Start the LXC and update the packages. Install curl and gpg if they are not already installed:

    Terminal window
    apt update && apt upgrade
    apt install -y curl gpg
  4. Open the Dockge community helper script, copy its command, and follow the prompts.

The migration is complete.