Bug 1462189
Summary: | ReaR cannot create ISO images larger than 4GB due to Red Hat change that removes mkisofs | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | afox <afox> | |
Component: | rear | Assignee: | Pavel Cahyna <pcahyna> | |
Status: | CLOSED ERRATA | QA Contact: | David Jež <djez> | |
Severity: | urgent | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 7.3 | CC: | djez, jentrena, ovasik, pcahyna, pdwyer, phracek, tbowling | |
Target Milestone: | rc | Keywords: | Reopened | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1726043 (view as bug list) | Environment: | ||
Last Closed: | 2019-08-06 13:12:05 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 1638857 | |||
Bug Blocks: | 1473612, 1630904, 1630910, 1630919, 1660473 |
Description
afox@redhat.com
2017-06-16 12:04:22 UTC
This is not a rear issue. It is a behaviour of genisoimage package. Nothing I can do. Jakub Re-assigning to cdrkit (genisoimage) as per comment 2. genisoimage has switch -allow-limited-size which creates hybrid UDF/ISO9660 filesystem where size info is correct only on UDF metadata and big files are truncated on ISO9660 metadata. Resulting filesystem has to be mounted as UDF but it can represent files greater than 4GiB. Can it be used by ReaR? # rear -v mkbackup Relax-and-Recover 1.17.2 / Git Using log file: /var/log/rear/rear-rhel7a34.log Creating disk layout Creating root filesystem layout Copying files and directories Copying binaries and libraries Copying kernel modules Creating initramfs Encrypting disabled Creating tar archive '/tmp/rear.zh4FTegowf9b0il/tmp/isofs/backup//backup.tar.gz' Archived 4753 MiB [avg 5921 KiB/sec]OK Archived 4753 MiB in 823 seconds [avg 5914 KiB/sec] Making ISO image ERROR: Could not create ISO image (with /bin/mkisofs) Aborting due to an error, check /var/log/rear/rear-rhel7a34.log for details Terminated # cat /var/log/rear/rear-rhel7a34.log 2017-07-18 13:40:12 Relax-and-Recover 1.17.2 / Git 2017-07-18 13:40:12 Command line options: /usr/sbin/rear -v mkbackup [...] 2017-07-18 13:55:50 Including output/ISO/Linux-i386/81_prepare_multiple_iso.sh 2017-07-18 13:55:50 Including output/ISO/Linux-i386/82_create_iso_image.sh 2017-07-18 13:55:50 Starting '/bin/mkisofs' 2017-07-18 13:55:50 Making ISO image genisoimage 1.1.11 (Linux) Scanning . Scanning ./backup File ./backup/backup.tar.gz is larger than 4GiB-1. -allow-limited-size was not specified. There is no way do represent this file size. Aborting. 2017-07-18 13:55:50 ERROR: Could not create ISO image (with /bin/mkisofs) === Stack trace === Trace 0: /usr/sbin/rear:252 main Trace 1: /usr/share/rear/lib/mkbackup-workflow.sh:22 WORKFLOW_mkbackup Trace 2: /usr/share/rear/lib/framework-functions.sh:70 SourceStage Trace 3: /usr/share/rear/lib/framework-functions.sh:31 Source Trace 4: /usr/share/rear/output/ISO/Linux-i386/82_create_iso_image.sh:17 source Trace 5: /usr/share/rear/lib/_input-output-functions.sh:132 StopIfError Message: Could not create ISO image (with /bin/mkisofs) # man genisoimage [...] -allow-limited-size When processing files larger than 2GiB which cannot be easily represented in ISO9660, add them with a shrunk visible file size to ISO9660 and with the correct visible file size to the UDF system. The result is an inconsistent filesystem and users need to make sure that they really use UDF rather than ISO9660 driver to read a such disk. Implies enabling -udf. (In reply to Vaclav Dolezal from comment #4) > Resulting filesystem has to be mounted as UDF > but it can represent files greater than 4GiB. > > Can it be used by ReaR? Hi, please, how exactly is mkisofs invoked by rear? (Is it written somewhere in that /var/log/rear/rear-rhel7a34.log?) /usr/share/rear/output/ISO/Linux-i386/82_create_iso_image.sh : 13 $ISO_MKISOFS_BIN $v -o "$ISO_DIR/$ISO_PREFIX.iso" -b isolinux/isolinux.bin -c isolinux/boot.cat \ 14 -no-emul-boot -boot-load-size 4 -boot-info-table \ 15 -R -J -volid "$ISO_VOLID" $EFIBOOT -v -iso-level 3 . >&8 16 ##-R -J -volid "$ISO_VOLID" $EFIBOOT "${ISO_FILES[@]}" >&8 Btw, in RHEl mkisofs is actually genisoimage: # which mkisofs /usr/bin/mkisofs # ls -l /usr/bin/mkisofs lrwxrwxrwx. 1 root root 25 Jul 18 12:51 /usr/bin/mkisofs -> /etc/alternatives/mkisofs # ls -l /etc/alternatives/mkisofs lrwxrwxrwx. 1 root root 20 Jul 18 12:51 /etc/alternatives/mkisofs -> /usr/bin/genisoimage Trying to include a large file into the initrd results in a small iso that does not contain that file. 900_create_initramfs.sh contains: find . ! -name "*~" |\ tee /dev/fd/8 |\ cpio -H newc --create --quiet |\ gzip > "$TMP_DIR/initrd.cgz" That does not check for errors much. It leaves an error message in the log and continues with an incomplete archive: "cpio: usr/share/rear/dummy.bin: field width not sufficient for storing file size" Libarchive man page says: "SVR4/newc ... The SVR4 format uses eight-digit hexadecimal values for all header fields. This limits file size to 4GB, and also limits the mtime and other fields to 32 bits." As Vaclav says, -allow-limited-size creates an udf filesystem. I was not able to boot it. Booting it as iso9660 leads to kernel panic. Please give me a hint if you can boot from it properly as udf. Reading it as udf on a working machine works well. Xorrisofs (insteat of genisoimage) seems to create a correct 6GB large iso9660 image. But I am not able to boot it either. Virtual machine with 16GB of ram reports "not enough memory" in the middle of loading initrd. Again, please give me a hint if you know possible reasons. (In reply to Frantisek Kluknavsky from comment #10) > Xorrisofs (insteat of genisoimage) seems to create a correct 6GB large > iso9660 image. But I am not able to boot it either. Thanks for the suggestion on Xorrisofs, I can confirm that with rear-2.00-2.el7 (included in RHEL 7.4) and xorriso 1.3.6 I can successfully produce a single, larger than 4GB ISO image: # rear -v mkbackup Relax-and-Recover 2.00 / Git Using log file: /var/log/rear/rear-rhel7a34.log Using backup archive '/tmp/rear.GG8Nc1BZhpqCqhZ/tmp/isofs/backup/backup.tar.gz' Creating disk layout Creating root filesystem layout Copying logfile /var/log/rear/rear-rhel7a34.log into initramfs as '/tmp/rear-rhel7a34-partial-2017-07-31T10:07:34+0000.log' Copying files and directories Copying binaries and libraries Copying kernel modules Creating initramfs Creating tar archive '/tmp/rear.GG8Nc1BZhpqCqhZ/tmp/isofs/backup/backup.tar.gz' Archived 5715 MiB [avg 5600 KiB/sec] OK Archived 5715 MiB in 1046 seconds [avg 5594 KiB/sec] Making ISO image Wrote ISO image: /var/lib/rear/output/rear-rhel7a34.iso (5.8G) Copying resulting files to file location Saving /var/log/rear/rear-rhel7a34.log as rear-rhel7a34.log to file location # ls -lh /var/lib/rear/output total 5.8G -rw-------. 1 root root 5.8G Jul 31 10:40 rear-rhel7a34.iso I can also confirm that I can successfully boot and restore from the produced ISO image. Looking at a RHEL 7.4 system, I see /usr/bin/mkisofs is provided by the genisoimage package. I am not sure if this is a new addition or not. Could we please verify that ReAR is able to use the mkisofs provided and resolves the core issue? [root@rhel7 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.4 (Maipo) [root@rhel7 ~]# yum list genisoimage Loaded plugins: product-id, search-disabled-repos, subscription-manager Installed Packages genisoimage.x86_64 1.1.11-23.el7 @rhel-7-server-eus-rpms [root@rhel7 ~]# rpm -ql genisoimage |grep mkiso /usr/bin/mkisofs ReaR is using genisoimage via the /usr/bin/mkisofs alias. genisoimage can not create ISO images that contain files larger than 4GB. Workaround is to use ReaR option ISO_MAX_SIZE= to limit the size of the built-in backup tarball to avoid the problem. Solution would be to replace genisoimage by xorriso, which is already included in Fedora and able to create ISO images with files > 4GB. As a solution, until xorriso is added to RHEL, one can install xorriso from EPEL. No changes in ReaR should be needed to use it, as noted above, ReaR prefers xorrisofs even if both xorriso and genisoimage or mkisofs are installed. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:2273 |