Bug 2177602

Summary: Virtual Machine's Utilization -> Storage graph counts same device multiple times
Product: Container Native Virtualization (CNV) Reporter: Germano Veit Michel <gveitmic>
Component: User ExperienceAssignee: Matan Schatzman <mschatzm>
Status: NEW --- QA Contact: Leon Kladnitsky <lkladnit>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.12.5CC: gouyang
Target Milestone: ---   
Target Release: 4.14.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Germano Veit Michel 2023-03-13 05:53:57 UTC
Description of problem:

Inside a VM, mount a filesystem multiple times:

# mount | grep vda3
/dev/vda3 on / type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)
/dev/vda3 on /mnt type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)

Notice this is a 100G disk.

# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
vda    252:0    0  100G  0 disk 
├─vda1 252:1    0    1M  0 part 
├─vda2 252:2    0  100M  0 part /boot/efi
└─vda3 252:3    0 99.9G  0 part /mnt
vdb    252:16   0    1M  0 disk 

Now open the console and go to
Virtualization -> Virtual Machines -> xyz -> Overview -> Utilization -> Storage

Wait about 5 minutes

You will see X used out of 200G, its counting vda3 twice due to the multiple mounts of the filesystem.

That is incorrect. The VM has a 100G disk and it should not sum all the available and used spaces for all mountpoints.

Version-Release number of selected component (if applicable):
OCP 4.12.6
CNV 4.12.1

How reproducible:
Always

Steps to Reproduce:
1. Mount the same filesystem twice or more, to different mountpoints
2. Go to Utilization -> Storage

Actual results:
* Incorrect data reported

Expected results:
* Correct utilization reported

Additional info:
* This breaks reporting for Hypershift NodePool VMs, where the filesystems are mounted many times over.

Comment 4 Guohua Ouyang 2023-08-02 05:30:56 UTC
Leon, would you like to take a look at the bug?