Re: [PATCH] btrfs-progs: add RAID5/6 support to btrfs fi us

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/13/20 12:28 PM, Joshua Houghton wrote:
On Monday, 13 April 2020 10:08:50 UTC Joshua Houghton wrote:
On Wednesday, 18 March 2020 21:11:56 UTC Goffredo Baroncelli wrote:
Hi all,

this patch adds support for the raid5/6 profiles in the command
'btrfs filesystem usage'.
[...]
[...]

Hi Goffredo

Thanks you for this. It's something I've been wanting for a while. Do
you know why I get significantly different results in the overall summary
when I do not run it as root. I'm not sure if this is a bug or a
limitation.

When I run it as root it looks to be showing the correct values.

joshua@r2400g:~/development/btrfs-progs$ colordiff -u <(./btrfs fi us
/mnt/raid/) <(sudo ./btrfs fi us /mnt/raid/) WARNING: cannot read detailed
chunk info, per-device usage will not be shown, run as root --- /dev/fd/63
2020-04-13 10:54:26.833747190 +0100
+++ /dev/fd/62  2020-04-13 10:54:26.843746984 +0100
@@ -1,17 +1,32 @@
  Overall:
      Device size:                 29.11TiB
-    Device allocated:           284.06GiB
-    Device unallocated:                  28.83TiB
-    Device missing:              29.11TiB
-    Used:                       280.99GiB
-    Free (estimated):               0.00B      (min: 14.95TiB)
-    Data ratio:                              0.00
+    Device allocated:            19.39TiB
+    Device unallocated:                   9.72TiB
+    Device missing:                 0.00B
+    Used:                        18.67TiB
+    Free (estimated):             7.82TiB      (min: 5.39TiB)
+    Data ratio:                              1.33
      Metadata ratio:                  2.00
      Global reserve:             512.00MiB      (used: 0.00B)

  Data,RAID5: Size:14.33TiB, Used:13.80TiB (96.27%)
+   /dev/mapper/traid3     4.78TiB
+   /dev/mapper/traid1     4.78TiB
+   /dev/mapper/traid2     4.78TiB
+   /dev/mapper/traid4     4.78TiB

  Metadata,RAID1: Size:142.00GiB, Used:140.49GiB (98.94%)
+   /dev/mapper/traid3    63.00GiB
+   /dev/mapper/traid1    64.00GiB
+   /dev/mapper/traid2    63.00GiB
+   /dev/mapper/traid4    94.00GiB

  System,RAID1: Size:32.00MiB, Used:1.00MiB (3.12%)
+   /dev/mapper/traid1    32.00MiB
+   /dev/mapper/traid4    32.00MiB

+Unallocated:
+   /dev/mapper/traid3     2.44TiB
+   /dev/mapper/traid1     2.44TiB
+   /dev/mapper/traid2     2.44TiB
+   /dev/mapper/traid4     2.41TiB


This is in contrast to raid1 which seems to be mostly correct, irrespective
of what user I run as.


joshua@arch:/var/joshua$ colordiff -u <(btrfs fi us raid/) <(sudo btrfs fi
us raid/) WARNING: cannot read detailed chunk info, per-device usage will
not be shown, run as root --- /dev/fd/63  2020-04-13 09:52:54.630750079
+0000
+++ /dev/fd/62  2020-04-13 09:52:54.637416835 +0000
@@ -2,7 +2,7 @@
      Device size:                  8.00GiB
      Device allocated:             1.32GiB
      Device unallocated:                   6.68GiB
-    Device missing:               8.00GiB
+    Device missing:                 0.00B
      Used:                       383.40MiB
      Free (estimated):             3.55GiB      (min: 3.55GiB)
      Data ratio:                              2.00
@@ -10,8 +10,17 @@
      Global reserve:               3.25MiB      (used: 0.00B)

  Data,RAID1: Size:409.56MiB, Used:191.28MiB (46.70%)
+   /dev/loop0   409.56MiB
+   /dev/loop1   409.56MiB

  Metadata,RAID1: Size:256.00MiB, Used:416.00KiB (0.16%)
+   /dev/loop0   256.00MiB
+   /dev/loop1   256.00MiB

  System,RAID1: Size:8.00MiB, Used:16.00KiB (0.20%)
+   /dev/loop0     8.00MiB
+   /dev/loop1     8.00MiB

+Unallocated:
+   /dev/loop0     3.34GiB
+   /dev/loop1     3.34GiB

Does anyone know if this is something we can fix? I'm happy to take a look.

Joshua Houghton

Sorry missed this last bit never mind

If both are merged we will have a 'btrfs fi us'
commands with full support a raid5/6 filesystem without needing root
capability.


Unfortunately we need root to access the chunks information.
Thanks for giving an eye to that. I will "ping" the status of this patch

BR
G.Baroncelli




--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux