[pve-devel] [PATCH] Add some extra debug information to the report.

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Jun 30 15:13:17 CEST 2016


> Wolfgang Link <w.link at proxmox.com> hat am 20. Juni 2016 um 16:22 geschrieben:
> 
> 
> There were no useful information about block device.
> ---
>  PVE/Report.pm | 31 ++++++++++++++++++++++++++++++-
>  1 file changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/PVE/Report.pm b/PVE/Report.pm
> index 4d15ef5..bfd0bd7 100644
> --- a/PVE/Report.pm
> +++ b/PVE/Report.pm
> @@ -23,6 +23,14 @@ my @cluster = ('pvecm nodes', 'pvecm status');
>  
>  my @bios = ('dmidecode -t bios');
>  
> +my @lv = ('lvs -a');
> +
> +my @lsblk = ('lsblk');
> +
> +my @vg = ('vgdisplay');
> +
> +my @multipath = ('multipath-tools -ll', 'multipath-tools -v3');
> +
>  if (PVE::pvecfg::version() >= 4.0) {
>      push @cluster, 'cat /etc/pve/corosync.conf 2> /dev/null' ;
>      push @machines, sub { dir2text('/etc/pve/lxc/', '\d.*conf') };
> @@ -62,7 +70,28 @@ my $bios_report = {
>      commands => \@bios,
>  };
>  
> -my @global_report = ($general_report, $storage_report, $volume_report, $net_report, $cluster_report, $bios_report);
> +my $lv_report = {
> +    title => 'info about logical Volumes',
> +    commands => \@lv,
> +};
> +
> +my $blk_report = {
> +    title => 'info about block devices',
> +    commands => \@lsblk,
> +};
> +
> +my $vg_report = {
> +    title => 'info about volume group',
> +    commands => \@vg,
> +};
> +
> +my $multipath_report = {
> +    title => 'info about dm-multipath',
> +    commands => \@multipath,
> +};
> +
> +my @global_report = ($general_report, $storage_report, $volume_report, $net_report, $cluster_report,
> +		     $bios_report, $lv_report, $blk_report, $vg_report, $multipath_report);
>  
>  # output the content of all the files of a directory
>  sub dir2text {
> -- 
> 2.1.4
> 

there already is an unused "@volumes":

my @volumes = ('lvdisplay', 'vgdisplay', 'zpool status', 'zfs list');

whereas the so-called "volume_report" uses @machines and displays VM information.

wouldn't it make more sense to combine your reports into the existing @volumes and actually use that?  or add a new ZFS report and remove the old @volumes? also, I'd prefer a more consistent ordering ('lsblk' first, then grouped by technology for example?). 

settling for either vgdisplay and lvdisplay or vgs and lvs might make sense too, and for completeness sake it might make sense to get PV information as well? pvs, vgs and lvs also offer complete control over what to display (e.g., '-o vg_all' to display all columns for vgs, but for lvs this might be a bit much).




More information about the pve-devel mailing list