From ed46708b99754cdd67c6686424e4d68d6b44964b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 27 Nov 2015 21:44:47 -0800 Subject: [PATCH] If a whole disk is already used in a RAID, don't offer to add partitions https://github.com/webmin/webmin/issues/269 --- raid/raid-lib.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raid/raid-lib.pl b/raid/raid-lib.pl index a7db38712..c3b4cb90c 100755 --- a/raid/raid-lib.pl +++ b/raid/raid-lib.pl @@ -647,8 +647,8 @@ local @disks; local $d; foreach $d (&fdisk::list_disks_partitions()) { foreach $p (@{$d->{'parts'}}) { - next if ($used{$p->{'device'}} || $p->{'extended'} || - $skip{$p->{'device'}}); + next if ($used{$p->{'device'}} || $used{$d->{'device'}} || + $p->{'extended'} || $skip{$p->{'device'}}); local @st = &device_status($p->{'device'}); next if (@st); $tag = $p->{'type'} ? &fdisk::tag_name($p->{'type'}) : undef;