I have a zpool in use with a single mirror vdev. I needed more space, so I hooked up some more disks and added a second mirror vdev. Easy enough, now I have a zpool with mirror-0 and mirror-1 vdevs.
But I got something wrong in the zpool add command and did zpool remove pool mirror-1 so I could re-add the new vdev. Now, instead of mirror-0 and mirror-1, I have mirror-0 and mirror-2. Tried it again, and now I have mirror-0 and mirror-3.
This is annoying, because I want the vdev id numbers to be sequential so I can keep track of them.
I can see with zdb that there are empty notes being stored in the pool:
vdev_tree: children[0]: type: 'mirror' id: 0 ... children[1]: type: 'hole' id: 1 ... children[2]: type: 'indirect' id: 2 ... children[3]: type: 'mirror' id: 3 ... How can I make the pool completely forget about the removed vdevs and add mirror-1 again?