Results 1 to 4 of 4

Thread: /var/lib/machines error during update

  1. #1
    Join Date
    May 2015
    Location
    Italy
    Posts
    442

    Default /var/lib/machines error during update

    Today, while updating, I got this message:

    Code:
    (101/210) Installazione di: systemd-234-3.1.x86_64 .................................................................................................................................[fine]
    Output aggiuntivo di rpm:
    Making /var/lib/machines suitable for rollbacks...
    Deleting empty /var/lib/machines directory/subvolume
    Delete subvolume (no-commit): '/var/lib/machines'
    Creating /var/lib/machines subvolume suitable for rollbacks.
    failure (ioctl(BTRFS_IOC_SUBVOL_CREATE) failed, errno:17 (File exists))
    warning: Please fix /var/lib/machines manually.
    I do not have (anymore) a "machines" directory/subvolume under /var/lib. I also verified that there's no instruction in /etc/fstab to mount a /var/lib/machines subvolume.
    So I simply created a "machines" subdirectory under /var/lib, but I'm not sure this is the right thing to do.
    Hints?

    Cris
    Desktop: OpenSUSE Tumbleweed (x86_64) - AMD Ryzen 5 3600 Six-Core Processor, 16Gb RAM, 120GB Samsung Evo 840 SSD, 500Gb WD BLACK SN750 NVMe SSD
    Laptop: OpenSUSE Tumbleweed (x86_64) - Thinkpad T440 - Intel i5-4210U, 12Gb RAM, 250GB Samsung EVO 750 SSD

  2. #2
    Join Date
    May 2015
    Location
    Italy
    Posts
    442

    Default Re: /var/lib/machines error during update

    Doesn't anybody have a clue about this?
    Nobody else with this problem?

    TIA
    Cris
    Desktop: OpenSUSE Tumbleweed (x86_64) - AMD Ryzen 5 3600 Six-Core Processor, 16Gb RAM, 120GB Samsung Evo 840 SSD, 500Gb WD BLACK SN750 NVMe SSD
    Laptop: OpenSUSE Tumbleweed (x86_64) - Thinkpad T440 - Intel i5-4210U, 12Gb RAM, 250GB Samsung EVO 750 SSD

  3. #3
    Join Date
    May 2015
    Location
    Italy
    Posts
    442

    Default Re: /var/lib/machines error during update

    I solved my problem, so I'm reporting it here in the hope that it will help someone else in the future.

    First of all: even if nobody replied to this thread, the problem is known and somebody already put some effort (or at least thought) in it.
    First step I took was to examine the post-script of the systemd package, which was giving me the problem. Here is the post-installation script (emphasis added by me):
    Code:
    # Convert /var/lib/machines subvolume to make it suitable for
    # rollbacks, if needed. See bsc#992573. The installer has been fixed
    # to create it at installation time.
    #
    # The convertion might only be problematic for openSUSE distros
    # (TW/Factory) where previous versions had already created the
    # subvolume at the wrong place (via tmpfiles for example) and user
    # started to populate and use it. In this case we'll let the user fix
    # it manually.
    #
    # For SLE12 this subvolume was only introduced during the upgrade from
    # v210 to v228 when we added this workaround. Note that the subvolume
    # is still created at the wrong place due to the call to
    # tmpfiles_create macro previously however it's empty so there
    # shouldn't be any issues.
    if [ $1 -gt 1 ]; then
            /usr/lib/systemd/scripts/fix-machines-btrfs-subvol.sh || :
    fi
    Looking at the script fix-machines-btrfs-subvol.sh I can see that everything works correctly, but for the last command: the one to create the subvolume. It fails because the subvolume already exists. This is weird, because the script should have deleted it a few lines before, and it did not produce an error. In fact I do not have a /var/lib/machines anymore, but by running the sudo btrfs subvolume list -a / command I see that the subvolume is still there.
    Trying to delete it with sudo btrfs subvolume delete /var/lib/machines gave me an error (don't remember it exactly, but was something like "path do not exist").

    So I started googling around and found this post that helped me find the solution: https://unix.stackexchange.com/quest...trfs-subvolume.
    In the solution, the "second possibility" was the right one. I followed the instructions to mount the subvolume with ID=0 on /mnt and, from there, I was finally able to delete the subvolume with the command sudo btrfs subvolume delete /mnt/var/lib/machines.
    After that, I unmounted the subvolume with ID=0 and then ran the command mksubvolume /var/lib/machines, which - at last! - succeeded.

    I hope this helps!

    Cris
    Desktop: OpenSUSE Tumbleweed (x86_64) - AMD Ryzen 5 3600 Six-Core Processor, 16Gb RAM, 120GB Samsung Evo 840 SSD, 500Gb WD BLACK SN750 NVMe SSD
    Laptop: OpenSUSE Tumbleweed (x86_64) - Thinkpad T440 - Intel i5-4210U, 12Gb RAM, 250GB Samsung EVO 750 SSD

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: /var/lib/machines error during update

    Thanks for sharing, Cris. I saw your posts, but did not have any clue.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •