Prefetch Technologies // Keeping your cache lines cozy

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!