Btrfs quota support
Open Discussion
It appears that only quota support would be needed to gain feature-parity with existing EXT and XFS filesystem support in WHM/cPanel.
As a server administrator, I would like to see WHM/cPanel support creating, modifying, and reporting quotas on Btrfs so that I can use this modern filesystem.
Being able to use Btrfs could also lead to taking advantage of its other advanced features in the future, such as efficient incremental backups, snapshots, compression, and deduplication.
I fully support this!
As the architect of multiple of my company's cPanel solutions, I have already created a "hacky" solution that leverages cPanel's quota cache files (/var/cpanel/repquota.datastore and the per-cPanel user homedir datastore cache files) to convey BTRFS qgroup usage information to cPanel/WHM. At the moment, this also involves adding all disk quota scripts like /scripts/fixquotas to /etc/cpanelsync.exclude (which does not seem to be respecting this for many of these files) and deleting the scripts outright and then touch + chattr +ia'ing them. But the solution itself works exceptionally well, barring a rework of cPanel's quota cache system, the only outstanding issues I have with my implementation can be resolved with minor adjustments.
I would like to quickly convey helpful implementation details/snags to reduce the difficulty cPanel will run into with this:
I can provide the source code for my existing solution directly to cPanel if it would assist in expediting implementation of a solution for this.
Quota support really is all that is necessary for cPanel to support BTRFS, but I would also love if cPanel would look longer-term at BTRFS support as well that leverages some of the unique features of the filesystem over EXT4/XFS. Besides the quota setup I made, I have also developed a backup system that leverages pkgacct to take homeless backups of cPanel accounts and to use incremental BTRFS snapshots to backup homedirs to the /backup mount. For servers with only a single volume, this would make backups nearly instantaneous. For servers with a mounted or networked backup drive, an instantaneous ACOW snapshot can be made locally (at basically zero disk cost) and btrfs send -p can be used to send incremental snapshots to the mounted/networked backup drive (assuming that is running BTRFS as well). This has the added benefit on the /backup mount/network locale of being able to have the speed advantages of incremental backups but the redundancy benefits of non-incremental (I can explain this more if requested). If cPanel were to take this on, I suspect pkgacct could be updated as well to leverage BTRFS's advanced capabilities to fetch/save cPanel structural data more quickly and effectively.
As with quota support, I am more than happy to share source code/implementation details/etc for backing up cPanel accounts with BTRFS.
I fully support this!
As the architect of multiple of my company's cPanel solutions, I have already created a "hacky" solution that leverages cPanel's quota cache files (/var/cpanel/repquota.datastore and the per-cPanel user homedir datastore cache files) to convey BTRFS qgroup usage information to cPanel/WHM. At the moment, this also involves adding all disk quota scripts like /scripts/fixquotas to /etc/cpanelsync.exclude (which does not seem to be respecting this for many of these files) and deleting the scripts outright and then touch + chattr +ia'ing them. But the solution itself works exceptionally well, barring a rework of cPanel's quota cache system, the only outstanding issues I have with my implementation can be resolved with minor adjustments.
I would like to quickly convey helpful implementation details/snags to reduce the difficulty cPanel will run into with this:
I can provide the source code for my existing solution directly to cPanel if it would assist in expediting implementation of a solution for this.
Quota support really is all that is necessary for cPanel to support BTRFS, but I would also love if cPanel would look longer-term at BTRFS support as well that leverages some of the unique features of the filesystem over EXT4/XFS. Besides the quota setup I made, I have also developed a backup system that leverages pkgacct to take homeless backups of cPanel accounts and to use incremental BTRFS snapshots to backup homedirs to the /backup mount. For servers with only a single volume, this would make backups nearly instantaneous. For servers with a mounted or networked backup drive, an instantaneous ACOW snapshot can be made locally (at basically zero disk cost) and btrfs send -p can be used to send incremental snapshots to the mounted/networked backup drive (assuming that is running BTRFS as well). This has the added benefit on the /backup mount/network locale of being able to have the speed advantages of incremental backups but the redundancy benefits of non-incremental (I can explain this more if requested). If cPanel were to take this on, I suspect pkgacct could be updated as well to leverage BTRFS's advanced capabilities to fetch/save cPanel structural data more quickly and effectively.
As with quota support, I am more than happy to share source code/implementation details/etc for backing up cPanel accounts with BTRFS.
Because Btrfs does not support user-quotas and uses a subvolume quota model, quotas should not be expected to work exactly the same on Btrfs as they do on other filesystems. Similar functionality can be approximated by creating a new subvolume for each user's home directory and configuring subvolume quotas.
Because Btrfs does not support user-quotas and uses a subvolume quota model, quotas should not be expected to work exactly the same on Btrfs as they do on other filesystems. Similar functionality can be approximated by creating a new subvolume for each user's home directory and configuring subvolume quotas.
Replies have been locked on this page!