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

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.
Code:
# 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 :)
 
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?
 
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>

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
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.
 
Back
Top