问题描述
假设一个名为"child-subvol"的btrfs子卷在另一个子卷中说"root-subvol",并且如果我们拍摄"root-subvol"的快照,那么"child-subvol"也应快照.
Assume that a btrfs subvol named "child-subvol" is within a another subvol say, "root-subvol" and if we take snapshot of "root-subvol" then, the "child-subvol" should also be taken a snapshot.
由于btrfs文件系统中尚不支持递归快照,因此又如何实现呢?
Since recursive snapshot support is not yet there in btrfs file system, how can this be achieved alternatively ?
推荐答案
步骤1:获取所有驻留的btrfs子卷.最好按以下命令所实现的排序顺序.
Step 1:Get all the residing btrfs sub-volumes. Preferably in the sorted order as achieved by the command below.
$ btrfs子卷列表-sort = -path <top_subvol>
$ btrfs subvolume list --sort=-path < top_subvol >
第2步:按照获得的优先顺序执行删除/快照操作.
Step 2:In the order of preference as obtained, perform delete/Snapshot operation.
$ btrfs子卷删除<subvol-name>
$ btrfs subvolume delete < subvol-name >
这篇关于如何对btrfs子卷进行递归快照?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!