zpool add -f doesn't work
895981Oct 24 2011 — edited Oct 25 2011I've been working on some ZFS management interfaces, and using a test pool to play with the things I am working on. I had a pool with several 1GB files as drives. I wanted to add another batch of drives to that pool, and so I just copied one of the existing drives to another batch of drives to get more 1GB files to use. When I did "zpool add" to add the new batch of drives, I got an error because the source disk was "marked" as part of the existing pool:
root@spinner:/rpool/test# zpool add testpool raidz3 `pwd`/disk11 `pwd`/disk12 `pwd`/disk13 `pwd`/disk14 `pwd`/disk15 `pwd`/disk16 `pwd`/disk17 spare `pwd`/disk18 `pwd`/disk19 `pwd`/disk20
invalid vdev specification
use '-f' to override the following errors:
/rpool/test/disk11 is reserved as a hot spare for pool testpool
so, I added the -f and still get a failure, but with a different message.
root@spinner:/rpool/test# zpool add -f testpool raidz3 `pwd`/disk11 `pwd`/disk12 `pwd`/disk13 `pwd`/disk14 `pwd`/disk15 `pwd`/disk16 `pwd`/disk17 spare `pwd`/disk18 `pwd`/disk19 `pwd`/disk20
invalid vdev specification
the following errors must be manually repaired:
/rpool/test/disk11 is reserved as a hot spare for pool testpool
Shouldn't -f really mean "force". Is it really necessary for me to "clear the content" of the drives to get add to work?