6

Now that our server is set up, I would like to rename our zpools.

I read somewhere that the way to do this is export & re-import under the new name. But will all my mount points and shares remain intact? Or will I have to set those up again?

Dan
  • 939
  • 5
  • 14
  • 25

1 Answers1

7

Actually, you can rename a zpool. Just not live. It is done exactly as you suggested. You can only export & re-import it using the new name. 'man zpool import' explains it:

   zpool import [-o mntopts] [ -o property=value] ... [-d dir | -c cachefile] [-D] [-f] [-R root] pool | id [newpool]

   Imports  a  specific  pool.  A pool can be identified by its name or the numeric identifier. If newpool is specified, the pool is imported using the name newpool.
   Otherwise, it is imported with the same name as its exported name.

It is worth noting that while your mounts will likely survive, they won't be where they used to be, most likely. If you were, for example, importing NFS mounts on a client using 192.168.1.5:/<pool>/<dataset> then the mount would change to 192.168.1.5:/<new-pool-name>/<dataset>. Since you have to export the pool to rename it anyway, this task of renaming a pool IS a downtime event -- so if on re-import you have to reset some mounts or change some mountpoints on the server, I don't see that it's that huge a deal.

longneck
  • 22,793
  • 4
  • 50
  • 84
Nex7
  • 1,925
  • 11
  • 14