FreeNAS:重命名 zpool

Dan*_*Dan 6 zfs freenas zpool

现在我们的服务器已经设置好了,我想重命名我们的 zpools。

我在某处读到这样做的方法是以新名称导出和重新导入。但是我所有的挂载点和共享会保持不变吗?还是我必须重新设置这些?

Nex*_*ex7 7

实际上,您可以重命名 zpool。就是没活。它完全按照您的建议完成。您只能使用新名称导出和重新导入它。'man zpool import' 解释说:

   zpool import [-o mntopts] [ -o property=value] ... [-d dir | -c cachefile] [-D] [-f] [-R root] pool | id [newpool]

   Imports  a  specific  pool.  A pool can be identified by its name or the numeric identifier. If newpool is specified, the pool is imported using the name newpool.
   Otherwise, it is imported with the same name as its exported name.
Run Code Online (Sandbox Code Playgroud)

值得注意的是,虽然您的坐骑可能会幸存下来,但它们很可能不会像以前那样。例如,如果您使用在客户端上导入 NFS 挂载,192.168.1.5:/<pool>/<dataset>则挂载将更改为192.168.1.5:/<new-pool-name>/<dataset>. 由于无论如何您都必须导出池以对其进行重命名,因此重命名池的任务是停机事件 - 因此,如果在重新导入时必须重置某些挂载或更改服务器上的某些挂载点,我看不到这是一笔巨大的交易。