ZFS zpool error: cannot create 'xxx': one or more devices is currently unavailable

Hi,

for years I use encrypted external hdds for backups with geli and a zfs pool inside. Recently one of the drives died and I replaced it. But following my notes always gives me an error message. Procedure:
  1. erase everything from the drive
  2. create a gpt partitioning scheme
  3. create a gpt labelled partition (type freebsd-zfs)
  4. encrypt that partition via geli init /dev/gpt/labelname
  5. attach the encrypted partition via geli attach
  6. create a zpool via zpool create xxx /dev/gpt/labelname.eli
But instead of creating the pool I get: cannot create 'xxx': one or more devices is currently unavailable

I've used this procedure countless times without issue and haven't found anything leading me to a solution so far. The only idea left is that I haven't done this on FreeBSD 15 yet because there was no need to since I upgraded.

Any ideas?

Kind regards,
 
You don't create a pool if you only want to replace a broken drive from an existing pool; zpool-replace(8).

Or was this a single drive pool? That's now dead? Make sure to remove that pool before creating a new one with the same name.
 
You don't create a pool if you only want to replace a broken drive from an existing pool; zpool-replace(8).

Or was this a single drive pool? That's now dead? Make sure to remove that pool before creating a new one with the same name.
It was a single drive pool. However I receive the exact same error if I try to create the pool with another name.
 
Was the /dev/gpt/labelname.eli the same? That might be linked to a, now defunct, pool.
No, I created everything with new names and labels except trying to create the pool with the old name first. Been bitten too often by re-using old names in the past. ;-)
 
Status update

I noticed the usual warnings of geli in the log regarding "Failed to authenticate ... bytes of data at offset ..." but noticed that some of them had pretty small offsets. Therefore I started to fill the geli device with random data but not fully (would have taken days). Afterwards the zpool create command ran just fine.

Thanks!
 
I noticed the usual warnings of geli in the log regarding "Failed to authenticate ... bytes of data at offset ..." but noticed that some of them had pretty small offsets. Therefore I started to fill the geli device with random data but not fully (would have taken days). Afterwards the zpool create command ran just fine.

Hmmm, this is no good. Some random binary gunk should not block ZFS from initializing. Much less with a useless error message.
 
Back
Top