All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graham Cobb <g.btrfs@cobb.uk.net>
To: Alex Powell <alexj.powellalt@googlemail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: space still allocated post deletion
Date: Tue, 19 Apr 2022 12:21:31 +0100	[thread overview]
Message-ID: <6672365e-c3d2-1a4c-7eb6-957f7a692d3a@cobb.uk.net> (raw)
In-Reply-To: <CAKGv6Cq+uwBMgo6th6E16=om8321wTO3fZPXF151VLSYiexFUg@mail.gmail.com>

On 19/04/2022 11:41, Alex Powell wrote:
> Hi team,
> I have deleted hundreds of GB of files however space still remains the
> same, even after a full balance and a dusage=0 balance. The location I
> am deleting from is usually a mount point but I found some files had
> saved there while the array was unmounted, which I then removed.

Most likely you have files in subvolumes which are not currently mounted
anywhere. You need to mount the root subvolume of the filesystem to see
all the files. Many distros default to putting the system root into a
non-root subvolume.

I think you can see them all if you use:

btrfs subv list -a /

To access them...

mkdir /mnt/1
mount -o subvolid=5 /dev/sdh2 /mnt/1

Graham

> 
> root@bean:/home/bean# du -h --max-depth=1 /mnt/data/triage
> 6.4G /mnt/data/triage/complete
> 189G /mnt/data/triage/incomplete
> 195G /mnt/data/triage
> 
> root@bean:/home/bean# rm -rf /mnt/data/triage/complete/*
> root@bean:/home/bean# rm -rf /mnt/data/triage/incomplete/*
> root@bean:/home/bean# du -h --max-depth=1 /mnt/data/triage
> 0 /mnt/data/triage/complete
> 0 /mnt/data/triage/incomplete
> 0 /mnt/data/triage
> 
> root@bean:/home/bean# btrfs filesystem show
> Label: none  uuid: 24933208-0a7a-42ff-90d8-f0fc2028dec9
> Total devices 1 FS bytes used 209.03GiB
> devid    1 size 223.07GiB used 211.03GiB path /dev/sdh2
> 
> root@bean:/home/bean# du -h --max-depth=1 /
> 244M /boot
> 91M /home
> 7.5M /etc
> 0 /media
> 0 /dev
> 0 /mnt
> 0 /opt
> 0 /proc
> 2.7G /root
> 1.6M /run
> 0 /srv
> 0 /sys
> 0 /tmp
> 3.6G /usr
> 13G /var
> 710M /snap
> 22G /
> 
> Linux bean 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC
> 2022 x86_64 x86_64 x86_64 GNU/Linux
> btrfs-progs v5.16.2


  reply	other threads:[~2022-04-19 11:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 10:41 space still allocated post deletion Alex Powell
2022-04-19 11:21 ` Graham Cobb [this message]
2022-04-19 12:42   ` Hugo Mills
2022-04-20  7:17   ` Alex Powell
2022-04-20  8:27     ` Graham Cobb
2022-04-23  6:04     ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6672365e-c3d2-1a4c-7eb6-957f7a692d3a@cobb.uk.net \
    --to=g.btrfs@cobb.uk.net \
    --cc=alexj.powellalt@googlemail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.