this post was submitted on 28 Mar 2024
2 points (100.0% liked)

Linux

7348 readers
78 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 1 year ago
MODERATORS
 

cross-posted from: https://programming.dev/post/12030162

While checking for used and free space in a btrfs subvolume, I'm not getting a consistent value. It's confusing and doesn't help.

  1. What is the correct way to find used/free space?
  2. Why are these values inconsistent (except normal du)?

According to btrfs fi usage /home, 83.21 GiB is used.

Overall:
    Device size:		 149.98GiB
    Device allocated:		 100.07GiB
    Device unallocated:		  49.91GiB
    Device missing:		     0.00B
    Device slack:		     0.00B
    Used:			  83.21GiB
    Free (estimated):		  63.06GiB	(min: 38.10GiB)
    Free (statfs, df):		  63.06GiB
    Data ratio:			      1.00
    Metadata ratio:		      2.00
...

As per btrfs fi df /home, used space is 82.86 GiB, not 83.21 GiB.

Data, single: total=96.01GiB, used=82.86GiB
System, DUP: total=32.00MiB, used=16.00KiB
Metadata, DUP: total=2.00GiB, used=178.61MiB
GlobalReserve, single: total=99.50MiB, used=0.00B

As per btrfs fi du -s /home , used space is 63.11 GiB.

     Total   Exclusive  Set shared  Filename
  63.11GiB    13.64GiB    49.01GiB  /home

While according to du -hs /home, 64GiB is used.


Also, maximum space used should be close to 72 GiB as per btrfs fi du -s / and 73 GiB as per du -hs /, if btrfs fi usage includes all subvolumes . '/home' and '/' are on separate subvolumes.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here