Upgrading Disks in Proxmox VM Running TrueNAS: A Comprehensive Guide

TrueNAS Proxmox VM

Start Your Upgrade Journey with Confidence

Ready to expand your TrueNAS storage capacity on Proxmox VM? Whether you’re tackling this for the first time or looking to refine your approach, our guide is designed to navigate you through the process with ease. From planning to execution, every step is detailed to ensure a smooth upgrade, minimizing downtime and maximizing system performance. Dive into our comprehensive guide below and begin your upgrade with confidence.

Table of Contents

Introduction

Upgrading the storage capacity of your Proxmox VM running TrueNAS can be daunting, especially when replacing all disks with larger ones. This blog post provides a detailed step-by-step guide to help you navigate this process smoothly. Whether you’re a seasoned system administrator or a tech enthusiast, this guide will ensure you have all the necessary information to upgrade your disks without hassle.

In this blog, I’ll be referring to two of my TrueNAS VMs running on Proxmox VE, both utilizing an Asrock motherboard. These VMs are named Makewin and Asrock. There will be specific examples related to these systems later in this post.

For those interested in building their own NAS server, you might find my other blog post, Building a NAS Server with Intel Z370, quite helpful. It provides a comprehensive guide on setting up a NAS server from scratch using Intel Z370.

In this blog, I’ll be referring to two of my TrueNAS VMs running on Proxmox VE, both utilizing an Asrock motherboard. These VMs are named Makewin and Asrock. There will be specific examples related to these systems later in this post.

Prerequisites

Before you start the disk replacement process, make sure you have the following:

  1. Backup Data: Always ensure you have a complete backup of your data.
  2. Check Disk Health: Verify the health of your current disks and the new disks you plan to use.
  3. Identify Disks: Note down the device IDs of the disks you intend to replace and their corresponding virtual machine assignments.

Step-by-Step Replacement Process

1. Replace Each Disk One by One
  • Identify the Disk to Replace: Use lshw and lsblk commands to list current disks.
    apt-get update
    apt install lshw
    lshw -class disk -class storage
    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'
  • Remove the Disk: Physically remove the disk you wish to replace from the system.
  • Insert the New Disk: Insert the new larger disk into the same slot.
2. Rescan for New Disk
  • Rescan the SCSI bus to detect the new disk.
    echo "- - -" > /sys/class/scsi_host/host#/scan
    Replace host# with the appropriate SCSI host number.
3. Add the New Disk to Proxmox
  • Identify the new disk and its device ID using the same lsblk and lshw commands.
  • Attach the new disk to the VM.
    qm set 100 -scsiX /dev/disk/by-id/NEW_DISK_ID
    Replace NEW_DISK_ID with the actual device ID of the new disk and adjust -scsiX according to your VM configuration.
4. Sync Data
  • Use zfs or rsync commands to sync data from the old disk to the new disk if necessary. For ZFS:
    zpool replace pool_name old_disk new_disk
  • Monitor the sync process:
    zpool status pool_name
5. Repeat for All Disks
  • Repeat steps 1-4 for each disk you need to replace.

Post-Replacement Steps

1. Expand ZFS Pool
  • Once all disks are replaced and synced, you can expand your ZFS pool to use the additional space.
    zpool online -e pool_name new_disk
2. Verify Setup
  • Verify the configuration and ensure all disks are properly recognized and functioning.
    zpool status lshw -class disk -class storage
3. Utilize Extra Space
  • Create new datasets or extend existing ones to use the extra space.

Example Replacement Commands

For MAKEWIN:

qm set 100 -scsi1 /dev/disk/by-id/ata-WDC_NEW_DISK_1
qm set 100 -scsi2 /dev/disk/by-id/ata-WDC_NEW_DISK_2
qm set 100 -scsi3 /dev/disk/by-id/ata-WDC_NEW_DISK_3
qm set 100 -scsi4 /dev/disk/by-id/ata-WDC_NEW_DISK_4
qm set 100 -scsi5 /dev/disk/by-id/ata-WDC_NEW_DISK_5

 

For ASROCK:

qm set 100 -scsi1 /dev/disk/by-id/ata-HGST_NEW_DISK_1
qm set 100 -scsi2 /dev/disk/by-id/ata-HGST_NEW_DISK_2
qm set 100 -scsi3 /dev/disk/by-id/ata-HGST_NEW_DISK_3
qm set 100 -scsi4 /dev/disk/by-id/ata-HGST_NEW_DISK_4

