Zpool metadata device

Wondering if anyone has experience with or can advice me on the best way to accomplish the following:

  • I have a zpool with a metedata vdev that consists of a mirror of 2 500GB SSDs.

  • The metadata vdev is only about 60GB used.

  • One of the drives in the mirror has failed.

  • I’m thinking of replacing both drives with a pair of new 120GB SSDs.

I’m guessing I couldn’t just replace the drives outright as they’d be smaller. Is it possible to remove the vdev and recreate it? or would it require the whole pool to be rebuilt?

You might get away with adding a bigger device and then replace your other metadata drive to a higher capacity.

In any case you should backup your data before doing this.

I was hoping to go smaller rather than bigger, since the actual used size is so small. The difference in price between the SSDs is minimal so I’m not too bothered if I have to go with a direct replacement for the failed one, I was just hoping to be able to downsize and reclaim the still ok 500GB drive.

3-2-1 All good :slight_smile:

If you corrupt the metadat VDEV you will lose all data in the pool. Be sure you have a good backup first. I would put in the same size drive given the lack of a real cost difference. If you really want to go smaller drives you may have to restore all of the data from a backup.

The larger the drive, the longer the life when you start looking at TBW. As a metadata/cache drive, having bigger to get a higher TBW might be a good idea. And 500GB drives are pretty cheap these days. But make certain it is equal to or more than the current drives. Just because it says 500GB does not mean they are the same size, been there, done that, ended up starting from scratch (system drives) and restoring from backup config.

Okay so update: I ended up just buying a new identical drive to replace it, however I’ve encountered a new issue that I’m not sure how to fix:

  • The existing drives start at sector 40.
  • The new drive I’m not able to create a partition any earlier than sector 2048.
  • Both are gpt partitions.

Not entirely sure why they’re different, but it’s preventing me from replacing the failed drive. The exact error I get in truenas is:

Could not change partition 1’s type code to BF01

I think I’ve done it.

Using gdisk expert settings I was able to force the first sector and create a partition indentical to that on the existing drive. After a reboot I was then able to run zpool attach. The disk is currently resilvering, will report back with the results