Shrinking boot pool?

In the following feature request, someone asked for an easy method to shrink the boot-pool device:

Thinking about it, I wonder if the feature@device_removal could be used for that purpose. Basically:

  1. Save the configuration off TrueNAS server
  2. Verify you have console access to TrueNAS server
  3. Verify that the existing usage of boot-pool is small enough to fit on the new device
  4. Add the smaller device as a Stripe to the boot-pool
  5. Enable the feature@device_removal on the boot-pool
  6. Remove the larger device from the boot-pool
  7. Wait until data migrated, then shutdown TrueNAS server
  8. Remove prior boot-pool device
  9. Power up and see if it worked

Of course, the Grub might need to be installed on the new boot-pool device. And who knows if Grub’s understanding of ZFS includes feature@device_removal.

Next, I don’t know if it is a requirement that the destination storage needs to be as large or larger of the source for device removal. I would not think so, as ZFS creates a virtual device in the destination storage. But, it might make an interesting test.

Last, of course this is not the straight forward supported method of backup configuration, re-install to smaller boot device and restore configuration. Further, Enterprise users would almost certainly not use such a method.


So what do you think?
Crazy?
Something interesting to test?
Not something needed, nor something new users should attempt?

1 Like

An interesting suggestion, but as I now have a working and much configured system with lots of data I’m reluctant to experiment. The save config, install smaller device, restore config is easy to do and understand if time consuming. As someone who knows nothing about ZFS I mistakenly assumed downsize cloning would be easy!

As far as I know, the sole requirement is that there’s enough space in the remaining vdevs to accept all data from the removed vdev.
But the shenanigans with the bootloader already make this process more complicated than backup configuration-install-load configuration.

1 Like

The existing process, while it doesn’t seem like an intuitive process for someone who’s never seen it before, is already very easy. Personally don’t think there’s any major benefit to changing it.

Maybe I just can’t find it, but it would be good for there to be some process in the documentation hub that users can follow for boot device replacement.

1 Like

That’s not a bad idea

1 Like

The slight advantages are these:

  1. Theoretically no down time needed
  2. If you have hot swap boot-pool device(s), change out can be done live.
  3. This also supports Mirrored boot-pool, so if you have a system that needs high availability, you can Stripe in a smaller 2 disk Mirror.

Oh, and there is one disadvantage:

  • The pseudo virtual device in the boot-pool takes up RAM for its indirect table. And this will continue until all the data is deleted out of the pseudo virtual device. (Updates should be written to real virtual device members.)

This was more of a thought exercise.