Bug 454310 - Cannot show condition of btrfs added device correctly
Summary: Cannot show condition of btrfs added device correctly
Status: REPORTED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: 21.12.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-24 06:14 UTC by Jingyuan Deng
Modified: 2024-07-09 13:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
OBSERVED RESULT when bug occurs (120.78 KB, image/png)
2022-05-24 06:14 UTC, Jingyuan Deng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jingyuan Deng 2022-05-24 06:14:34 UTC
Created attachment 149156 [details]
OBSERVED RESULT when bug occurs

SUMMARY

When using `btrfs device add` to add a new partition (I do not try for adding a new device), `partitionmanager` will probably not show condition of added partition correctly, like it cannot show the usage rate of device.
This problem does not always happen. Just keep rebooting and opening `partitionmanager` and sometimes (but rarely) this problem will disappear, but it will still exist after reboot.


STEPS TO REPRODUCE
1. make two BTRFS partitions nad mount one of them in `fstab`
2. `sudo btrfs device add -f /dev/$A $B`, whre `$A` is the path name of the second partition and `$B` is the mounted path of the first partition
3. Open `partitionmanager`, This problem will probably exist. If no, reboot and probably exist. (Like 8 in 10 chance)

OBSERVED RESULT

Like

Partition                     Type        Mount Point     Label            Partition Label      Size                  Used
/dev/nvme0n1p7       btrfs          /home          newhome                                   512.01 GiB           ___
/dev/nvme0n1p6       btrfs       /var/home          newhome                               306.01 GiB           224.07 GiB

EXPECTED RESULT  


Partition                     Type        Mount Point     Label            Partition Label      Size                  Used
/dev/nvme0n1p7       btrfs          /home          newhome                                   512.01 GiB        100.01 GiB
/dev/nvme0n1p6       btrfs       /var/home          newhome                               306.01 GiB         224.07 GiB

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Fedora 35 (Kinoite)
KDE Plasma Version:  5.24.4
KDE Frameworks Version: 5.91.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

Update to Fedora36 (Kinoite) does not solve this problem.  That is  `partitionmanager` 21.12.2 and `KDE` 5.24.4, frameworks 5.93.0
Comment 1 Jingyuan Deng 2022-05-24 06:19:17 UTC
Revise:

EXPECTED RESULT  


Partition                     Type        Mount Point     Label            Partition Label      Size                  Used
/dev/nvme0n1p7       btrfs                                    newhome                               512.01 GiB        100.01 GiB
/dev/nvme0n1p6       btrfs       /var/home          newhome                               306.01 GiB         224.07 GiB
Comment 2 Jingyuan Deng 2022-05-24 06:24:21 UTC
EXPECTED RESULT  


Partition                     Type        Mount Point     Label            Partition Label      Size                  Used
/dev/nvme0n1p7       btrfs                                    newhome                               512.01 GiB        108.00 GiB
/dev/nvme0n1p6       btrfs       /var/home          newhome                               306.01 GiB        116.01 GiB

But even if `partitionmanager` mangers to show the usage of /dev/nvme0n1p7, there is

Partition                     Type        Mount Point     Label            Partition Label      Size                  Used
/dev/nvme0n1p7       btrfs                                    newhome                               512.01 GiB        108.00 GiB
/dev/nvme0n1p6       btrfs       /var/home          newhome                               306.01 GiB        224.01 GiB

The usage of nvme0n1p7 is counted twice. (One in /dev/nvme0n1p6 and one in /dev/nvme0n1p7)