Page 1 of 1

Why is it still 3 TB?

PostPosted: Thu Jun 20, 2019 7:16 am
by mauricev
My mirror started out as 3 TB with two 3TB drives in a mirror. I replaced one disk with a 4 TB disk. Then I decided to replace the other, so I detached the remaining 3TB disk and rebooted, but I noticed the pool is still 3TB. Why is that? Shouldn't the pool have noticed the sole underlying disk is 4TB and grown the pool in size?

Re: Why is it still 3 TB?

PostPosted: Thu Jun 20, 2019 7:45 am
by mauricev
I noticed autoexpand was turned off, but turning it on, deleting the zpool.cache and rebooting hasn't fixed it.

Re: Why is it still 3 TB?

PostPosted: Thu Jun 20, 2019 8:05 am
by mauricev
So I had actually attached a second 4 TB disk to this and pool and it was resilvering that. Somehow that apparently prevented the Mac from seeing the full size. Once I detached it, deleted the cache, rebooted and let the phantom resilver continue (the pool pretends to continue resilvering to the detached disk), the Mac now sees the full size.

Re: Why is it still 3 TB?

PostPosted: Thu Jun 20, 2019 3:31 pm
by lundman
Auto-expand doesn't kick in when you remove a smaller device - and in your case autoexpand was off anyway. You can
actually tell it to expand manually, using "zpool online -e pool device" which should have worked with your 1 4TB disk.

But with autoexpand on, and replacing the final device in your mirror, ZFS kicked in an expanded it for you.

BTW, the zpool.cache only stores the (names of) pools that it should import on boot. Nothing else, so no real
reason to remove it. In addition to that, I recently noticed the OSX autoimport script run by launchctl completely
ignores zpool.cache, and just runs "zpool import -a". But perhaps one day we will fix that up.