Announcement

Collapse
No announcement yet.

subvolume won't delete

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] subvolume won't delete

    I am using Kubuntu 20.04 with BTRFS. I had to do a rollback yesterday, and it went fine except for one little detail. I changed the old @ subvolume to @old, and rolled back to a snapshot of @ taken two days previous. But when I try to delete @old, I get this error message: Could not destroy subvolume/snapshot: directory not empty. Any idea on what might have gone wrong? Everything seems to work as it should.

    #2
    What does sudo btrfs su li / say? I'd be looking for another subvolume under @old. F.ex. I have
    Code:
    ID 257 gen 177547 top level   5 path @_eoan_u
    ID 286 gen 177535 top level 257 path @_eoan_u/.snapshots
    I hope to be deleting @_eoan_u soon, but I'll have to delete @_eoan_u/.snapshots first.
    Regards, John Little

    Comment


      #3
      It looks like this:

      ID 256 gen 80748 top level 5 path @old2
      ID 441 gen 1739 top level 256 path @old2/var/lib/portables
      ID 442 gen 1740 top level 256 path @old2/var/lib/machines
      ID 542 gen 82214 top level 5 path snapshots/@_200429-180302_ro
      ID 543 gen 82214 top level 5 path snapshots/@home_200429-180356_ro
      ID 573 gen 83524 top level 5 path @
      ID 574 gen 83523 top level 5 path @home
      ID 596 gen 82214 top level 5 path snapshots/@home_200501-212754
      ID 597 gen 82214 top level 5 path snapshots/@_200501-212935

      Comment


        #4
        btrfs su delete -C /mnt/snapshots/@old2

        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Error: file doesn't exist

          Comment


            #6
            Originally posted by oldgeek View Post
            ID 256 gen 80748 top level 5 path @old2
            ID 441 gen 1739 top level 256 path @old2/var/lib/portables
            ID 442 gen 1740 top level 256 path @old2/var/lib/machines
            Like jlittle suggested, you have two nested subvolumes under @old2 (you can see that in the paths, and it's also shown in the "top level 256"...where 256 refers to the ID of @old2. You cannot delete @old2 if you don't delete the nested subvolumes first.

            Comment


              #7
              Originally posted by GreyGeek View Post
              btrfs su delete -C /mnt/snapshots/@old2

              Not using BTRFS, but does it have a recursive option?
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                OK, I got rid of the nested subvolumes then deleted @old2. It went successfully. But how did those nested subvolumes get there? Thanks for the help.

                Comment


                  #9
                  Originally posted by oldgeek View Post
                  But how did those nested subvolumes get there?
                  Google suggests that /var/lib/portables is associated with "portable service images".
                  Originally posted by portablectl man page
                  Portable service images contain an OS file system tree along with systemd(1) unit file information. A service image may be "attached" to the local system. If attached, a set of unit files are copied from the image to the host, and extended with RootDirectory= or RootImage= assignments (in case of service units) pointing to the image file or directory, ensuring the services will run within the file system context of the image.
                  bash tells me that portablectl is part of the systemd-container package.

                  Yet another approach to containers on Linux. I suspect you installed this package, or one like it, or one that depends on it or something like it. Speculating, it would make sense that if a container has copies of parts of the OS, to "contain" changes to them, if on a btrfs to use btrfs COW features and have a subvolume for the container or containers.
                  Regards, John Little

                  Comment


                    #10
                    Originally posted by Snowhog View Post
                    Not using BTRFS, but does it have a recursive option?
                    Not currrently (at least on my version of btrfs-progs), see 'man btrfs-subvolume'. I seem to recall a patch for adding it, but I don't know it's status (whether it was rejected or not yet implemented)

                    Comment


                      #11
                      I believe those particular subvolumes are created by the systemd machine manager. You must have been doing some virtual machine or container stuff like Docker or

                      Please Read Me

                      Comment

                      Working...
                      X