以下是我的ZFS卷和快照的列表,以及它们的来源和克隆。
我想删除所有快照,但保留所有文件系统。我怎样才能做到这一点?
我尝试zfs promote
过尝试删除文件系统的许多不同组合的每个文件系统。这会在快照的“实时”位置移动;例如,zfs promote tank/containers/six
将快照F
从tank/containers/three@F
移到tank/containers/six@F
。文件系统中的实时数据未修改(这是我想要的!),但是我仍然无法删除快照(这不是我想要的)。
一个典型的zfs destroy
尝试告诉我它有依赖的克隆,这(快照)一些我不希望破坏,但别人其中(文件系统)我并不想破坏。
例如。
# zfs destroy tank/containers/six@A
cannot destroy 'tank/containers/six@A': snapshot has dependent clones
use '-R' to destroy the following datasets:
tank/containers/five
tank/containers/two@B
tank/containers/two
在上面的示例中,我不想销毁tank/containers/five
或tank/containers/two
,但是如果我分别是zfs promote
5和2,则仍然无法销毁任何快照。有解决方案吗?
# zfs list -t all -o name,origin,clones
NAME ORIGIN CLONES
tank - -
tank/containers - -
tank/containers/five tank/containers/two@B -
tank/containers/four tank/containers/six@C -
tank/containers/one - -
tank/containers/one@E - tank/containers/three
tank/containers/two tank/containers/six@A -
tank/containers/two@B - tank/containers/five
tank/containers/six tank/containers/three@F -
tank/containers/six@A - tank/containers/two
tank/containers/six@C - tank/containers/four
tank/containers/three tank/containers/one@E -
tank/containers/three@F - tank/containers/six