4.15. Appendix - Building Red Hat Gluster Storage Compute Engine Image from Scratch


It is possible to deploy an existing Red Hat Enterprise Linux public image and perform a layered install of Red Hat Gluster Storage. This creates an effective "double charge" for each Red Hat Enterprise Linux instance.

Note

Google Compute Engine charges a premium fee for using a public Red Hat Enterprise Linux image for instances in order to cover the expense of the Red Hat subscription.
When deploying a layered install, you must re-register the instances with Red Hat Subscription Manager, thus consuming a Red Hat Enterprise Linux entitlement that you have paid for separately. After registering with Subscription Manager, however, Google Compute Engine will continue to charge the premium fee for the instances.
To avoid this, we will build a custom image, which will not be subject to the Google Compute Engine premium fee. For infomration on building a custom image from scratch, see https://cloud.google.com/compute/docs/tutorials/building-images.
Using your local virtualization manager, create a virtual machine with a RAW format sparse flat-file backing the system disk. The suggested minimum disk size for the Red Hat Gluster Storage 3.4 (and later) system disk is 20 GB and the maximum disk size for import into Google Compute Engine is 100 GB. Google Compute Engine additionally requires the disk size be in whole GB increments, that is, 20 GB or 21 GB, but not 20.5 GB. The RAW disk file should have the disk.raw file name. The disk.raw file must include an MS-DOS (MBR) partition table.
For example, run the following dd command to create a 20 GB sparse file to serve as the RAW disk image:
# dd if=/dev/zero of=disk.raw bs=1 count=0 seek=20G
Copy to Clipboard Toggle word wrap
Refer to the Google Compute Engine Hardware Manifest guide at https://cloud.google.com/compute/docs/tutorials/building-images#hardwaremanifest to ensure your virtual machine image is compatible with the Google Compute Engine platform.

Note

The steps below assumes KVM/QEMU as your local virtualization platform.
Attach the Red Hat Gluster Storage ISO, available from the Red Hat Customer Portal, as a bootable CD-ROM device to the image. Boot the VM to the ISO, and perform the installation of Red Hat Gluster Storage according to the instructions available in the Red Hat Gluster Storage 3.5 Installation Guide.
To enable and start the network interface:
  • Enable the default eth0 network interface at boot time:
    # sed -i s/ONBOOT=no/ONBOOT=yes/ /etc/sysconfig/network-scripts/ifcfg-eth0
    
    Copy to Clipboard Toggle word wrap
  • Start the eth0 network interface:
    # ifup eth0
    Copy to Clipboard Toggle word wrap
You must register the system and enable the required channels for Red Hat Gluster Storage. For information on subscribing and connecting to the appropriate pool and repositories, refer to the Installing Red Hat Gluster Storagechapter in the Red Hat Gluster Storage 3.5 Installation Guide. .

4.15.4. Updating your System

Update your systems using the following command:
# yum -y update
Copy to Clipboard Toggle word wrap

4.15.5. Tuning and Miscellaneous Configuration

Set the tuned profile torhgs-sequential-io using the following command:
# tuned-adm profile rhgs-sequential-io
Copy to Clipboard Toggle word wrap

Note

The rhgs-sequential-io profile is appropriate for this environment, but the rhgs-random-io profile may be more appropriate for different workloads.
Disable SElinux:
# setenforce 0
Copy to Clipboard Toggle word wrap
If SELinux support is required, refer to the Enabling SELinux chapter in the Red Hat Gluster Storage 3.5 Installation Guide.
The Google Compute Engine's "Build a Compute Engine Image from Scratch" documentation includes specific instructions for configuring the kernel, network, packages, SSH, and security of the virtual machine. It is recommended that you reference this documentation directly for updated information to ensure compatibility of your image with Google Compute Engine.
Power off the instance to apply all changes and prepare the image import:
# init 0
Copy to Clipboard Toggle word wrap
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat