Handy tips for using CentOS 7 with OnApp CloudBoot servers

Dan McCay

Dan McCay
Cloud Architecture Specialist

OnApp’s CloudBoot system allows you to automate the process of adding new compute and backup servers to your cloud, by provisioning them automatically over the network instead of having to install them by hand.

In earlier versions of OnApp, CloudBoot images used CentOS 5 or CentOS 6 – but in the latest version of OnApp, you can now create CloudBoot backup servers and CloudBoot KVM compute resources using CentOS 7.

In this article, I’d like to give you a couple of helpful tips for using some of the new features enabled by CentOS 7 with CloudBoot servers.


Tip 1 – Creating 64bit EXT4 filesystems on the backup server

When setting up a CloudBoot backup server, a filesystem is created on the local storage volume. 32bit EXT4 is normally used, but cannot be used on volumes larger than 16TB.

# mkfs.ext4 /dev/sda
mke2fs 1.42.9 (28-Dec-2013)
/dev/sda is entire device, not just one partition!
Proceed anyway? (y,n) y
mkfs.ext4: Size of device (0x15d4a6000 blocks) /dev/sda too big to be expressed
in 32 bits using a blocksize of 4096.

However, CentOS 7 CloudBoot images allow you to create a 64bit EXT filesystem instead, allowing you to use volumes larger than 16TB:

# mkfs.ext4 -O 64bit /dev/sda
mke2fs 1.42.9 (28-Dec-2013)
/dev/sda is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=16 blocks, Stripe width=16 blocks
366258176 inodes, 5860122624 blocks
293006131 blocks (5.00%) reserved for the super user
First data block=0
178837 block groups
32768 blocks per group, 32768 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544, 1934917632,
2560000000, 3855122432, 5804752896

Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done


Tip 2 – Using custom config to change network device aliases

In many cases, changing the aliases of compute nodes’ network devices from ‘ethX’ to ‘app1’ is useful as it ensures that all compute nodes in the zone are the same.

To achieve this using the known MAC addresses, commands are added to the custom config section of the edit compute resource page in the OnApp UI.


Here is an example which can be used for a CentOS 6 compute resource:

nic0=`ifconfig -a | grep -i 00:44:E8:3D:FB:2E | cut -f1 -d " " `
ip link set $nic0 name app1


To achieve the same on a CentOS 7 compute resource, the following can be used:

nic0=`ifconfig -a | grep -i 00:44:E8:3D:FB:2E -B2 | cut -c1-4 | grep eth`
ip link set $nic0 name app1


Tip 3 – Using custom config to set the scaling governor to ‘Performance’ mode for all CPU cores

CPU frequency scaling allows an operating system to scale the CPU core frequency down to save power. This is not desired when the server is acting as a hypervisor as this can cause issues such as soft lockups.

To prevent the OS from scaling the CPU frequency down, you can add the following command to a cloudboot node’s ‘custom config’ to set the scaling governor to ‘Performance’ mode:

for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ; do echo performance >; $i ; done


I hope that helps!