是否可以拆分 zfs 克隆以允许破坏原始快照?
# zfs create zpool1/test1
# zfs snapshot zpool1/test1@snap1
# zfs clone zpool1/test1@snap1 zpool1/test1clone
# zfs destroy zpool1/test1@snap1
cannot destroy 'zpool1/test1@snap1': snapshot has dependent clones
use '-R' to destroy the following datasets:
zpool1/test1clone
#
Run Code Online (Sandbox Code Playgroud)
在这一点上,它想“实现” zpool1/test1clone 文件系统,基本上就像我执行了zfs send zpool1/test1@snap1 | zfs receive zpool1/test1clone
.
您需要将 ZFS 克隆提升到文件系统,以便能够销毁原始快照/文件系统。
zfs promote zpool1/test1clone
请参阅:http : //download.oracle.com/docs/cd/E19253-01/819-5461/gcvfl/index.html
zfs promote filesystem
Promotes a clone file system to no longer be dependent
on its "origin" snapshot. This makes it possible to des-
troy the file system that the clone was created from.
The clone parent-child dependency relationship is
reversed, so that the "origin" file system becomes a
clone of the specified file system.
Run Code Online (Sandbox Code Playgroud)