Oracle Solaris ZFS 管理指南

ZFS 命令历史记录 (zpool history)

Solaris 10 8/07 发行版:在此 Solaris 发行版中,ZFS 会自动记录成功修改池状态信息的 zfszpool 命令。例如:


# zpool history
History for 'newpool':
2007-04-25.11:37:31 zpool create newpool mirror c0t8d0 c0t10d0
2007-04-25.11:37:46 zpool replace newpool c0t10d0 c0t9d0
2007-04-25.11:38:04 zpool attach newpool c0t9d0 c0t11d0
2007-04-25.11:38:09 zfs create newpool/user1
2007-04-25.11:38:15 zfs destroy newpool/user1

History for 'tank':
2007-04-25.11:46:28 zpool create tank mirror c1t0d0 c2t0d0 mirror c3t0d0 c4t0d0

借助此功能,您或 Oracle 技术支持人员可以准确找出为排除错误情形而执行的 ZFS 命令。

可以使用 zpool history 命令标识特定存储池。例如:


# zpool history newpool
History for 'newpool':
2007-04-25.11:37:31 zpool create newpool mirror c0t8d0 c0t10d0
2007-04-25.11:37:46 zpool replace newpool c0t10d0 c0t9d0
2007-04-25.11:38:04 zpool attach newpool c0t9d0 c0t11d0
2007-04-25.11:38:09 zfs create newpool/user1
2007-04-25.11:38:15 zfs destroy newpool/user1

在此 Solaris 发行版中,zpool history 命令不记录 user-IDhostnamezone-name。但是,从 Solaris 10 10/08 发行版开始记录此信息。有关更多信息,请参见ZFS 命令历史记录增强 (zpool history)

有关 ZFS 问题故障排除的更多信息,请参见解决 ZFS 问题