Conversation
22e4875 to
d7826ba
Compare
|
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
Contributor
Author
|
The python-basic-tests job is stuck in apt-get, possibly an infrastructure issue? I'll try manually restarting it. |
d7826ba to
d1606f8
Compare
draft commit just for sharing ideas
The vg_lv_from_device_path() expects a path in /dev/mapper/vg-lv form and uses the 'dmsetup splitname' command to return a (vg, lv) tuple. Extend this to also support LV paths in the /dev/vg/lv symlink form by replacing 'dmsetup splitname' with 'lvs -ovg_name,lv_name $device'.
d1606f8 to
700de34
Compare
Include the CalledProcessError.stderr text in the SnapmError raised when a callout fails.
For consistency between block device and mount point sources always include the '/dev' prefix when returning a value from Plugin.origin_from_mount_point().
9e36feb to
97967dc
Compare
The %USED SizePolicy allows a snapshot to be sized based on the space used by the filesystem present on the device: do not allow %USED to be specified for unmounted block device snapshots.
Return the special value -1 if mount_point_space_used() is called for a non-mount path.
This makes the size map handling consistent for block device and mount point snapshot sources.
Reflect that the target can be either a mount point or block device path in the argument name and docstring comments.
Add properties to reflect the combined list of block device and mount point sources for a Snapshot or SnapshotSet.
Add a method to look up a member of a SnapshotSet by source.
Disable too-many-branches and too-many-locals.
Generalise is_stratis_device() to accept either /dev/mapper/... or /dev/stratis/$POOL/$FS symlinks when detecting Stratis devices.
Only display the separate MountPoints and Devices fields if both
have at least one entry (i.e. the SnapshotSet is composed of both
mount point and block device sources):
# snapm snapset create bdev0 /var /dev/fedora/data / /home
SnapsetName: bdev0
Sources: /var, /dev/fedora/data, /, /home
MountPoints: /var, /, /home
Devices: /dev/fedora/data
NrSnapshots: 4
Time: 2024-12-03 15:20:55
UUID: a6df0b66-b4fc-5bd3-93be-af1fad0b64b9
Status: Inactive
Autoactivate: no
Bootable: no
Vs:
# snapm snapset create upgrade / /var
SnapsetName: upgrade
Sources: /, /var
NrSnapshots: 2
Time: 2024-12-03 15:21:00
UUID: 77d0c2af-7017-5c4a-b8a4-502f8024e502
Status: Active
Autoactivate: yes
Bootable: no
Don't allow the same volume to be added to a snapshot set twice as both a block device and a mount point source: # snapm snapset create bdev0 /dev/fedora/var /var ERROR - Error creating snapshot set member bdev0: lvcreate failed with: Logical Volume "var-snapset_bdev0_1733079682_-var" already exists in volume group "fedora" ERROR - Command failed: Could not create all snapshots for set bdev0 Vs: # snapm snapset create bdev0 /var /dev/fedora/var / /home ERROR - Command failed: Duplicate snapshot source /dev/fedora/var already added to bdev0 as /var
97967dc to
65ad29a
Compare
Snapshot manager currently allows snapshots-of-snapshots:
# for M in "" boot dev home proc run sys sys/fs/selinux var; do mount --bind /$M /mnt/$M; done
# mount /dev/stratis/p1/fs1-snapset_testset0_1733504066_-opt /mnt/opt
# mount /dev/stratis/p1/fs2-snapset_testset0_1733504066_-srv /mnt/srv
# chroot /mnt/
# snapm snapset list
SnapsetName Time NrSnapshots Status Sources
testset0 2024-12-06 16:54:26 2 Active /opt, /srv
# snapm snapset create recurs /opt /srv
SnapsetName: recurs
Sources: /opt, /srv
NrSnapshots: 2
Time: 2024-12-06 16:55:51
UUID: 23ccb96e-1e00-5ffb-91e9-d0c84ea6027b
Status: Active
Autoactivate: yes
Bootable: no
# snapm snapset show recurs --members
SnapsetName: recurs
Sources: /opt, /srv
NrSnapshots: 2
Time: 2024-12-06 16:55:51
UUID: 23ccb96e-1e00-5ffb-91e9-d0c84ea6027b
Status: Active
Autoactivate: yes
Bootable: no
Snapshots:
Name: p1/fs1-snapset_testset0_1733504066_-opt-snapset_recurs_1733504151_-opt
SnapsetName: recurs
Origin: /dev/stratis/p1/fs1-snapset_testset0_1733504066_-opt
Time: 2024-12-06 16:55:51
Source: /opt
MountPoint: /opt
Provider: stratis
UUID: 65057e3a-1268-58b9-be76-12feaa1d421c
Status: Active
Size: 1.0GiB
Free: 3.1GiB
Autoactivate: yes
DevicePath: /dev/stratis/p1/fs1-snapset_testset0_1733504066_-opt-snapset_recurs_1733504151_-opt
Pool: p1
Filesystem: fs1-snapset_testset0_1733504066_-opt-snapset_recurs_1733504151_-opt
Name: p1/fs2-snapset_testset0_1733504066_-srv-snapset_recurs_1733504151_-srv
SnapsetName: recurs
Origin: /dev/stratis/p1/fs2-snapset_testset0_1733504066_-srv
Time: 2024-12-06 16:55:51
Source: /srv
MountPoint: /srv
Provider: stratis
UUID: c3f75665-e152-5749-8bb2-deccce0d9716
Status: Active
Size: 2.0GiB
Free: 3.1GiB
Autoactivate: yes
DevicePath: /dev/stratis/p1/fs2-snapset_testset0_1733504066_-srv-snapset_recurs_1733504151_-srv
Pool: p1
Filesystem: fs2-snapset_testset0_1733504066_-srv-snapset_recurs_1733504151_-srv
This works for the most part but there are a few problems with the
current behaviour:
* Snapshot device names grow to unmanageable lengths (esp for depth >
1).
* Merge operations that affect a chain of snapshots may require
rewriting the origin of dependent snapshot sets.
* Some providers (lvm2thin) currently erase origin links when any
snapshot within a series or chain is merged, orphaning any remaining
snapshots of the same origin.
* lvm2cow cannot support recursive snapshots due to the limitations of
the dm-snapshot target.
These are solvable but require changes in other components and an
extension to the snapm naming format so for now prevent users from
creating recursive snapshot sets:
# snapm snapset create recurs /opt /srv
ERROR - Command failed: Snapshots of snapshots are not supported: /opt corresponds to snapshot device /dev/stratis/p1/fs1-snapset_testset0_1733504066_-opt
915cb48 to
b1f4943
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supplements #88