Hi Torsten,
 
The disk information is calculated by function "save_partition_information" of '/usr/lib/systemimager/perl/SystemImager/Common.pm' in golden client.
 
FYI: xCAT imgcatpure will run SystemImager command "si_prepareclient" in golden client to calculate resource data of golden client.
"/usr/sbin/si_prepareclient"  script will call function "save_partition_information" of '/usr/lib/systemimager/perl/SystemImager/Common.pm" in golden client
 
I think the format of output of fdisk is out of support scope of "save_partition_information" function, So the disk size calculation went wrong.
 
If you read below code
----------------------
#vi  /usr/lib/systemimager/perl/SystemImager/Common.pm
    ......
    402 sub save_partition_information {
            ......
    569                         # 12345678901234567890123456789012345678901234567890123456789012345678901234567890
    570                         #     v5          v12         v12         v12                   v22
    571                         # 1234512345678901212345678901212345678901212345678901234567890121 -> to the end
    572                         # |    |           |           |           |                     |
    573                         # Minor    Start       End     Filesystem  Name                  Flags
    574                         # 1          0.017     20.000                                    boot, lba
    575                         # 2         21.000     40.000  FAT                               lba
    576                         # 3         41.000  17366.429                                    lba
    577                         #
------------------------
 
We can see the format is legacy format, there is specific line in your disk information
-------------------------
   Device Boot Start   End    MiB    #blocks   Id  System
/dev/sda1   *     1    200    200     204800   83  Linux
/dev/sda2       201  48200  48000   49152000   82  Linux swap / Solaris
/dev/sda3     48201  953836  905636  927371264   83  Linux
/dev/sda4         0      -      0          0    0  Empty
-------------------------
 
I though the column "Boot * " broken the calculate logic of function "save_partition_information"
------------------
#vi  /usr/lib/systemimager/perl/SystemImager/Common.pm
    608                         if (version_cmp($parted_version, '1.6.23') >= 0) {
    609                             ($minor, $startMB, $endMB, $junk, $leftovers) = split(/\s+/, $_, 5);
    610                         } else {
    611                             ($minor, $startMB, $endMB, $leftovers) = split(/\s+/, $_, 4);
    612                         }
-------------
 
Maybe you can refine "save_partition_information" function of Common.pm in golden client to satisfy your own environment.

Best Regards!
--------------------------------------------------------------
Hu, Wei Hua (胡卫华)
IBM China System Technology Laboratory
Email: huwei...@cn.ibm.com
Tel: 86-10-82453253
Address: Building 28, ZhongGuanCun Software Park,
No.8, Dong Bei Wang West Road, Haidian District Beijing 100193, PRC

北京市海淀区东北旺西路8号中关村软件园28号楼
邮编: 100193
 
 
----- Original message -----
From: Torsten Harenberg <harenb...@physik.uni-wuppertal.de>
To: xcat-user@lists.sourceforge.net
Cc:
Subject: [xcat-user] imgcapture: partition size captured wrong
Date: Sun, Feb 10, 2019 4:41 PM
 
Dear all,

we are new to xCAT, so please excuse if the questions are somehow
trivial. Actually we have three questions but I will put them into
different mails.

What we try to do:

We run a ~200 node cluster and install one node as golden (not deployed
through xCAT), then use imgcapture to pull it and deploy it onto the
others. We started with a CentOS 6.9 node (moving to CentOS 7 soon,
that's why we need a tool like xCAT now).

First problem occoured is that the partition, the node has:

[root@wnfg002 ~]# sfdisk -uM -l  /dev/sda

Disk /dev/sda: 121597 cylinders, 255 heads, 63 sectors/track
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/sda1   *     1    200    200     204800   83  Linux
/dev/sda2       201  48200  48000   49152000   82  Linux swap / Solaris
/dev/sda3     48201  953836  905636  927371264   83  Linux
/dev/sda4         0      -      0          0    0  Empty
[root@wnfg002 ~]#

During capture there was a message from the perl script:

[master]: wnfg002:
wnfg002: This client is ready to have its image retrieved.  You must now run
wnfg002: the "si_getimage" command on your imageserver.
wnfg002:
wnfg002: Automatically create configuration file for systemconfigurator:
wnfg002:   >> /etc/systemconfig/systemconfig.conf
[master]: Getting osimage "wnfg" from wnfg002 to cmu.
[master]: Argument "*" isn't numeric in numeric lt (<) at
/usr/lib/systemimager/perl/SystemImager/Server.pm line 575, <$TEMPLATE>
line 165.

And the 3rd partition (/dev/sda3) end up to be faulty in the deploy script:

 /install/sysclone/scripts/wnfg.master

logmsg "Creating partition ${DISK0}3."
START_MB=$END_OF_LAST_PRIMARY
END_MB=$(echo "scale=3; ($START_MB + 1)" | bc)

(the size should be 905635).

Of course I can patch the script, but maybe someone has an idea why the
size got determined wrongly (too large?)

xCAT version is 2.14.5

Kind regards,

  Torsten

--
Dr. Torsten Harenberg     harenb...@physik.uni-wuppertal.de
Bergische Universitaet
Fakultät 4 - Physik       Tel.: +49 (0)202 439-3521
Gaussstr. 20              Fax : +49 (0)202 439-2811
42097 Wuppertal


_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

 
 

_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to