In this article, we will explore how to configure a Linux LPAR on an IBM Z environment with Red Hat Enterprise Linux (RHEL) using Direct Access Storage Devices (DASD) as boot disks to operate across two different sites. This approach allows for an effective disaster recovery (DR) setup by simply copying the disk.
Prerequisites
Before starting, ensure you have:
- An IBM Z environment configured with LPAR.
- Red Hat Enterprise Linux (RHEL) installed (minimum versions: 8.8 and 9.2).
- Access to DASD for both sites.
Configuration Steps
1. Removing the IPL Disk from the Linux Configuration
To boot a node from a copied disk, you need to remove the IPL (Initial Program Load) disk by editing the /etc/dasd.conf
file and deleting the UCB (Unit Control Block)/DASD device number of the boot volume. Then, run the command:
dracut -f
This command is necessary to rebuild the initial RAM-disk because it contains a copy of the /etc/dasd.conf
file.
2. Creating the Site Configuration File
Create the /etc/ziplenv
file and specify the parameters for the two sites. The ziplenv
file specifies the kernel parameters that need to be associated with the defined sites (up to 9 different sites can be defined). In the configuration, it is possible to change not only the boot disk but also the network interfaces or IPs:
[site 1]
SITEPARMS=stp=on rd.dasd=0.0.1000 ip=10.0.xxx.xxx::10.0.xxx.1:24
[site 2]
SITEPARMS=stp=on rd.dasd=0.0.5000 ip=10.3.xxx.xxx::10.3.xxx.1:24
3. Selecting DASD for Each Site
Select which DASD to bring online at each site:
chzdev -e 0.0.1000 zdev:early=1 --site 1
chzdev -e 0.0.2000-0.0.3000 --site 1
chzdev -e 0.0.5000 zdev:early=1 --site 2
chzdev -e 0.2.2000-0.2.3000 --site 2
4. Updating the Kernel
Run the following command to insert the SITEPARMS
into all kernel images:
grubby --args='$\{SITEPARMS\}' --update-kernel=ALL
5. Modifying the /etc/fstab
File
Edit the /etc/fstab
file to remove the /boot
definition linked to the disk. Find the disk's UUID with the command:
blkid /dev/disk/by-path/ccw-0.0.1000-part1
Replace the UUID in the /etc/fstab
:
UUID=... /boot xfs defaults 0 0
Save the file and test the remount with:
mount -a
6. Modifying Boot Configuration Files
Edit the .conf
files in /boot/loader/entries
to remove the rd.dasd=xxxx
parameter, as it is already included in the SITEPARMS
.
7. Preparing for Boot
Prepare the boot with the command:
zipl
Conclusion
By following these steps, you will be able to configure a Linux LPAR on IBM Z with RHEL using DASD as boot disks to operate across two different sites. This configuration is ideal for disaster recovery scenarios, ensuring that the system can be quickly booted on an alternate site in case of an emergency.
If you have question feel free to contact me to further details.
A special thank you to Christian Bornträger and Peter Oberparleiter for their precious help needed to make this procedure working.