Open clst opened 1 year ago
This is because btrfs-progs now prints the qgroup path on the right column. It was not the case before, ie, for btrfs-progs version 5.17:
~# btrfs qgroup show /
qgroupid rfer excl
-------- ---- ----
0/5 17.08GiB 288.00KiB
0/279 1.09MiB 1.09MiB
0/4352 16.00KiB 16.00KiB
0/4353 16.00KiB 16.00KiB
. . .
This breaks the (greedy) sed command that cleans the output because of the added slashes A simple fix is to make sed "non greedy"
--- btrfs-du 2019-10-02 00:36:05.993303941 +0200
+++ btrfs-du-path 2023-01-24 12:21:31.679651959 +0100
@@ -99,7 +99,8 @@
# data
## qgroup data
-OUT=$( sed '1,3d;s|^.*/||' <<< "$OUT" )
+OUT=$( sed '1,3d;s|^[^/]*/||' <<< "$OUT" )
ID__=( $( awk '{ print $1 }' <<< "$OUT" ) )
TOT_=( $( awk '{ print $2 }' <<< "$OUT" ) )
EXC_=( $( awk '{ print $3 }' <<< "$OUT" ) )
That worked great. I will ask the AUR maintainer to include the patch. I had to change the lines a bit and remove some whitespaces to apply it:
--- btrfs-du 2019-10-02 00:36:05.993303941 +0200
+++ btrfs-du-path 2023-01-24 12:21:31.679651959 +0100
@@ -87,7 +87,7 @@
# data
## qgroup data
-OUT=$( sed '1,3d;s|^.*/||' <<< "$OUT" )
+OUT=$( sed '1,3d;s|^[^/]*/||' <<< "$OUT" )
ID__=( $( awk '{ print $1 }' <<< "$OUT" ) )
TOT_=( $( awk '{ print $2 }' <<< "$OUT" ) )
EXC_=( $( awk '{ print $3 }' <<< "$OUT" ) )
EDIT: Oops, closed to early. The inclusion of the path in the official tools makes btrfs-du not as essential now however.
It worked fine. Now I get this error:
I tried enabling quota but that didn't change anything.
btrfs qgroup show /
works fine.I looked at it briefly but I can't find an error. --raw output also looks fine: