I have a simple ZFS setup that I’ve been running for a few years now. When I originally set it up, I created a number of partitions and created a zpool from a partition on each of my two drives, and used the others for booting etc..
Now however I have a separate drive for booting and everything else, so I just want to use the entire drives for my zpool. I recently replaced a drive, so I’m already doing that on one drive:
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada1p4 ONLINE 0 0 0
What I want to do now is to replace ada1p4
with ada1
, the question is, how do I do that? Is it as simple as zpool replace tank ada1p4 ada1
, or is that a bad idea?
-
BACKUP anything you care about… to something off this server.
-
Do the replacement
zpool set autoexpand=on tank zpool offline tank ada1p4 zpool replace tank ada1p4 ada1
-
Wait… and lots of it. Check status with
zpool status tank
-
Turn off the autoexpand,
zpool set autoexpand=off tank
. It’s a best practices thing mostly.
Check more discussion of this question.