Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert (merge) LVM snapshot requires neither the source or snapshot be open for immediate merge #14

Open
trgill opened this issue Jan 25, 2024 · 1 comment

Comments

@trgill
Copy link
Collaborator

trgill commented Jan 25, 2024

If either are open, the merge is deferred until the next time the server reboots and the source logical volume is activated.

should the role return a warning if either are open?

@trgill
Copy link
Collaborator Author

trgill commented Jan 25, 2024

Need to add tests that have either the source or snapshot open/mounted/busy etc.

Also need to add tests that write to the snapshot before the merge.

Should we have a feature to pre-check the snapshot for the amount of data on the snapshot that will need to be copied back to the source?

Is it useful to a user of the role to get the status of the LV? A user could detect if a snapshot if open by checking the "# open" field returned by lvdisplay.

An example snapshot with a mounted filesystem shows non-zero # open:

  --- Logical volume ---
  LV Path                /dev/vg1/lv1_vg1_snapset1
  LV Name                lv1_vg1_snapset1
  VG Name                vg1
  LV UUID                Gp3YQ0-0BRp-oo2u-5r28-yOYN-UaXv-UFka8p
  LV Write Access        read/write
  LV Creation host, time fedora, 2024-01-25 17:12:30 -0500
  LV snapshot status     active destination for lv1_vg1
  LV Status              available
  # open                 1
  LV Size                1.00 GiB
  Current LE             256
  COW-table size         208.00 MiB
  COW-table LE           52
  Allocated to snapshot  31.05%
  Snapshot chunk size    4.00 KiB
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:10

@trgill trgill changed the title revert (merge) LVM snapshot requires neither the source or snapshot be open revert (merge) LVM snapshot requires neither the source or snapshot be open for immediate merge Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant