Linux ghost reports image file is corrupt
search cancel

Linux ghost reports image file is corrupt

book

Article ID: 215928

calendar_today

Updated On:

Products

Ghost Solution Suite

Issue/Introduction

Creating an image via the command:

/usr/local/bin/ghost -CLONE,MODE=CREATE,SRC=1,DST=/mnt/TMP/Images/image1.gho -SPLIT=4096 -SEEKUNSAFE -SURE -BLIND 2>&1

without issue and chkimg also completes with no issues.

Take that image and attempt to restore/deploy to a new server via the command:

/usr/local/bin/ghost -CLONE,MODE=RESTORE,SRC=/mnt/TMP/Images/image1.gho,DST=1,szeL -SURE -BLIND 2>&1

Ghost reports:

Broadcom Ghost 12.0.0.11233 Copyright (C) 2020 Broadcom Inc. All rights reserved.
No smart header found
Finished.
ABORT: 10025, Header of Ghost image file is corrupted

This does not happen all the time, but does appear to happen only on systems with large disks: Greater than 3TB

In troubleshooting the first issue, found that removing -SEEKUNSAFE from the capture command, stopped Ghost from reporting the “No smart header found” error during deployment of the image.  However, we started seeing a new issue during chkimg after a fresh capture.

/usr/local/bin/ghost -CLONE,MODE=CREATE,SRC=1,DST=/mnt/TMP/Images/image1.gho -SPLIT=4096 -SURE -BLIND 2>&1

completes, but then during the chkimg phase, ghost reports:

Bad magic 1
Bad Image Header: Expecting type:5 (412)
Bad image file[360]:Dlen: 24944, Dtype: 28270, Position: 21467240
Image file corrupt: [360] (487)
Verify complete
ABORT: 1498, Image file FAILED integrity check

Found this only happens when capturing servers with CentOS and Red Hat using XFS on 1920GB Solid State Disks. (960GB SSDs work fine)
It also only happens when the script is run via systemd (If you execute the script by hand, it works fine. If you manually run the chkimg, it works fine. Ghost reports no issue during capture or chkimg.)

The live environment used to create and deploy images is based on CentOS 8.  It was found this issue (second issue) is NOT present when the live environment is using kernel 4.18.0-193.28.1.el8_2.x86_64 but is present with kernels 4.18.0-240.15.1.el8_3.x86_64 and 4.18.0-240.22.1.el8_3.x86_64

 

Environment

GSS 3.3 RU4, RU5, RU6, RU7

Cause

Known Issue. Fixed work with large 512bit block size xfs volumes. We fixed raw image restore.

Resolution

A fix for this has been added to GSS 3.3 RU8 release and later.