Growing a ZFS pool — Update

In an earlier post I described how you can grow an existing ZFS pool by replacing all the disks with bigger ones.

That article was written several years ago, for FreeBSD 7.2. Currently we’re at FreeBSD 9.2, and the ZFS implementation has evolved somewhat, making that article no longer accurate.

Most importantly, this concerns the part at the end, regarding the need to export and import the pool for it to recognize the added space. This is no longer valid.

Instead, you should use the ‘zpool online ‑e’ command:

Remember, we have replaced all the drives with bigger ones using the ‘zpool replace’ command, allowing the pool to resilver after each one. Now continue as follows:

[root@honeycomb /honeycomb/]# zfs list
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
honeycomb                            908G  23.3G  5.26M  /honeycomb

[root@honeycomb /honeycomb/]# zpool online -e honeycomb ad6
[root@honeycomb /honeycomb/]# zpool online -e honeycomb ad8
[root@honeycomb /honeycomb/]# zpool online -e honeycomb ad10
[root@honeycomb /honeycomb/]# zfs list
NAME                                  USED  AVAIL  REFER  MOUNTPOINT
honeycomb                            908G  1.84T  5.26M  /honeycomb

Usually, ZFS will recognize all bigger drives after the first ‘zpool online ‑e’ call, but for completeness, it’s probably best to run it on all array drives.

No Comments

Leave a Reply

Your email is never shared.Required fields are marked *