FreeNAS:重命名 zpool

FreeNAS:重命名 zpool

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

我读到过,执行此操作的方法是导出并以新名称重新导入。但我的所有挂载点和共享都会保持不变吗?还是我必须重新设置它们?

答案1

实际上,您可以重命名 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.

值得注意的是,虽然您的挂载可能会保留下来,但它们很可能不会再回到原来的位置。例如,如果您使用在客户端上导入 NFS 挂载,192.168.1.5:/<pool>/<dataset>则挂载将更改为192.168.1.5:/<new-pool-name>/<dataset>。由于无论如何您都必须导出池才能重命名,因此重命名池的任务是停机事件——因此,如果在重新导入时您必须重置一些挂载或更改服务器上的一些挂载点,我认为这并不是什么大问题。

相关内容