Michael's Daemonic Doodles

...blogging bits of BSD

Shrinking a ZFS root pool (HDD to SSD migration)

I recently started migrating servers with relatively low storage space requirements to SSDs. In many cases the HDDs that get replaced are much bigger than required and unfortunately the zpools have been configured to use all the available space. Since shrinking a pool is not supported by ZFS directly, the procedure is a little more elaborate.