Image Upload: Shrinking EXT File System Fails

  1. 5 months ago

    Hello!

    I am using CloneDeploy 1.2.0 installed on a Ubuntu 16.04 base. After installing, I successfully PXE booted a client (Lenovo ThinkPad laptop) from the network and using the OnDemand menu, I tried to upload the image of the client to the server (On Demand > Upload > New Image). However, when it reached the point where it tried to shrink the filesystem, it threw a syntax error. The client HDD has a fresh install of Ubuntu GNOME 16.10 and nothing else on it. The error it threw was:

    expr: syntax error
    expr: syntax error
    Warning, EXT File System Did Not Shrink Properly.
    /bin/cd_pull: line 354: * 1000 * 1000 : syntax error: operand expected (error token is "* 1000 * 1000")

    I have tried pre-creating the image from the web interface and forcing it as Block mode with linux environment, but the same issue occurs.

  2. clonedeploy

    Apr 3 Administrator

    I need some of the system info to see what's happening. In the image profile->upload options->select only upload image schema. Upload the image again, and attach the log.

  3. Thanks for the quick response! My bad, I should have pulled the logs. After setting the image profile to schema only, the same error occurred. I have attached the log files from the client. (There were no log files in /var/www/html/clonedeploy/private/logs on the server side.)

  4. As an aside, I tried applying the 1.2.1 patch and updating to the 4.9.8 kernel, but to no avail.

  5. clonedeploy

    Apr 3 Administrator

    Thanks for the logs. This is unusual. It seems like there may be something wrong with the superblock of /dev/sda1. Possibly the filesystem is corrupt. As far as I can tell, all of or 2 of these 3 commands are failing.

    resize2fs -P /dev/sda1
    dumpe2fs -h /dev/sda1
    partclone.extfs -SIic -s /dev/sda1 -O /dev/null

    The only association among these commands is that they all read the superblock

  6. So, I booted the client to the CloneDeploy client console and ran e2fsck on /dev/sda1, and it threw the following error:

    /dev/sda1 has unsupported feature(s): metadata_csum
    e2fsck: Get a newer version of e2fsck!
  7. Edited 5 months ago by glmdev

    Is it possible that the partclone (or e2fsprogs) tools aren't new enough to support Metadata Checksums (Linux 3.6+)?

  8. clonedeploy

    Apr 3 Administrator

    It looks that way. After doing a bit of research it appears that ubuntu 16.10 now has this on by default. I will need to recompile partclone against the newest e2fsprogs and release a patch. Will require significant testing before releasing the patch. I'll probably need a week or so. Thanks for the info

  9. No problem, thanks for the help!

  10. clonedeploy

    Apr 4 Administrator

    Looks like updating e2fsprogs was all that was needed. You can give it a try if you'd like.
    http://docs.clonedeploy.org/1.2.2/initrd.xz

    Overwrite the existing file in your tftp folder/images

  11. 3 months ago

    Hi! Sorry to reopen this, but I am still having issues with this. Sorry for the delay, I needed to deploy an image, so I have been using Ubuntu 16.04 instead. It turns out that the original error was actually 2 separate errors. The 1.2.2 initrd.xz image with the updated e2fsprogs fixed the "EXT filesystem did not shrink properly" error, however the installer still fails with:

    /bin/cd_pull: line 377: * 1000 * 1000 : syntax error: operand expected (error token is "* 1000 * 1000")

    I'm not exactly sure what is causing this to fail with 16.10 and above when it works with 16.04, but opening the file shows that it occurs in the following code block:

        volume_size=$(( $volume_size * 1000 * 1000 ))
            volume_size=$(( $volume_size / 1024 / 1024 ))
            volume_used_mb=$(( $volume_used_mb * 1000 * 1000 ))
            volume_used_mb=$(( $volume_used_mb / 1024 / 1024 ))

    in the /bin/cd_pull file.

  12. clonedeploy

    Jun 1 Administrator

    I'll need to look into this some more. All my tests with 16.10 have been successful since updating e2fsprogs. The error is most likely coming from partclone. I use a slightly modified version to get the used block size or volume size. It's probably failing for some reason and leaving the volume size empty and then failing when trying to multiply the empty value by 1000.

 

or Sign Up to reply!