ZFS怎么查看已经导出的pool
在ZFS中导出的pool可以用zpool import命令查看,使用zpool split命令分离出来的pool也可以用zpool import命令查看。这是因为split后的pool处于export状态,如果需要使用这个新pool,还需要执行一下zpool import.
示例如下:
root@sol11ai:~# zpool status tank
pool: tank
state: ONLINE
scan: resilvered 91K in 0h0m with 0 errors on Fri Jun 14 17:49:05 2013
config:NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c8t1d0 ONLINE 0 0 0
c8t2d0 ONLINE 0 0 0errors: No known data errors
root@sol11ai:~# zpool split tank tank1 c8t2d0
split tank pool
root@sol11ai:~# zpool status tank1
cannot open 'tank1': no such pool
zpool status命令无法显示新池
root@sol11ai:~# zpool list tank1
cannot open 'tank1': no such poolzpool list命令也无法显示
root@sol11ai:~# zpool import
pool: tank1
id: 10143833088271989295
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:tank1 ONLINE
c8t2d0 ONLINEzpool import命令可以显示tank1. 这也说明新池处于export状态。
root@sol11ai:~# zpool import tank1
root@sol11ai:~# zpool status tank1
pool: tank1
state: ONLINE
scan: resilvered 91K in 0h0m with 0 errors on Fri Jun 14 17:49:05 2013
config:NAME STATE READ WRITE CKSUM
tank1 ONLINE 0 0 0
c8t2d0 ONLINE 0 0 0errors: No known data errors
root@sol11ai:~# zpool list tank1
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
tank1 15.9G 102K 15.9G 0% 1.00x ONLINE -在import后,zpool status和zpool list命令均可以显示tank1.