Skip to content

Make LVM snapshot default when no issues get reported #1986

Description

@szaimen

This is just a reminder that we don't forget to make the LVM snapshot default when no issues get reported.

check_command lvcreate --size 5G --name "NcVM-installation" ubuntu-vg

After we do this, everyone wil be able to use the built-in backup solution.

Activity

  1. enoch85 commented on May 22, 2021

    @enoch85
    Member

    I'd say when development stopped on that part for some time because it's rock solid, then maybe. :)

  2. szaimen commented on May 22, 2021

    @szaimen
    CollaboratorAuthor

    I'd say it is already pretty stable but yeah

  3. enoch85 commented on Jul 31, 2021

    @enoch85
    Member

    We could do this for Ubuntu 22.04 making the OS disk 45 GB in size, or extend the drive so there's only 5 GB left and keep it 40 GB in total size.

    Would that work?

  4. enoch85 commented on Jul 31, 2021

    @enoch85
    Member
  5. szaimen commented on Aug 2, 2021

    @szaimen
    CollaboratorAuthor

    We could do this for Ubuntu 22.04 making the OS disk 45 GB in size, or extend the drive so there's only 5 GB left and keep it 40 GB in total size.

    Would that work?

    From my side, yes 👍

  6. enoch85 commented on Oct 12, 2021

    @enoch85
    Member

    Just tested on one of my prod instances. I don't think this is stable enough:

    Last login: Thu Oct  7 12:49:11 2021 from blablabla
    root@cloud:~# bash /var/scripts/update.sh 
    Posting notification to users that are admins, this might take a while...
    Posting 'Update script started!' to: enoch85
    Warning: Stopping docker.service, but it can still be activated by:
      docker.socket
    Maintenance mode enabled
      Logical volume ubuntu-vg/NcVM-snapshot is used by another device.
    Maintenance mode disabled
    Starting docker...
    Posting notification to users that are admins, this might take a while...
    Posting 'Update failed!' to: enoch85
    
  7. szaimen commented on Oct 12, 2021

    @szaimen
    CollaboratorAuthor

    Logical volume ubuntu-vg/NcVM-snapshot is used by another device.

    Honestly, I've never seen this issue. What did you do before this issue appeard?
    Did you reinstall ubuntu from scratch and choosed to add the partition in the install script?

  8. szaimen commented on Oct 12, 2021

    @szaimen
    CollaboratorAuthor

    Did you reinstall ubuntu from scratch and choosed to add the partition in the install script?

    This way I'am running this setup since half a year or longer without any issue...

  9. szaimen commented on Oct 12, 2021

    @szaimen
    CollaboratorAuthor

    Or in other words: what are the steps to reproduce this issue?

  10. 32 remaining items

  11. szaimen commented on Apr 10, 2023

    @szaimen
    CollaboratorAuthor

    Leaning towards closing and removing the function all together.

    That would break all backup scripts so please don't do this.

    Or, add a notification that you need to reboot.

    Sounds good but there is one already here?

    vm/nextcloud_update.sh

    Lines 156 to 164 in f1ff45f

    if ! lvremove /dev/ubuntu-vg/NcVM-snapshot -y
    then
    nextcloud_occ maintenance:mode --off
    start_if_stopped docker
    notify_admin_gui "Update failed!" \
    "Could not remove NcVM-snapshot - Please reboot your server! $(date +%T)"
    msg_box "It seems like the old snapshot could not get removed.
    This should work again after a reboot of your server."
    exit 1

  12. szaimen commented on Apr 10, 2023

    @szaimen
    CollaboratorAuthor

    Should we improve the notification maybe somehow?

  13. enoch85 commented on Apr 10, 2023

    @enoch85
    Member

    I vote for improve notification, and force reboot if LVM snapshots are made.

  14. szaimen commented on Apr 11, 2023

    @szaimen
    CollaboratorAuthor

    I vote for improve notification

    Do you have some suggestion how to improve it?

    and force reboot if LVM snapshots are made.

    So directly after the update script then or when should the reboot happen?

  15. enoch85 commented on Apr 11, 2023

    @enoch85
    Member

    So directly after the update script then or when should the reboot happen?

    Yes, if LVM snapshot is enabled and a snapshot exist.

    o you have some suggestion how to improve it?

    Just add another msg_box before installation that "warns" the user that updates will be forced. Make it clear. 👍

  16. thatstheplace commented on Jun 22, 2023

    @thatstheplace

    Hello,

    I'm getting this at new install on ubuntu 22.04.2 LTS when chosing yes for LVM snapshots right in the second question.

    nextcloud_install_production.sh: line 113: [: 18,4: integer expression expected
    Could not create volume because of insufficient space...

    nextcloud_install_production.sh: line 113: [: 50,4: integer expression expected
    Could not create volume because of insufficient space...

  17. szaimen commented on Jun 22, 2023

    @szaimen
    CollaboratorAuthor

    Hi, can you post the output of sudo vgs | grep ubuntu-vg

  18. thatstheplace commented on Jun 22, 2023

    @thatstheplace

    I'm getting ubuntu-vg 1 1 0 wz--n- <36,95g 18,47g

  19. szaimen commented on Jun 22, 2023

    @szaimen
    CollaboratorAuthor

    Fix is in #2510

  20. thatstheplace commented on Aug 23, 2023

    @thatstheplace

    Hi,

    I know this option isn't default yet, but when you installing the VM with your scripts, first you're asking if all disk space should be used and after this you want to create the snapshots which is failing if you said yes before because of insufficient disk space.

  21. added 2 commits that reference this issue on Nov 4, 2025
    e7b1492
    be11318
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions