# How To check LXD/Incus container BTRFS disk usage on Linux

DevFeed: [How To check LXD/Incus container BTRFS disk usage on Linux](<https://devfeed.tech/articles/how-to-check-lxd-incus-container-btrfs-disk-usage-on-linux-41918.md>)

Original publisher: [Read original article](<https://www.cyberciti.biz/faq/how-to-check-lxd-incus-container-btrfs-disk-usage-on-linux/>)

Author: Vivek Gite

Published: 2024-08-15T21:42:09Z

Content type: tutorial

Language: en

Sources: [nixCraft](<https://devfeed.tech/sources/nixcraft-linux-tips-hacks-tutorials-and-ideas-in-blog-format-rss-feed.md>)

Topics: [btrfs](<https://devfeed.tech/topics/btrfs.md>), [container](<https://devfeed.tech/topics/container.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Filesystems](<https://devfeed.tech/topics/filesystems.md>), [Script](<https://devfeed.tech/topics/script.md>), [apt](<https://devfeed.tech/topics/apt.md>), [Debian](<https://devfeed.tech/topics/debian.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>)

Tags: [apt](<https://devfeed.tech/tags/apt.md>), [bash-shell](<https://devfeed.tech/tags/bash-shell.md>), [btrfs](<https://devfeed.tech/tags/btrfs.md>), [command](<https://devfeed.tech/tags/command.md>), [containers](<https://devfeed.tech/tags/containers.md>), [debian](<https://devfeed.tech/tags/debian.md>), [easy](<https://devfeed.tech/tags/easy.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [incus](<https://devfeed.tech/tags/incus.md>), [install](<https://devfeed.tech/tags/install.md>), [linux](<https://devfeed.tech/tags/linux.md>), [operating-systems](<https://devfeed.tech/tags/operating-systems.md>), [shell](<https://devfeed.tech/tags/shell.md>), [shell-script](<https://devfeed.tech/tags/shell-script.md>), [storage](<https://devfeed.tech/tags/storage.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

## AI overview

A tutorial presents a shell script for checking LXD or Incus container disk usage on BTRFS storage under Linux. It covers locating the BTRFS mount, checking required commands and permissions, verifying the device mount, and using df. It also notes limitations of BTRFS qgroup quotas and suggests ZFS refquotas when strict quota enforcement is required.

## Source excerpt

Here is a quick and dirty shell script I put to check LXD or Incus container size and how much space they are taking on the BTRFS subvolume. Naturally, you must run the script as a root user, and LXD or Icnus must be configured with BTRFS storage backend on Linux operating systems. See how to set up and install LXD on Ubuntu 20.04 LTS or installing Incus on Debian 12/11 using the apt command. Love this? sudo share_on: Twitter - Facebook - LinkedIn - Whatsapp - Reddit The post How To check LXD/Incus container BTRFS disk usage on Linux appeared first on nixCraft.