| 105 |
} |
} |
| 106 |
|
|
| 107 |
# try a partition |
# try a partition |
| 108 |
elsif ($dev =~ m{^(/dev/i2o/hd[a-t]|cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|ataraid/d\d|sd[a-t]|hd[a-t])p?(\d+)$}) { |
elsif ($dev =~ m{^(/dev/(i2o/hd[a-t]|cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|ataraid/d\d|sd[a-t]|hd[a-t]))p?(\d+)$}) { |
| 109 |
|
|
| 110 |
# the size is configured, return it |
# the size is configured, return it |
| 111 |
defined ($FAI::configs{"PHY_$1"}{partitions}{$2}{size}{eff_size}) |
defined ($FAI::configs{"PHY_$1"}{partitions}{$3}{size}{eff_size}) |
| 112 |
and return $FAI::configs{"PHY_$1"}{partitions}{$2}{size}{eff_size} / |
and return $FAI::configs{"PHY_$1"}{partitions}{$3}{size}{eff_size} / |
| 113 |
(1024 * 1024); |
(1024 * 1024); |
| 114 |
|
|
| 115 |
# the size is known from the current configuration on disk, return it |
# the size is known from the current configuration on disk, return it |
| 116 |
defined ($FAI::current_config{$1}{partitions}{$2}{count_byte}) |
defined ($FAI::current_config{$1}{partitions}{$3}{count_byte}) |
| 117 |
and return $FAI::current_config{$1}{partitions}{$2}{count_byte} / |
and return $FAI::current_config{$1}{partitions}{$3}{count_byte} / |
| 118 |
(1024 * 1024); |
(1024 * 1024); |
| 119 |
|
|
| 120 |
# the size is not known (yet?) |
# the size is not known (yet?) |