I had one ZFS storage pool (mirror) on my old home server, which hosts my all photos, code, and some movies. I recently bought a new HP Gen8 Microserver, installed Solaris 11 on it, now I need to import the ZFS pool to my new Gen8 server.
The first thing is simply, just remove the disks from the old server, and attach them to the Gen8, then in Solaris on Gen 8:
1. Check the current zfs storage by using zfs list
root@solar:/# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 9.99G 106G 4.64M /rpool
rpool/ROOT 2.78G 106G 31K legacy
rpool/ROOT/solaris 2.78G 106G 2.47G /
rpool/ROOT/solaris/var 309M 106G 307M /var
rpool/VARSHARE 2.53M 106G 2.44M /var/share
rpool/VARSHARE/pkg 63K 106G 32K /var/share/pkg
rpool/VARSHARE/pkg/repositories 31K 106G 31K /var/share/pkg/repositories
rpool/VARSHARE/zones 31K 106G 31K /system/zones
rpool/dump 5.14G 106G 4.98G -
rpool/export 98K 106G 32K /export
rpool/export/home 66K 106G 32K /export/home
rpool/export/home/yang 34K 106G 34K /export/home/yang
rpool/swap 2.06G 106G 2.00G - |
root@solar:/# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 9.99G 106G 4.64M /rpool
rpool/ROOT 2.78G 106G 31K legacy
rpool/ROOT/solaris 2.78G 106G 2.47G /
rpool/ROOT/solaris/var 309M 106G 307M /var
rpool/VARSHARE 2.53M 106G 2.44M /var/share
rpool/VARSHARE/pkg 63K 106G 32K /var/share/pkg
rpool/VARSHARE/pkg/repositories 31K 106G 31K /var/share/pkg/repositories
rpool/VARSHARE/zones 31K 106G 31K /system/zones
rpool/dump 5.14G 106G 4.98G -
rpool/export 98K 106G 32K /export
rpool/export/home 66K 106G 32K /export/home
rpool/export/home/yang 34K 106G 34K /export/home/yang
rpool/swap 2.06G 106G 2.00G -
2. list all ZFS storage pool which can be imported by using zpool import without any pool name
root@solar:/# zpool import
pool: sp
id: 4536828612121004016
state: ONLINE
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit 'zpool upgrade'.
config:
sp ONLINE
mirror-0 ONLINE
c3t0d0 ONLINE
c3t1d0 ONLINE |
root@solar:/# zpool import
pool: sp
id: 4536828612121004016
state: ONLINE
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit 'zpool upgrade'.
config:
sp ONLINE
mirror-0 ONLINE
c3t0d0 ONLINE
c3t1d0 ONLINE
Here we can see a ZFS pool named ‘sp’ can be imported. It is a RAID 1 pool (mirror).
3. before importing, create folder to mount the pool which will be imported
4. import the pool by using zpool import #POOL_NAME
root@solar:/# zpool import sp |
root@solar:/# zpool import sp
5. check the imported pool and ZFS
root@solar:/sp/important/photo/All# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
rpool 118G 9.77G 108G 8% 1.00x ONLINE -
sp 2.72T 284G 2.44T 10% 1.00x ONLINE -
root@solar:/sp/important/photo/All# zfs list
NAME USED AVAIL REFER MOUNTPOINT
...
sp 284G 2.40T 152K /sp
sp/important 284G 2.40T 168K /sp/important
sp/important/code 63.3G 2.40T 63.3G /sp/important/code
sp/important/movie 31.4G 2.40T 31.4G /sp/important/movie
sp/important/photo 190G 2.40T 190G /sp/important/photo |
root@solar:/sp/important/photo/All# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
rpool 118G 9.77G 108G 8% 1.00x ONLINE -
sp 2.72T 284G 2.44T 10% 1.00x ONLINE -
root@solar:/sp/important/photo/All# zfs list
NAME USED AVAIL REFER MOUNTPOINT
...
sp 284G 2.40T 152K /sp
sp/important 284G 2.40T 168K /sp/important
sp/important/code 63.3G 2.40T 63.3G /sp/important/code
sp/important/movie 31.4G 2.40T 31.4G /sp/important/movie
sp/important/photo 190G 2.40T 190G /sp/important/photo