Project

General

Profile

Actions

Feature #45729

closed

pybind/mgr/volumes: Add the ability to keep snapshots of subvolumes independent of the source subvolume

Added by Shyamsundar Ranganathan almost 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
octopus,nautilus
Reviewed:
Affected Versions:
Component(FS):
mgr/volumes
Labels (FS):
Pull request ID:

Description

From the perspective of CSI and its volume life cycle management, a snapshot of a volume is expected to survive beyond the volume itself. IOW, the volume maybe deleted and later recreated from one of its prior snapshots.

Although, the CSI protocol has changed over time to allow snapshots to depend on their sources, and disallowing source volume deletion if snapshots exists, it is not a natural flow of events and life cycle management operations.

It is hence desired that snapshots remain independent from the source subvolume, to aid such life cycle operations as detailed above.

With CephFS subvolume snapshots are taken at the directory level of the subvolume, and hence are dependent on the subvolume. To delete the subvolume it is required that all snapshots within the subvolume are deleted first. This breaks the above desired state.

Backport note: As this pertains to CSI, the usual request is to see how best this can be back ported till Nautilus for supporting existing installations.

Solution thoughts:
On discussion with Ramana, it was thought that we could take a snapshot at a higher level than the subvolume, as we now have a subvolume path with a UUID in it for cloning reasons. Thus, a delete of a subvolume is independent of the snapshots, as these are outside the leaf subvolume directory.

For example, the current subvolume directory structure is /volumes/<group-name>/<user-provided-subvol-name>/<cephfs-gen-uuid>/ where the subvolume mount path is the entire directory path, and hence all user data exists within the <cephfs-gen-uuid>. Currently snapshots are taken of this directory, and hence as long as there are snapshots of the same, it cannot be deleted.

If the snapshots were instead of <user-provided-subvol-name>, we can delete the <cephfs-gen-uuid> directory when the volume needs to be deleted, but retain the snapshots independent of the same, just above it.


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #46820: octopus: pybind/mgr/volumes: Add the ability to keep snapshots of subvolumes independent of the source subvolumeResolvedShyamsundar RanganathanActions
Copied to CephFS - Backport #46821: nautilus: pybind/mgr/volumes: Add the ability to keep snapshots of subvolumes independent of the source subvolumeResolvedShyamsundar RanganathanActions
Actions

Also available in: Atom PDF