Discussion:
[Sisuite-devel] [Sisuite-users] PowerEdge 2850 - can't install image - systemimager-server-3.7.5-1 SCSI controller not found
Andrea Righi
2007-03-05 09:19:24 UTC
Permalink
Jonathan,

sorry I see your mail only now... anyway, I think the problem you quote
is a different issue. In that case the partitioning schema was not saved
<disk dev="/dev/sda" label_type="msdos" unit_of_measurement="MB">
<!--
This disk's output was brought to you by the partition tool
"parted",
and by the numbers 4 and 5 and the letter Q.
-->
</disk>
In your case the partition sizes differ from the values in
autoinstallscript.conf and the real values that you can see in your
imaged clients.

I've a RHEL4 installed via systemimager and it seems that the problem
occurs also in my case. I think the reason is that parted (<1.6.23)
prints in output values in MB considering 1MB = 1000KB and accepts in
input values in MB with 1MB = 1024KB.

For example in my case the first partition is:

<part num="1" size="91.858" p_type="primary" p_name="-" flags="boot" />

And in a generic installed client I can see:

# parted -s /dev/sda print
Disk geometry for /dev/sda: 0.000-70006.835 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.000 87.603 primary ext3 boot
...

In fact 92.858 * 1000 / 1024 = 89.705, that is really close to 87.603...

I'll investigate ASAP, I need to do some tests with other versions of
parted to see if the behaviour is the same...

Thanks for reporting,
-Andrea
Hi Andrea,
I found this topic when researching a problem we are having with
"In lib/Systemimager/Common.pm the version of parted is not detected
properly. Since the output of parted changed from version 1.6.23 we need
to check if the version installed in the client is older or not. In the
check we perform a string comparison that is wrong, because it's
compared in ASCII and not using the numeric values. For example in your
case '1.6.3' > '1.6.23', that it's not what we mean..."
The problem we are having is that we use Redhat Enterprise 4 (and some
# parted -v
GNU Parted 1.6.19
As you note, parted output changed with version 1.6.23. We did not know
this initially and we were seeing partition size differences from the
image that was taken on the golden client to what was actually on imaged
on to the destination client and thought that the problem was with the
client using sfdisk instead of parted (and it still does if i386). We
manually changed the client to use parted exclusively but saw the same
problem/issue.
I just did install 3.8.0, which has your bug fix for parted, on our test
server and a test client and am seeing the same results/problem after
taking an image and then applying it to another host. The image appears
to have the right partitioning size scheme in the autoinstallscript.conf
and the actual script, but when the imaged system comes up, the size of
the partitions is always off (smaller then they should be).
We are wondering why more Redhat users aren't seeing this behavior? Is
it just us? Do you have any ideas?
thanks
Jonathan
Andrea Righi
2007-03-07 11:47:03 UTC
Permalink
Post by Andrea Righi
In your case the partition sizes differ from the values in
autoinstallscript.conf and the real values that you can see in your
imaged clients.
I've a RHEL4 installed via systemimager and it seems that the problem
occurs also in my case. I think the reason is that parted (<1.6.23)
prints in output values in MB considering 1MB = 1000KB and accepts in
input values in MB with 1MB = 1024KB.
Jonathan,

the following patch fixes the problem in my case. I have already checked
it in the trunk. The fix will be included in the next 3.8.1 release.

It would be great if you could test it also in your environment...

Regards,
-Andrea

Index: lib/SystemImager/Common.pm
===================================================================
--- lib/SystemImager/Common.pm (revision 3959)
+++ lib/SystemImager/Common.pm (working copy)
@@ -10,6 +10,7 @@
package SystemImager::Common;

use strict;
+use POSIX qw/ceil/;
use vars qw($version_number $VERSION);

$version_number="SYSTEMIMAGER_VERSION_STRING";
@@ -537,6 +538,16 @@
$startMB =~ s/(\d+)MB/$1/go;
$endMB =~ s/(\d+)MB/$1/go;

+ # Fix partition size with old versions of parted.
+ if (version_cmp($parted_version, '1.6.23') < 0) {
+ if ($startMB) {
+ $startMB = ceil($startMB * 1024 * 1024 / 1000 / 1000);
+ }
+ if ($endMB) {
+ $endMB = ceil($endMB * 1024 * 1024 / 1000 / 1000);
+ }
+ }
+
#
# Get rid of parted's fs info. We don't use it. But we do need
# 'name' and 'flags', and it's a pain in the but to parse this
@@ -596,6 +607,16 @@
$startMB =~ s/(\d+)MB/$1/go;
$endMB =~ s/(\d+)MB/$1/go;

+ # Fix partition size with old versions of parted.
+ if (version_cmp($parted_version, '1.6.23') < 0) {
+ if ($startMB) {
+ $startMB = ceil($startMB * 1024 * 1024 / 1000 / 1000);
+ }
+ if ($endMB) {
+ $endMB = ceil($endMB * 1024 * 1024 / 1000 / 1000);
+ }
+ }
+
#
# Get rid of parted's fs info. We don't use it. But we do need
# 'name' and 'flags', and it's a pain in the but to parse this
Jonathan Auerbach
2007-03-08 08:49:12 UTC
Permalink
Andrea,

Applied the patch and it worked perfectly on a couple test systems.

Thanks!

Jonathan
Post by Andrea Righi
Jonathan,
the following patch fixes the problem in my case. I have already checked
it in the trunk. The fix will be included in the next 3.8.1 release.
It would be great if you could test it also in your environment...
Regards,
-Andrea
Index: lib/SystemImager/Common.pm
===================================================================
--- lib/SystemImager/Common.pm (revision 3959)
+++ lib/SystemImager/Common.pm (working copy)
@@ -10,6 +10,7 @@
package SystemImager::Common;
use strict;
+use POSIX qw/ceil/;
use vars qw($version_number $VERSION);
$version_number="SYSTEMIMAGER_VERSION_STRING";
@@ -537,6 +538,16 @@
$startMB =~ s/(\d+)MB/$1/go;
$endMB =~ s/(\d+)MB/$1/go;
+ # Fix partition size with old versions of parted.
+ if (version_cmp($parted_version, '1.6.23') < 0) {
+ if ($startMB) {
+ $startMB = ceil($startMB * 1024 * 1024 / 1000 / 1000);
+ }
+ if ($endMB) {
+ $endMB = ceil($endMB * 1024 * 1024 / 1000 / 1000);
+ }
+ }
+
#
# Get rid of parted's fs info. We don't use it. But we do need
# 'name' and 'flags', and it's a pain in the but to parse this
@@ -596,6 +607,16 @@
$startMB =~ s/(\d+)MB/$1/go;
$endMB =~ s/(\d+)MB/$1/go;
+ # Fix partition size with old versions of parted.
+ if (version_cmp($parted_version, '1.6.23') < 0) {
+ if ($startMB) {
+ $startMB = ceil($startMB * 1024 * 1024 / 1000 / 1000);
+ }
+ if ($endMB) {
+ $endMB = ceil($endMB * 1024 * 1024 / 1000 / 1000);
+ }
+ }
+
#
# Get rid of parted's fs info. We don't use it. But we do need
# 'name' and 'flags', and it's a pain in the but to parse this
Loading...