TrueNAS Scale: online expand disks

Say you’re running a TrueNAS Scale VM for some reason instead of running it on baremetal and you have your zpool on a virtual disk that’s getting full. You can either add another virtual disk and just add it to your pool, data getting striped across all vdevs – but that gets messy if you need to expand in increments as you end up with a bunch of vdevs you can’t remove from your pool ever again (as of 2025 at least, might be possible at some point in the future). So you just increase the size of your virtual disk and be done with it, right? Sadly, no – TrueNAS Scale autoexpand doesn’t work quite like that and needs a little bit of help from the CLI. Here’s how you can still get it done without having to reboot or take your system offline:

  1. Look at your pool to find out what disks are being used: zpool list -v
  2. Look in /dev/disk/by-partuuid to check what disk the partition used is on, for example if the symlink points to vdb1 you’ll want to adjust vdb in the next step
  3. parted /dev/vdb resizepart 1 100% you’ll want to run that twice: First time it asks you to fix the GPT to use all the space that’s now available, second time it actually adjusts the partition size
  4. If your pool has autoexpand=on already set, you’ll probably don’t have to do anything else and the pool is already expanded to the new size of the virtual disk. Otherwise you might have to manually online the device with the expand flag set: zpool online -e yourzpoolname yourpartuuid
  5. Check your pool if everything worked as expected with another zpool list

That should be it, your pool increased in size without any interruption.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.