Discussion:
shrink zfs root zpool
(too old to reply)
Julien Cigar
2016-08-03 20:21:32 UTC
Permalink
Hello,

I have a machine with a simple zfs root mirror pool (2 disks) that I'd
like to shrink and I wondered what would be the best approach to do
this?

I was thinking of booting on a usb stick, remove one physical disk from
the mirror, gpart resize the partition, create a new zpool, and finally
a pair of zfs snapshot / send from the old pool to the new one .. Would
that work? Any caveats?

Thanks!

Julien
--
Julien Cigar
Belgian Biodiversity Platform (http://www.biodiversity.be)
PGP fingerprint: EEF9 F697 4B68 D275 7B11 6A25 B2BB 3710 A204 23C0
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
Ultima
2016-08-04 04:16:19 UTC
Permalink
Assuming you have done this before and understand everything well enough,
yes this would work and how I'v have done it in the past. Once you get the
process down, the usb drive will just be a backup and only a reboot would
be required. Also, a zpool labelclear maybe required on the disk you're
resizing.

Of course I'm sure you already understand this, there is also the period of
possible dataloss due to no redundancy. Because of this, I would also
suggest making backup, and also just in case a mistake is made to avoid any
possible chance of disaster.

Best of luck,
Ultima

Loading...