Final Considerations

  • Ensure Proxmox and TrueNAS are Up-to-Date: Verify both are up-to-date to benefit from recent bug fixes, performance improvements, and new features.
  • Backup Configurations: Besides data, back up Proxmox VM configurations and TrueNAS settings.
  • Monitor Disk Health: Use SMART monitoring to check the health of both old and new disks.
smartctl -a /dev/sdX

System Logs: Monitor system logs during the disk replacement process for any errors or warnings.

dmesg | tail journalctl -xe

Conclusion

By following these detailed steps, you can successfully replace your disks with larger ones, ensuring minimal downtime and maintaining data integrity. Remember to always back up your data and configurations before starting the process. With careful monitoring and verification, you can seamlessly upgrade your storage capacity and continue to enjoy the robust performance of your Proxmox VM running TrueNAS.

Recommended Products

1. USB 2.5G Ethernet Adapter


UGREEN USB to Ethernet Adapter 2.5Gb, Ethernet to USB Adapter, Aluminum, USB 3.0 to RJ45 Computer Network Internet LAN Ethernet Dongle for laptop, Compatible for MacBook Air/Pro, XPS, Windows, macOS

Enhance your network speed with this USB 2.5G Ethernet Adapter. Ideal for users looking to upgrade from 1Gbit to 2.5Gbit without changing the entire network infrastructure.

2. USB-C 2.5G Ethernet Adapter


UGREEN USB C to Ethernet Adapter 2.5G, Ethernet Adapter for Laptop, Aluminum, Type C (Thunderbolt 4/3) to Rj45 Network Internet LAN Adapter, Compatible for NAS, MacBook Air/Pro, XPS, iPhone 15 Pro/Max

Enhance your network speed with this USB 2.5G Ethernet Adapter. Ideal for users looking to upgrade from 1Gbit to 2.5Gbit without changing the entire network infrastructure.

3. PCIe 10G Network Card


10G PCI-E Network Card with 10Gbps Dual RJ45 Ports, Intel X540-T2 Controller, VIMIN 10Gb Ethernet Adapter Card Compatible with PCI Express X8, X16, Support Windows/Windows Server/Linux/VMware

For those requiring higher network speeds, the PCIe 10G Network Card is perfect. It provides reliable and fast data transfer rates, suitable for intensive network tasks.

4. Network Switch with 10G Uplinks


8 Port 2.5G PoE Switch Unmanaged with 8 x 2.5Gb Base-T PoE+@120W + 10G SFP Uplink, 2.5Gbe IEEE802.3af/at Power Over Ethernet Switch, Support WiFi6 AP, NAS, 4K PoE Camera NVR.

This network switch supports multiple ports with 10G uplinks, allowing for a versatile and scalable network setup. Ideal for environments with mixed network speeds.

5. High-Speed Ethernet Cable (Cat 6a)


Rapink Patch Cables Cat6a 1ft (10 Pack) Slim, Cat6a Ethernet Patch Cable 10G Support, Snagless Cat 6 Patch Cable for Patch Panel to Switch, Flexible Cat 6a Ethernet Cable with Gold Plated

Ensure your network operates at optimal speeds with Cat 6a Ethernet Cables. These cables support higher bandwidths and faster data transfer rates.

6. Network Performance Monitoring Tool


Klein Tools VDV526-200 Cable Tester, LAN Scout Jr. 2 Ethernet Cable Tester for CAT 5e, CAT 6/6A Cables with RJ45 Connections

Monitor your network performance and troubleshoot issues effectively with this Network Performance Monitoring Tool. Essential for maintaining optimal network health.

Why Support Matters

Creating valuable free content is a significant part of our mission, but it requires resources to maintain and grow. While we are dedicated to providing these resources without charging, they do incur costs. Your support is crucial in helping us continue offering this content. Here’s how you can help:
  • Use Affiliate Links: As an Amazon Associate, I earn from qualifying purchases. By using our affiliate links for your purchases, you help us earn small commissions that contribute to covering our operational costs, at no extra cost to you.
  • Engage and Share: Engage with our content by liking, commenting, and sharing it with others. This increases our reach and attracts more visitors who might support us financially, allowing us to continue providing valuable content.
  • Provide Direct Support: Consider donating or subscribing to support the content you value. Even small contributions can make a significant difference and help us sustain our efforts.
Your engagement and support are vital to keeping this content available and accessible. Thank you for being part of our community and for helping us continue to grow and improve.

Stay Connected with Us

For exclusive updates, training tips, fitness advice, and more, follow us across all our platforms through one easy link.

👉 Stay Connected for Exclusive Martial Arts & Fitness Tips

Join our community and never miss an update!

Return to the home section.