Resizing and migrating hardware profiles for IBM Power Virtual Server instance in the same workspace
IBM Cloud provides multiple ways to resize an IBM IBM® Power® Virtual Server instance in the same workspace. Depending on the workload requirements, you can adjust CPU and memory resources, increase storage capacity, or migrate the workload to a new virtual server with a different hardware profile. Each method has different operational effects, so you can choose the approach that fits your maintenance, capacity planning, and application requirements.
The following options are available for resizing an IBM Power Virtual Server instance in the same workspace:
-
Resize CPU and memory resources: You can resize CPU and memory resources by changing the SAP hardware profile of an existing IBM Power Virtual Server instance without relocating the workload. The ability to resize the SAP hardware profile depends on the available resources on the IBM Power Systems server. The storage volumes remain unchanged. This method does not help if you also need to resize the storage volumes, for example, to increase SAP volumes because of a growing SAP HANA database. Applications such as SAP HANA databases and SAP application servers can benefit from additional processor and memory resources. SAP application servers typically do not require storage volume resizing. In most cases, changing the SAP hardware profile is sufficient, and you do not need to create a new IBM Power Virtual Server instance.
-
Migrate the workload to a new hardware profile: You can relocate an SAP workload from one hardware profile to a new IBM Power Virtual Server instance in the same workspace. The new hardware profile can be larger or smaller, and you can increase the storage volumes as needed.
The Capture and export virtual server action creates an IBM boot image that includes the boot volume and all attached storage volumes. You can then deploy a new IBM Power Virtual Server instance in the same workspace from the exported catalog image.
When you deploy the new instance, you can do the following tasks:
- Increase or decrease CPU and memory resources by selecting a different SAP hardware profile.
- Resize storage volumes, including SAP HANA volumes, to user-defined capacities.
- Keep the original IBM Power Virtual Server instance as a backup because it remains unchanged throughout the process.
Do not update the operating system. Keep the host in its current healthy state. Do not trigger more than one Capture and export process in the same workspace at the same time. Wait until the new IBM Power Virtual Server instance is fully created completely from the exported image.
Resizing without relocating an IBM Power Virtual Server instance
SAP profiles are defined sizes of CPU and memory. Resizing requires enough resources on the same IBM Power System. No changes to applications or the operating system are necessary. In most cases, this approach is sufficient for an SAP application server because it typically uses a small hardware profile.
To change the SAP hardware profile of an IBM Power Virtual Server instance without relocating the workload, complete the following steps:
- Shut down the IBM Power Virtual Server instance (You can change the SAP hardware profile only when the instance is shut down.)
- In the IBM Cloud console, adjust the CPU and memory settings:
- List the resources
- Choose your workspace
- Choose the IBM Power Virtual Server instance
- Click tab Capacity in the instance details
- Edit Capacity
- Choose another SAP profile (This action changes the values on CPU cores and memory.)
- Click Save to confirm the changes
- Wait until the new values are applied
- Restart the Power Virtual Server instance
Relocating an SAP workload to a new IBM Power Virtual Server instance and resizing the hardware profile
Relocate the SAP workload from one hardware profile on an IBM Power Virtual Server instance to a new IBM Power Virtual Server instance in the same workspace and resize the SAP hardware profile. Then, resize the SAP storage volumes.
Optional: Using the same IP address for the new IBM Power Virtual Server instance
IBM Cloud console prevents you from assigning existing IP addresses to a new deployment in the same workspace. If you want to assign the same IP address, add a new IP address to the original IBM Power Virtual Server instance, and then remove the original IP address.
-
In the IBM Cloud console, attach an existing network as a second network device. Attach the same subnet. Assign a different IP address by using DHCP or a manual assignment. Only this method makes the IP address visible correctly in the IBM Cloud console.
-
Assign the IP address on OS level by using
nmclior configuring the network scripts. -
Activate the IP address.
systemctl restart NetworkManager -
Restart the host and verify SSH login to the second network interface.
-
Remove the first original interface in IBM cloud UI. Only the added second interface remains in the IBM Cloud console.
Steps on the current SAP HANA host
Complete the following steps on the current SAP HANA host:
-
In the IBM Cloud console, list the resources and choose the SAP host. In the server details, select the storage tab. List and note the names and sizes of the SAP storage volumes.
*hana-data-* (usually 4 volumes *1-4) *hana-log-* (usually 4 volumes *1-4) *hana-shared* (usually 1 volume *-1) *hana-usrsap* (usually 1 volume *-1)The new host that you create has different volume names. Identify the SAP volumes by their storage volume sizes.
-
Log in to the SAP host by using SSH.
-
Check for the status of two packages, the packages
cloud-initandibm-power-managed-rhel<8/9/10>packages are required to make deployment of the cloned image cloud compatible.dnf install -y cloud-init ibm-power-managed-rhel<8/9/10> -
Display and note information about the logical volumes. Logical Volume Manager (LVM) aggregates several storage volumes into one logical volume.
lvsExample output:
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert datalv datavg -wi-ao---- 319.98g loglv logvg -wi-ao---- 511.98g sharedlv sharedvg -wi-ao---- <200.00g usrsaplv usrsapvg -wi-ao---- <50.00g -
Note the size of the mounted volumes.
df -h | egrep 'hana|sap' -
Show and note the SAP mounts in
/etc/fstab.egrep 'sap|hana' /etc/fstabExample output:
/dev/mapper/datavg-datalv /hana/data xfs defaults,nofail 0 0 /dev/mapper/logvg-loglv /hana/log xfs defaults,nofail 0 0 /dev/mapper/sharedvg-sharedlv /hana/shared xfs defaults,nofail 0 0 /dev/mapper/usrsapvg-usrsaplv /usr/sap xfs defaults,nofail 0 0 -
Shut down the SAP host. Do not delete the host until the new SAP host is running.
Capturing and exporting all storage volumes of the IBM Power Virtual Server instance
-
Shut down the IBM Power Virtual Server instance before you run the Capture and export virtual machine (VM) action.
Any changes to the data during the export process can compromise data integrity.
-
In the IBM cloud console, select the IBM Power Virtual Server instance that hosts SAP HANA.
-
Click the tab Storage, and note all storage volumes and their sizes.
-
Create a mapping of the storage volumes to their corresponding mount points.
-
Click VM actions, and then select Capture and export.
-
Select all storage volumes to be included to the image.
-
Confirm the terms and conditions, and then click Next.
-
Select Image catalog as the image destination. The image is available as a boot image for deployments only in the same workspace.
Creating an IBM Power Virtual Server instance with the migrated SAP HANA DB
To create the new IBM Power Virtual Server instance, follow the instructions in Preparing Power Virtual Server instances for SAP system installation, and use the following parameters:
-
Deploy the instance in the same IBM Power Virtual Server workspace as the current instance
-
Use the boot image that you exported to the image catalog
In the Boot image section, use the following options:
- Operating system: Go to IBM provided subscription/Linux for SAP (HANA)
- Image: Select the boot image name that you exported before
-
In the Profile properties section, use the following options:
- Select the Machine type, the Power System server type might differ
- Choose an SAP hardware Profile that fits your future needs
-
In the Storage Volumes section, do not modify the storage volumes because the image includes all previously attached volumes.
-
In the Network interfaces section, select the private network:
- Click Add existing network
- Click Attach (an existing) subnet
- Select the existing private network that you want to use
- Select a new IP manually or set to DHCP
-
Click Create to deploy the defined IBM Power Virtual Server instance
Resizing the storage volumes on the new SAP host
To increase the size of the SAP volumes, proceed with these steps:
-
Log in to the newly created SAP host by using SSH.
-
In
/etc/fstab, comment out the SAP volume lines. It prevents the mounting of the SAP volumes in the next restart. -
Shut down the newly created SAP host.
You can resize the storage volumes in the IBM Cloud console while the host is running. However, the Logical Volume Manager (LVM) volumes at the operating system level are recognized only after a restart. To avoid data corruption, do not resize physical storage volumes on a running host.
-
In the IBM Cloud console, select each SAP volume separately of the Power Virtual Server instance, and then select edit on the corresponding three-dot option.
-
Increase each SAP volume to the new self-defined size. As the volume names have different volume names than the old host, recognize the volumes by their size. Optionally, modify storage tiers. It helps to rename the SAP volumes corresponding to their logical volume name:
*hana-data-* (usually 4 volumes *1-4) *hana-log-* (usually 4 volumes *1-4) *hana-shared* (usually 1 volume *-1) *hana-usrsap* (usually 1 volume *-1)The size of each logical volume is the combined size of the corresponding storage volumes.
-
Start the host after resizing the storage volumes.
Resizing the LVM volumes on the new host
The attached store volumes must now be scanned by the operating system, added to the LVM and mounted to the file system. For resizing procedure, see Extending a logical volume and file system online in RHEL after disk resize.
To resize the volumes at the operating system level, complete the following steps:
-
Log in to the host by using SSH
-
Scan the SCSI bus to discover new devices
/usr/bin/rescan-scsi-bus.sh -a -c -
List all physical volumes and their current recognized, but former size
pvscan -
List the overview of the physical volumes (PV), volume group (VG), and the former size
pvs -
Resize each of the LVM physical volumes (PV) that were listed with pvs
pvresize <PV-name>Example output:
pvresize /dev/mapper/36005076813810264e80000000000a287 Physical volume "/dev/mapper/36005076813810264e80000000000a287" changed 1 physical volume(s) resized or updated / 0 physical volume(s) not resized -
Check the new PV size with pvs
pvs -
List the overview of the volume groups (VG) and the current size
lvs -
Extend each Volume Group (VG) that was listed with lvs
lvextend -l +100%FREE <VG-name>Example output:
lvextend -l +100%FREE datavg Using stripesize of last segment 64.00 KiB Size of logical volume datavg/datalv changed from 319.98 GiB (81916 extents) to <31.25 TiB (8191996 extents). Logical volume datavg/datalv successfully resized. -
Check the new VG-size with lvs
lvs -
Activate the volume group
vgchange -ay <VG-name>Example output:
vgchange -ay datavg -
Extend the physical volumes and logical volumes for all SAP volumes, and activate all logical volumes as described in the steps 4-10.
Repeat the steps 4-10 for all SAP volumes
-
Uncomment all SAP file systems in
/etc/fstab -
Activate the changes on systemd
systemctl daemon-reload -
Mount all file systems listed in
/etc/fstabmount -a -
Resize the XFS file systems, retrieve the mount points from
/etc/fstabxfs_growfs <mountpoint>Example output:
xfs_growfs /hana/dataRepeat this step for all LVM mount points
-
Check the mounted SAP file systems
df -h | egrep 'hana|sap'
Starting the SAP services on the new host
To start the SAP services on the new host, complete the following steps:
-
Adjust the file
/etc/hosts. Add entries for all SAP hosts with the current IP addresses. -
Start and check the SAP services.
systemctl start SAP.slicesystemctl start SAP${SID}_${instance_number}.service -
Show all SAP processes. Verify that the following services are listed:
saphostagent.serviceandSAP${SID}_${instance_number}.service.systemd-cgls --unit SAP.slice -
Start the SAP HANA database.
sudo -i -u ${sid}adm -- HDB start -
Check all SAP HANA processes.
sudo -i -u ${sid}adm -- HDB info -
Wait for the dispstatus status of the SAP instance to become
GREEN.su - ${sid}adm -c "sapcontrol -nr ${instance_number} -function GetProcessList"
Checking the health status of the SAP HANA database
Check that the SAP license is valid. Verify SAP HANA data consistency by activating SAP HANA backup and checking the SAP HANA backup as described in Checking Individual Backups (hdbbackupcheck).
Deleting or preserving the previous IBM Power Virtual Server instance
You can preserve the original IBM Power Virtual Server instance in its original state or delete it after SAP HANA DB on the new host is confirmed to be healthy.