How to shrink mostly unused portion of boot-pool?

Cheese_Echidna

Dabbler
Joined
Jan 16, 2022
Messages
13
Brief context:
When I first made it, my system was a quickly cobbled together mess of whatever parts I had lying around. Since then I have become increasingly engaged in the wonderful TrueNAS community and have realised the whole host of cool things that a solid NAS/Server can provide.

The system is made up of two drives:
boot drive - 512GB HDD
storage drive - 1TB HDD

The problem is that both drives are getting really old and the threat of drive failure (has happened to me before) looms ever nearer, so I would like to get them out of my system as soon as possible.

To solve this I went out and bought two new drives for the system.
New boot drive - 256GB Samsung SSD
New storage drive - 4TB Ironwolf NAS HDD

The problem is that in trying to add my new boot drive as a mirror of the old one (I know I could export the system config and then reinstall but I would rather not), I have run into the issue that the new drive is too small. To fix this I would like to resize the partition on the drive as zpool list boot-pool reports that more than 400GB of that 448GB are "Free". Is there any way I can do this?

On another note is there a better way to replace the old storage drive than to stripe the pool across both drives and then remove the old drive from the pool? What's important to me is that the file paths don't change so I don't need to go through and reconfigure everything.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Save config, reinstall, import config. There is no way to shrink a ZFS vdev.

For the storage drive you can add the new drive as a mirror (not stripe!), then after resilvering detach the old drive, then expand the partition and the vdev on the new drive to use the entire capacity.
 
Top