Announcement

Collapse
No announcement yet.

Can't delete a subvolume

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Can't delete a subvolume

    During my upgrade from 23.10 to 24.04, I accidentally stopped the process and was unable to complete it. To resolve this, I decided to do a rollback and start all over. Here's what I did: first, I used the mv command to rename @ to @old, then I used the same command to move the most recent @ snapshot to /@, which worked. Then I tried the upgrade again, and that worked too. As I did my weekly @ and @home snapshot transfer to an external HD, I decided to delete the @old subvolume. I tried first with the btrfs subvolume manager (Oshnluvr's script I think), and while a message indicated that it was deleted, it did not disappear. So then I tried the btrfs subv delete /@old command, but received an error message saying the subvolume could not be deleted because the directory was not empty. So what is the problem? Everything seems to be working properly so far otherwise.
    Last edited by Snowhog; May 27, 2024, 09:51 PM.

    #2
    Perhaps you've got a subvolume "nested" in @old. systemd creates subvolumes, in /var/lib/machines and /var/lib/portables, and maybe they are still there.I suggest running
    Code:
    sudo btrfs su list /
    and checking carefully the output.
    Regards, John Little

    Comment


      #3
      This is the output:

      [sudo] password for steve:
      ID 256 gen 179659 top level 5 path @old
      ID 259 gen 179954 top level 5 path @home
      ID 260 gen 790 top level 256 path @old/var/lib/portables
      ID 261 gen 791 top level 256 path @old/var/lib/machines
      ID 387 gen 170747 top level 5 path snapshots/@_240512-202539_ro
      ID 388 gen 170749 top level 5 path snapshots/@home_240512-202620_ro
      ID 389 gen 179954 top level 5 path @
      ID 391 gen 179656 top level 5 path snapshots/@home_240526-194603_ro
      ID 392 gen 179663 top level 5 path snapshots/@_240526-194917_ro

      ​I'm not sure how to interpret this.

      Comment


        #4
        The two that are "top level 256" are subvolumes contained within @old. So to delete @old you would need to delete them first.

        Please Read Me

        Comment


          #5
          Thank you very much--your solution worked.

          Comment

          Working...
          X