Renaming a ZFS pool


While messing around with ZFS last weekend, I noticed that I made a typo when I created one of my pools. Instead of naming a pool “apps,” I accidentally named it “app”:

$ zpool status -v

pool: app
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
app ONLINE 0 0 0
c0d1 ONLINE 0 0 0
c1d0 ONLINE 0 0 0
c1d1 ONLINE 0 0 0

errors: No known data errors

To fix this annoyance, I first exported the pool:

$ zpool export app

And then imported it with the correct name:

$ zpool import app apps

After the import completed, my pool contained the name I had originally intended to give it:

$ zpool status -v

pool: apps
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
apps ONLINE 0 0 0
c0d1 ONLINE 0 0 0
c1d0 ONLINE 0 0 0
c1d1 ONLINE 0 0 0

errors: No known data errors

Niiiiiiiiiiiiiiiiice!

This article was posted by Matty on 2006-11-15 16:40:00 -0400 -0400