and posted in Solaris, ZFS

Howto rename a Zpool and a ZFS mountpoint

I accidentially named a pool tets rather than test. So I renamed it.

zpool status -v

  pool: tets
state: ONLINE
scrub: none requested
config:
NAME        STATE     READ WRITE CKSUM
tets        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, I first exported the pool:

zpool export tets

And then imported it with the correct name:

zpool import tests test

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

zpool status -v

  pool: test
state: ONLINE
scrub: none requested
config:
NAME        STATE     READ WRITE CKSUM
test        ONLINE       0     0     0
c0d1      ONLINE       0     0     0
c1d0      ONLINE       0     0     0
c1d1      ONLINE       0     0     0
errors: No known data errors
Step 2 Fix the also messed u ZFS Mountpoint
I've used this Mount for a Zone so thats why I placed it into /opt/zones/$Servername
zfs set mountpoint="/opt/zones/[Newmountpoint]" [ZFSPOOL/[ROOTor other filesystem]
[print_link]
%d bloggers like this: