summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-04-15 07:07:51 +0000
committerThierry Vignaud <tv@mageia.org>2013-04-15 07:07:51 +0000
commit419080d746b306e5ba6d39ebe19d0a2c84233bc0 (patch)
treee2563a7a634b76458e1bd1976bac2dfcdcc04cfd
parent072d52e000c110d491b1bb76e9697e04b1f341f8 (diff)
downloaddrakx-backup-do-not-use-419080d746b306e5ba6d39ebe19d0a2c84233bc0.tar
drakx-backup-do-not-use-419080d746b306e5ba6d39ebe19d0a2c84233bc0.tar.gz
drakx-backup-do-not-use-419080d746b306e5ba6d39ebe19d0a2c84233bc0.tar.bz2
drakx-backup-do-not-use-419080d746b306e5ba6d39ebe19d0a2c84233bc0.tar.xz
drakx-backup-do-not-use-419080d746b306e5ba6d39ebe19d0a2c84233bc0.zip
retrieve minor/major for LVs too
thus fixing comparing in fs::get::is_same_hd(): 'device_alias' => 'mapper/vg--mga-root', with: 'device' => 'vg-mga/root', thus fixing removing LVM entries when saving /etc/fstab (mga#5811) (backported from trunk)
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/lvm.pm3
2 files changed, 4 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 63c5209d0..9c8569a58 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,4 +1,5 @@
- diskdrake:
+ o fix removing LVM entries when saving /etc/fstab (mga#5811)
o offer resizing NTFS again (broken by ntfsprogs -> ntfs-3g switch)
- drakclock:
o do not crash if timezones cannot be listed (mga#6787)
diff --git a/perl-install/lvm.pm b/perl-install/lvm.pm
index e2eeb4cdc..5bca97af9 100644
--- a/perl-install/lvm.pm
+++ b/perl-install/lvm.pm
@@ -119,10 +119,13 @@ sub get_lvs {
[
map {
my $device = "$lvm->{VG_name}/$_";
+ my $p = fs::wild_device::to_subpart("/dev/$device");
my $part = {
device => $device,
lv_name => $_,
rootDevice => $lvm->{VG_name},
+ minor => $p->{minor},
+ major => $p->{major},
size => get_lv_size($device) };
if (my $type = -e "/dev/$device" && fs::type::type_subpart_from_magic($part)) {
put_in_hash($part, $type);