大网数据广告活动
服务器运维问答

Always do "zpool export" for easier and/or more reliable recovery?

· 52CE 我爱测

Setting up a new (zfs-on-linux) setup with a zpool as data storage (not for system) I would like to prepare myself for the worst case as far as possible. But as I do not have any practical ZFS recovery experience I do not know wh…

问题原文

原帖链接 · mo' · CC BY-SA 4.0

Setting up a new (zfs-on-linux) setup with a zpool as data storage (not for system) I would like to prepare myself for the worst case as far as possible. But as I do not have any practical ZFS recovery experience I do not know what I might need in such scenario.

Asuming the host system catches fire with only the ZFS disks surviving, I want to be able to recover the pool as easy and reliable as possible. There was a answer in that direction on stackoverflow five years ago (Backup ZFS pool metadata) stating that ZFS disks will automatically be recognized when running "zpool import". The manpage for "zpool export" states:

Exports the given pools from the system. All devices are marked as exported, but are still considered in use by other subsystems. The devices can be moved between systems (even those of different endianness) and imported as long as a sufficient number of devices are present.

That makes me wonder: Should I always do an export after setting up a new zpool, to increase the chances of a secussful recovery? Or is there any metadata not written to the disks, that should be in a backup?

已采纳解答

原帖链接 · ewwhite · CC BY-SA 4.0

Theres is no situation in regular use where you would want to manually run a zpool export. Pools are imported expected automatically during the Linux boot and shutdown process.

However, ZFS zpools are already and inherently portable, provided access to the disks is still possible. You don't need to take any additional action do to what you're asking about.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-02-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。