I have a zpool called storage that contains a five device raidz1 array.
Today I went and bought another 3TB device and put it in my enclosure. However, instead of creating a new pool and adding that device to it, I made a mistake and added it to my existing storage pool.
Now I have a top-level device that I want to remove called sdg
(that's the new drive). Every time I try to remove it I get:
cannot remove sdg: only inactive hot spares, cache, top-level, or log devices can be removed.
So how do I remove this device now? If this device fails, my entire pool will be unavailable. I'm thinking I should go buy another drive and at least it will be mirrored, but I just can't believe there isn't a proper way to do this.
This is my status dump:
pool: storage
state: ONLINE
scan: scrub canceled on Wed Jul 23 17:26:08 2014
config:
NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ata-ST3000DM001-1CH166_Z1F1PYM6 ONLINE 0 0 0
ata-ST3000DM001-1CH166_W1F24CSC ONLINE 0 0 0
ata-ST3000DM001-1CH166_W1F2372R ONLINE 0 0 0
ata-ST3000DM001-1CH166_W1F24BTK ONLINE 0 0 0
ata-ST3000DM001-1CH166_Z1F2KKLW ONLINE 0 0 0
sdg ONLINE 0 0 0
errors: No known data errors
Best Answer
Unfortunately, removing a vdev (which this drive is) from a pool is not supported by ZFS currently (but there is work ongoing to support it). The work around would be to dump your data out of the pool and recreate it, then put the data back.