cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.19k stars 1.11k forks source link

storage: incorrect (0) usage information for unmounted btrfs subvolume #20852

Open KKoukiou opened 2 months ago

KKoukiou commented 2 months ago

Page: Storage

Before mounting: 127 0 0 2_9091_cockpit_@localhost_anaconda-webui_index html

After mounting: 127 0 0 2_9091_cockpit_@localhost_anaconda-webui_index html (1)

Since we can't get this info before mounting maybe we should not show that at all?

garrett commented 2 months ago

It'd be great to have the usage without mounting, but if we can't do that, I agree that we shouldn't show it. We already have size.

Aside: Oddly, size and usage have different amounts. Size has 12.8 GB and usage shows 13 GB. Where does the 0.2 GB come from? Are there rounding-related errors?

jkonecny12 commented 2 months ago

In general it's quite problematic for Anaconda that Cockpit Storage requires to mount volume before it can start working with subvolumes. The issue is that volume is not really usable when mounted (at least not recommended) so forcing user to set mount point and everything is confusing. This is especially true in Anaconda where we are taking these mount points for installation and (correctly) skipping the volume mount.

garrett commented 2 months ago

In general it's quite problematic for Anaconda that Cockpit Storage requires to mount volume before it can start working with subvolumes. The issue is that volume is not really usable when mounted (at least not recommended) so forcing user to set mount point and everything is confusing. This is especially true in Anaconda where we are taking these mount points for installation and (correctly) skipping the volume mount.

Filed more generally about having to mount to perform operations @ https://github.com/cockpit-project/cockpit/issues/20855

(I consider this particular issue as different, as it would be solved by removing the usage when we can't show it. And the other is the more general case for all explicit actions that require mounting.)