• No results found

Settings for Using a Logical Volume (LVM2) on an HDLM Device as a Boot Disk

Chapter 3 Creating an HDLM Environment

3.7 Installing HDLM for Managing Boot Disks

3.7.5 Settings for Using a Logical Volume (LVM2) on an HDLM Device as a Boot Disk

This subsection describes how to migrate a single-path boot disk environment that uses a logical volume (LVM2) on a SCSI device to a multi-path boot disk environment that uses a logical volume on an HDLM device. Note that if the settings are incorrect, the OS might not start.

In this subsection, the procedure assumes that GRUB or ELILO is used as the default boot loader in Red Hat Enterprise Linux.

To migrate a single-path boot disk environment that uses a logical volume (LVM2) on a SCSI device to a multi-path boot disk environment that uses a logical volume on an HDLM device:

1. Log in to Linux as a user with root privileges.

In an HDLM environment, a SCSI device cannot be identified from the value set in LABEL. Before installing HDLM, therefore, you must remove the LABEL setting. Perform steps 2 to check whether LABEL is set.

2. Check whether the definition in the /etc/fstab file contains LABEL. Check the contents of the /etc/fstab file.

Figure 3.61 shows example content of /etc/fstab file.

Figure 3.61 Example Content of /etc/fstab file When using LVM2

LABEL is set in the shaded portion.

This example assumes that IA32 uses GRUB as the boot loader. When you use IPF that uses

ELILO as the boot loader, the mount point is displayed as /boot/efi instead of /boot (in the line where /boot is coded), and the file system type is displayed as vfat instead of ext3. If LABEL is not used in the /etc/fstab file, go to step 8 and install HDLM. If LABEL is used in the /etc/fstab file, perform steps 3 to 6 to check the mounted file system, and then remove the LABEL setting.

3. Execute the mount command to check the mounted file system.

Check the correspondence between the SCSI device and LABEL that you checked in steps 2.

You will need this information to remove the LABEL setting.

Figure 3.62 shows an example of executing the mount command.

Figure 3.62 Example of Executing the mount Command

The shaded portion indicates the SCSI device for which LABEL is set.

This example assumes that IA32 uses GRUB as the boot loader. When you use IPF that uses

ELILO as the boot loader, the mount point is displayed as /boot/efi instead of /boot (in the line where /boot is coded), and the file system type is displayed as vfat instead of ext3. Remove the LABEL setting in the /etc/fstab file according to the information for the mounted file system. Perform steps 4 to 6 to remove the LABEL setting in the /etc/fstab

file.

4. Edit the /etc/fstab file to remove the LABEL setting.

The detailed procedure is explained in steps 5 and 6.

Figure 3.63 shows an example of editing the /etc/fstab file.

Figure 3.63 Example of Editing /etc/fstab file

Comment out the LABEL line, and then add the shaded line.

This example assumes that IA32 uses GRUB as the boot loader. When you use IPF that uses

ELILO as the boot loader, the mount point is displayed as /boot/efi instead of /boot (in the line where /boot is coded), and the file system type is displayed as vfat instead of ext3. 5. If necessary, back up the /etc/fstab file.

6. Edit the /etc/fstab file.

Refer to the correspondence between LABEL and the SCSI device that you checked in step 3.

Copy the registration of the LABEL specification.

Comment out the existing settings.

Edit the file to disable the LABEL specification and enable the SCSI device specification.

7. Restart the host to make sure that booting from the SCSI device is possible.

This completes the removal of the LABEL setting.

8. Install HDLM.

To install HDLM, see section 3.6.2, perform steps 2 and 3 to 12 to create an HDLM device.

You will also need to perform step 13 if you are only restarting the host. Note that the procedure differs depending on whether the host is restarted after installation.

In steps 9 to 24 that follow, you will edit the configuration file to change the definition so that the OS starts with HDLM specified.

9. Edit the /etc/lvm/lvm.conf file so that the LVM2 recognizes the HDLM device, not the SCSI device.

Figure 3.64 shows examples of editing the /etc/lvm/lvm.conf file.

Figure 3.64 Example of Editing /etc/lvm/ivm.conf file

Comment out the existing filter and types lines, and add the shaded lines in the figure.

Set 0 in md_component_detection.

Record the original md_component_detection value, since it is necessary for uninstallation or upgrade installation of HDLM.

10. Check the umask value.

Execute the following command to check the specified umask value:

# umask 0177

In the above example, the specified umask value is 0177.

If the umask value is not 0022, execute the command below to change the value. Note that after you create an initial RAM disk image in step 11, you need to reset the umask value to the original value. Therefore, make a note of the original umask value.

# umask 0022

11. Execute the dlmmkinitrd utility for supporting a boot disk to create an initial RAM disk image for HDLM.

For the initial RAM disk image file specified in the parameter, assign a name that is different from all currently used names.

For details on the dlmmkinitrd utility, see section 7.4.

Figure 3.65 and Figure 3.66 shows examples of executing the dlmmkinitrd utility.

Figure 3.65 Example of Executing the dlmmkinitrd Utility When GRUB as the Boot Loader Is Used

Figure 3.66 Example of Executing the dlmmkinitrd Utility When IPF (with ELILO as the Boot Loader) Is Used

12. If you changed the umask value in step 10, reset the value to the original value. If you have not changed the umask value, proceed to step 13.

In the following example, the value originally specified was 0177.

# umask 0177

13. Edit the boot loader configuration file so that the OS will start with HDLM specified.

Edit the boot loader configuration file as shown in Figure 3.67 and Figure 3.68.

The detailed procedure is explained in steps 14 to 19.

Figure 3.67 and Figure 3.68 shows an example of editing the configuration file.

Figure 3.67 Example of Editing /etc/grub.conf file Edit the shaded portion.

Figure 3.68 Example of Editing /etc/elilo.conf file Edit the shaded portion.

14. If necessary, back up the file.

15. Copy the configuration that was used for startup from the SCSI device.

16. Assign a name to the copied configuration that indicates that the configuration is used for specifying the HDLM device.

– If you will use GRUB as the boot loader Change title.

– If you will use ELILO as the boot loader Change label.

17. Delete the root specification.

18. In initrd, specify the initial RAM disk image file you created in step 11.

When an option that depends on the user environment is specified, be careful not to delete the option.

19. Specify the configuration that will be used for booting.

– When GRUB is the boot loader

Specify the position of the valid title for default. – When ELILO is the boot loader

Specify label for default. 20. Shut down the host.

Execute the following command to shut down the host:

# shutdown -h now

21. Change the configuration from a single-path configuration to a multi-path configuration.

22. Start the host.

23. Update the information about the volume group.

Execute the following command to update the information about the volume group.

# vgscan

Reading all physical volumes. This may take a while...

Found volume group "VolGroup00" using metadata type lvm2

24. Check the relationship between the volume group and HDLM devices.

Execute the following command to make sure that the physical volumes that make up the volume group are HDLM devices.

3.7.6 Upgrade Installation in an Environment Where a Logical Volume (LVM2) on an HDLM Device