| Summary: | drakdisk crashed (Illegal division by zero at diskdrake/interactive.pm line 1409, "/ $hd->cylinder_size" (really extent_size for LVs) | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Dave Hodgins <davidwhodgins> |
| Component: | RPM Packages | Assignee: | Thierry Vignaud <thierry.vignaud> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | thierry.vignaud |
| Version: | 4 | Keywords: | NEEDINFO |
| Target Milestone: | --- | ||
| Hardware: | i586 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | drakxtools-curses-16.26.12-1.mga4 | CVE: | |
| Status comment: | |||
| Attachments: |
Output of pvs and lvs commands
Output of vgdisplay, pvdisplay, lvdisplay and lvm2 vgs commands Compressed output of diskdrake &> /tmp/LOG.hd |
||
|
Description
Dave Hodgins
2015-02-16 17:36:56 CET
Created attachment 5922 [details]
Output of pvs and lvs commands
It fails when trying to divide by cylinder size, which for LVMs is implemented in lvm.pm:
sub cylinder_size {
my ($hd) = @_;
$hd->{extent_size};
}
So it looks like it fails to retrieve the extent size (which should be 4Mb)
Can you attach the output of pvdisplay, vgdisplay & lvdisplay?Keywords:
(none) =>
NEEDINFO
Thierry Vignaud
2015-02-18 16:55:18 CET
Summary:
drakdisk crashed (Illegal division by zero at diskdrake/interactive.pm line 1409, "/ $hd->cylinder_size") =>
drakdisk crashed (Illegal division by zero at diskdrake/interactive.pm line 1409, "/ $hd->cylinder_size" (really extent_size for LVs) Also, what's the output of: lvm2 vgs --noheadings --nosuffix --units s -o vg_extent_size <vg_name> which is how we retrieve the value (Just put the right VG name in place of "<vg_name>") Created attachment 5969 [details]
Output of vgdisplay, pvdisplay, lvdisplay and lvm2 vgs commands
One strange thing with the lvm2 vgs command for the vg 91. Even though the
output is being redirected to a file, for this one vg, the output still goes
to the terminal.
# lvm2 vgs --noheadings --nosuffix --units s -o vg_extent_size 91>>lvm.txt 2>&1
File descriptor 91 (/root/lvm.txt) leaked on lvm2 invocation. Parent PID 12702: -bash
Logging initialised at Sun Mar 1 14:40:03 2015
Set umask from 0022 to 0077
vgs Finding all volume groups
vgs Finding volume group "bk"
vgs Finding volume group "91"
vgs Finding volume group "a8"
vgs 8192
vgs 8192
vgs 8192
vgs Wiping internal VG cache
Also note that the logical volumes 91-data and bk-data are luks file system
base devices.
Sorry for the delay responding.
That's b/c as "91" is a number, it's interpreted as file descriptor by bash.
Adding a space between "91" & ">>" would have fixed that.
Can you try altering "sub cylinder_size" in /usr/lib/libDrakX/lvm.pm?
As root, change:
sub cylinder_size {
my ($hd) = @_;
$hd->{extent_size};
}
into:
sub cylinder_size {
my ($hd) = @_;
use Data::Dumper; warn Dumper $hd;
$hd->{extent_size};
}
Then run "diskdrake &> /tmp/LOG.hd" and attach the resulting file
(In reply to Thierry Vignaud from comment #5) > That's b/c as "91" is a number, it's interpreted as file descriptor by bash. > Adding a space between "91" & ">>" would have fixed that. Ahh. Thanks for that. > Can you try altering "sub cylinder_size" in /usr/lib/libDrakX/lvm.pm? > As root, change: > into: > sub cylinder_size { > my ($hd) = @_; > use Data::Dumper; warn Dumper $hd; > $hd->{extent_size}; > } > Then run "diskdrake &> /tmp/LOG.hd" and attach the resulting file Tried that. /tmp/LOG.hd was empty. I'll attach the output that went to the terminal, though I don't think there's anything new in it. Created attachment 5974 [details]
Compressed output of diskdrake &> /tmp/LOG.hd
Sg has changed and diskdrake fails to parse lvm2 output:
'VG_name' => 'pvs',
///\\\
I failed to reproduce. The output in comment #4 shows that you altered /etc/lvm/lvm.conf in order to make all lvm commands very verbose by default, which breaks tools that try parse their output. Status:
NEW =>
RESOLVED Thanks. diskdrake is working now. I don't remember having changed the verbose setting, though as the 91 and bk volume groups were created for Mandriva 2009.1, it's quite probable I did change it, and have simply forgotten having done so. |