Btrfs Subvolume
Native kernel disk quotas using Btrfs subvolumes.
Btrfs subvolumes provide native, kernel-level per-server disk limits with no user-space overhead. Each server's data directory is placed in its own Btrfs subvolume, and the quota is enforced by the kernel's Btrfs quota group (qgroup) system.
Requirements
- Host filesystem must be formatted as Btrfs
- The Wings server data directory (
/var/lib/pterodactyl/volumesby default) must reside on the Btrfs filesystem - Btrfs tools:
btrfs-progspackage
How It Works
When Wings creates a server, it creates a Btrfs subvolume at the server's data path and assigns a qgroup with the configured disk limit. The kernel enforces the limit natively - no daemon processes, no FUSE overhead.
Setup
1. Verify Btrfs Filesystem
findmnt -T /var/lib/pterodactylThe FSTYPE column should show btrfs. If it shows ext4 or another type, Btrfs subvolumes are not available on this mount.
2. Enable Btrfs Quotas
btrfs quota enable /var/lib/pterodactyl3. Configure Wings
In /etc/pterodactyl/config.yml:
system:
disk_limiter_mode: btrfs_subvolumeRestart Wings after applying the change.
Migrating Existing Servers
Existing server data directories are plain directories, not subvolumes. To migrate:
- Stop the server in the Panel
- Convert the directory to a subvolume:
mv /var/lib/pterodactyl/volumes/<uuid> /var/lib/pterodactyl/volumes/<uuid>.bak btrfs subvolume create /var/lib/pterodactyl/volumes/<uuid> cp -a /var/lib/pterodactyl/volumes/<uuid>.bak/. /var/lib/pterodactyl/volumes/<uuid>/ rm -rf /var/lib/pterodactyl/volumes/<uuid>.bak - Start the server
Wings will automatically assign a qgroup on next start.