# Renaming ZFS pool via zpool import "mypool" "newpoolname"



## mrjayviper (May 6, 2014)

If I import my current pool with the newpool parameter, does that mean my pool will permanently renamed to "newpoolname"? E.g. if you take notice of the last command, I imported the pool again using the new name instead of the old one.

```
# zpool export oldpoolname
# zpool import oldpoolname newpoolname
# zpool export newpoolname
# zpool import newpoolname
```

I guess _my intention is to rename my pool_ and since zpool doesn't have a rename option, I'm hoping this is the way to do it.

Thanks a lot


----------



## Sebulon (May 13, 2014)

*Re: Renaming ZFS pool via zpool import "mypool" "newpoolname*

Hi @mrjayviper!

Yes, that is the way to go when renaming a pool.

/Sebulon


----------



## mrjayviper (May 13, 2014)

*Re: Renaming ZFS pool via zpool import "mypool" "newpoolname*

Thanks!


----------



## Shaddoh (Oct 3, 2018)

Hello, I know old thread hoping you are still looking. 
I have a 2 bay external drive. Was named export2. I did zpool export export2 then zpool import export2 export. 

It got all confused I think because it is 2 drives. And now is labeled as export but wont import.

this command gives: zpool import export
cannot import 'export': more than one matching pool
import by numeric ID instead

zpool import to look up ID, then

zpool import 2234867910746350608
cannot import 'export': one or more devices is currently unavailable

Not sure where to go from here.
Can I rename it back to export2 somehow with out import command?


----------



## ShelLuser (Oct 3, 2018)

Shaddoh said:


> I did zpool export export2 then zpool import export2 export.
> 
> It got all confused I think because it is 2 drives. And now is labeled as export but wont import.



<snip>



Shaddoh said:


> this command gives: zpool import export
> cannot import 'export': more than one matching pool
> import by numeric ID instead
> 
> ...


First: it might have been a lot better to start a new thread because your current problem has little to do with the OP's issue of renaming pools.

Second: how did you come up with 2234867910746350608? Because that's not something you'd get from merely running `# zpool import`. Judging from the error message you had 2 separate pools and apparently renamed one into the other. 

You could try running `#zpool import -a` which would automatically import all pools, this would give you access to listing their ID's (`zpool get guid`) which can then help you access the pools individually. You should be able to rename one into something else this way.


----------

