Bug 19281 - Überprüfung der verfügbaren Größe im Pool
Überprüfung der verfügbaren Größe im Pool
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 2.4
Other Linux
: P2 enhancement (vote)
: UCS 3.2
Assigned To: Philipp Hahn
Moritz Muehlenhoff
: interim-1
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-06 17:12 CEST by Andreas Büsching
Modified: 2013-11-19 06:42 CET (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Büsching univentionstaff 2010-08-06 17:12:25 CEST
Aus Bug #18611:

Folgendes ist mir bisher aufgefallen:

das Anlegen eines zu großen Festplattenimages funktioniert ohne Überprüfung (im
Test 5TB) und wurde angelegt.

Im Anschluss wird mir in der UMC die Größe als "unbekannt" angezeigt.

via virsh:
root@member-kvm:~# virsh vol-info /var/lib/libvirt/images/winxp-2-2.img
Name:           winxp-2-2.img
Type:           file
Capacity:       0,00
Allocation:     0,00

Nach kurzen Tests stellt sich heraus, dass dieses Phänomen ab 2TB auftritt,
1,9TB werden noch "richtig" angelegt.
Sollte es sich hierbei um eine eingebaute Limitierung auf seiten von Libwirt
handeln, wäre es evt. auch wünschenswert, dass dies direkt im UMC-Modul
abgefangen wird (wie generell ein Image, welches "zu groß" ist - d.h. es
übersteigt den physikalisch verfügbaren Bereich)

Das ist nicht ganz so einfach:

Theoretisch kein Problem, aber leider sind die Infos von libvirt zur Größe des Pools bzw. des verfügbaren Platzes gelogen:

root@xen1:~# virsh pool-info default
Name:           default
UUID:           f8dfb0b2-6c8a-508b-6913-7ed41c38ecb4
State:          running
Persistent:     yes
Autostart:      yes
Capacity:       141,35 GB
Allocation:     108,63 GB
Available:      32,72 GB

root@xen1:~# df . -h
Dateisystem          Größe Benut  Verf Ben% Eingehängt auf
/dev/mapper/vg_ucs-rootfs
                      142G  109G   26G  81% /
Comment 1 Philipp Hahn univentionstaff 2010-12-07 08:22:30 CET
(In reply to comment #0)
> Theoretisch kein Problem, aber leider sind die Infos von libvirt zur Größe des
> Pools bzw. des verfügbaren Platzes gelogen:
> 
> root@xen1:~# virsh pool-info default
> Capacity:       141,35 GB
> Allocation:     108,63 GB
> Available:      32,72 GB
> 
> root@xen1:~# df . -h
> Dateisystem          Größe Benut  Verf Ben% Eingehängt auf
> /dev/mapper/vg_ucs-rootfs
>                       142G  109G   26G  81% /

Siehe <https://www.redhat.com/archives/libvir-list/2010-December/msg00186.html>:
`virsh` gibt die Größe des freien Speichers inklusive des für normalerweise root reservierten Speichers aus:
# tune2fs -l /dev/vg_ucs/rootfs | grep Reserved
Reserved block count:     712294
Reserved GDT blocks:      1020
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)

`df` auf der anderen Seite zeigt nur den für jedermann verfügbaren Speicher an.
Comment 2 Philipp Hahn univentionstaff 2013-06-04 16:45:54 CEST
libvirt-0.9.12 hat keine Größenbeschränkung:

# qemu-img create -f qcow2 /var/lib/libvirt/images/5t.qcow2 5T
# virsh pool-refresh default
# virsh vol-info /var/lib/libvirt/images/5t.qcow2
Name:           5t.qcow2
Type:           file
Capacity:       5,00 TiB
Allocation:     212,00 KiB
# virsh pool-info default
Name:           default
UUID:           e6fd2acc-72b7-3796-34e2-dc5d29e58448
State:          running
Persistent:     yes
Autostart:      yes
Capacity:       196,86 GiB
Allocation:     110,46 GiB
Available:      86,41 GiB

Der freie Platz sollte trotzdem pro Storage-Pool angezeigt werden.
Eine Überprüfung des freien Platzes ist wegen Sparse-Dateien ggf. nicht so sinnvoll; ggf. sollte dann nur eine Warnung angezeigt werden, die der Benutzer ignorieren kann.
Comment 3 Philipp Hahn univentionstaff 2013-07-25 20:11:24 CEST
Beim Anlegen wird jetzt eine Warnung eingeblendet, die man aber einfach ignorieren kann, da sowohl qcow2- alsauch raw-Dateien als "sparse" angelegt werden.

svn42784,2783,42782,42781
univention-virtual-machine-manager-daemon_3.0.6-1.458.201307252006

ChangeLog:
A warning is printed when the size for a new storage volume exceeds the available size in the storage pool
Comment 4 Moritz Muehlenhoff univentionstaff 2013-08-14 12:08:05 CEST
As discussed: The German warning which is displayed if a new drive is added is bigger than the standard dialogue box. (With Firefox, on Chrome the layout is fine)

The functionality itself has been successfully tested with Qcow2 on KVM and raw devices on Xen. The warning messages in English and German are also ok.

In the drive settings the avaialable disk space is now shown with correct values.

Changelog entry exists, it would be good to also mention that the free disk space is now shown in the disk settings.
Comment 5 Philipp Hahn univentionstaff 2013-08-14 12:50:25 CEST
(In reply to Moritz Muehlenhoff from comment #4)
> As discussed: The German warning which is displayed if a new drive is added
> is bigger than the standard dialogue box. (With Firefox, on Chrome the
> layout is fine)

Firefox needs more space to render the dialog: height+=40px

> Changelog entry exists, it would be good to also mention that the free disk
> space is now shown in the disk settings.

+When creating a new storage volume, the available storage size is shown for each storage pool.

svn43152
univention-virtual-machine-manager-daemon_3.0.6-8.465.201308141246
Comment 6 Moritz Muehlenhoff univentionstaff 2013-08-14 13:03:52 CEST
The dialogue is ok now.
Comment 7 Stefan Gohmann univentionstaff 2013-11-19 06:42:00 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".