On Tue, Aug 3, 2021 at 1:51 AM Sreyan Chakravarty <sreya...@gmail.com> wrote:
>
> Hi,
>
> I am faced with a strange problem. I have a BTRFS snapshot that I want to 
> delete but just can't.
>
> So I always manipulate BTRFS snapshots from a live-cd environment which I 
> setup using the following commands:
>
> sudo cryptsetup open /dev/sda3 dm-crypt
> <<GIVE PASSWORD>>
> sudo mount /dev/mapper/dm-crypt /mnt
>
> Now I can query the snapshots:
>
> $ sudo btrfs subvolume list /mnt
> ID 448 gen 235989 top level 5 path root
> ID 449 gen 0 top level 5 path before_live_cd_exp
>
> I want to delete the snapshot "before_live_cd_exp", which I am unable to do:
>
> $ sudo btrfs subvolume delete /mnt/before_live_cd_exp/
> ERROR: Not a Btrfs subvolume: Invalid argument
>
> What does it mean it's not a Btrfs subvolume ? It was picked up by the list 
> command.
>
> I also tried via the subvolid:
>
> $ sudo btrfs subvolume delete --subvolid 449 /mnt
> Delete subvolume (no-commit): '/mnt/before_live_cd_exp'
> ERROR: Could not destroy subvolume/snapshot: No such file or directory

What messages appear in dmesg and coincide with the failed command?

I haven't heard of anyone being unable to delete snapshots before. But
also suspicious about this particular snapshot (which I also haven't
ever seen) is its generation is 0. Even brand new subvolumes on a
brand new file system have non-zero generation.


> This is even weirder since as you can clearly see the directory exists in the 
> given path.
>
> Any suggestions on what is going wrong ?
>
> I should tell you that a while back I had a huge BTRFS file system crash, and 
> it took a lot of targeted help from the community to get my system to boot.

This could be a side effect of an incomplete repair.


-- 
Chris Murphy
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to