To remove HDLM in such a configuration:
This subsection explains how to remove HDLM from a multi-path boot disk environment that uses an HDLM device, and to change the environment to a boot disk environment that uses a SCSI device. (Note that if settings are incorrect, the OS might not start.)
The following procedure describes how to set up a boot disk environment that uses LVM2. This procedure assumes that grub is used as the boot loader.
-
Log in to Linux as a user with root permissions.
-
Check whether LVM is used in the boot disk environment.
Execute the mount command to check the name of the devices mounted on the root partition (/). If LVM is used, device names that contain the VG name and LV name appear. The following shows an example of executing the command.
-
If LVM is used:
# mount /dev/mapper/vg00-lv00 on / type ext3 (rw) : # -
If LVM is not used:
# mount /dev/sddlmaa9 on / type ext3 (rw) : #
-
-
If LVM is used in a boot disk environment, edit the /etc/lvm/lvm.conf file so that the LVM2 recognizes the SCSI device, not the HDLM device.
When the utility for creating an HDLM boot disk environment (dlmbootstart) is used to configure a boot disk environment, the lines that were enabled before the utility was executed are commented out by adding # Backed up by HDLM. In this case, disable the lines that are currently enabled, and enable the lines that contain # Backed up by HDLM.
The following shows examples of editing the /etc/lvm/lvm.conf file when the boot disk environment was configured by performing the procedure described in SETTINGS_FOR_A_MULTIPATH_BOOT_DISK_ENVIRONMENT=GUID-D1139199-D2D6-4E66-80E8-F96431212132=5=EN=.html.
-
For Red Hat Enterprise Linux 9 or Oracle Linux 9:
Before:
devices { : global_filter = [ "a|sddlm[a-p][a-p].*|", "r|/dev/sd|" ] : # types = [ "fd", 16 ] types = [ "sddlmfdrv", 16 ] : md_component_detection=0 # md_component_detection=1 : # allow_changes_with_duplicate_pvs = 0 allow_changes_with_duplicate_pvs = 1 : # multipath_component_detection=1 multipath_component_detection=0 : # use_devicesfile=1 use_devicesfile=0 : }After:
devices { : global_filter = [ "r|sddlm[a-p][a-p].*|", "a|/dev/sd|" ] # global_filter = [ "a|sddlm[a-p][a-p].*|", "r|/dev/sd|" ] : # types = [ "fd", 16 ] # types = [ "sddlmfdrv", 16 ] : # md_component_detection=0 md_component_detection=1 : allow_changes_with_duplicate_pvs = 0 # allow_changes_with_duplicate_pvs = 1 : multipath_component_detection=1 # multipath_component_detection=0 : use_devicesfile=1 # use_devicesfile=0 : }Comment out the existing global_filter and types lines, and then add the underlined parts.
Comment out the lines where md_component_detection, multipath_component_detection, and use_devicesfile are set to 0 and the line where allow_changes_with_duplicate_pvs is set to 1.
Then, reset md_component_detection, allow_changes_with_duplicate_pvs, multipath_component_detection, and use_devicesfile to the original values by removing the comments from the lines that include the values that were set before the HDLM device configuration was enabled.
-
For Red Hat Enterprise Linux 8, Oracle Linux 8, Oracle Unbreakable Enterprise Kernel 8 or SUSE LINUX Enterprise Server 15 SP2 or later:
Before:
devices { : global_filter = [ "a|sddlm[a-p][a-p].*|", "r|/dev/sd|" ] : # types = [ "fd", 16 ] types = [ "sddlmfdrv", 16 ] : md_component_detection=0 # md_component_detection=1 : # allow_changes_with_duplicate_pvs = 0 allow_changes_with_duplicate_pvs = 1 : }After:
devices { : # global_filter = [ "a|sddlm[a-p][a-p].*|", "r|/dev/sd|" ] global_filter = [ "r|sddlm[a-p][a-p].*|", "a|/dev/sd|" ] : # types = [ "fd", 16 ] # types = [ "sddlmfdrv", 16 ] : # md_component_detection=0 md_component_detection=1 : allow_changes_with_duplicate_pvs = 0 # allow_changes_with_duplicate_pvs = 1 : }Comment out the existing global_filter and types lines, and then add the underlined parts.
Comment out the line where md_component_detection is set to 0 and the line where allow_changes_with_duplicate_pvs is set to 1.
Then, reset md_component_detection and allow_changes_with_duplicate_pvs to the original values by removing the comments from the lines containing the pre-installation values.
Note that, in Red Hat Enterprise Linux 8.8 or later, or Oracle Linux 8.8 or later, if the value of multipath_component_detection is set to 1, physical volumes are excluded during activation of the volume group in a multipath configuration. As a result, the volume group might not be successfully activated.
-
For SUSE LINUX Enterprise Server 12, SUSE LINUX Enterprise Server 15 SP1 or earlier, Red Hat Enterprise Linux 7 or Oracle Unbreakable Enterprise Kernel 7:
If you want to use use_lvmetad=0 for operation, specify filter, not global_filter.
Before:
# This section allows you to configure which block devices should # be used by the LVM system. devices { : filter = [ "a|sddlm[a-p][a-p].*|", "r|/dev/sd|" ] : # write_cache_state = 1 write_cache_state = 0 : # types = [ "fd", 16 ] types = [ "sddlmfdrv", 16 ] : md_component_detection=0 # md_component_detection=1 : }After:
# This section allows you to configure which block devices should # be used by the LVM system. devices { : # filter = [ "a|sddlm[a-p][a-p].*|", "r|/dev/sd|" ] filter = [ "r|sddlm[a-p][a-p].*|", "a|/dev/sd|" ] : write_cache_state = 1 # write_cache_state = 0 : # types = [ "fd", 16 ] # types = [ "sddlmfdrv", 16 ] : # md_component_detection=0 md_component_detection=1 : }Mark the existing filter and types lines as comments, and then add the underlined parts.
Return md_component_detection and write_cache_state to their original values by commenting out the lines md_component_detection = 0 and write_cache_state = 0 and then removing the comment marks from the lines containing the pre-installation values.
Also, before enabling the HDLM device configuration, if you have changed the setting for allow_changes_with_duplicate_pvs, return it to the original value.
Note that if you set allow_changes_with_duplicate_pvs to 0, duplicate physical volumes might be detected when activating a volume group in a multipath configuration, and the volume group might not be activated.
After editing the file, execute the following command.
# /sbin/vgscan
-
-
In the next step, you will edit the /etc/fstab file so that a SCSI device is mounted on each mount point. To do this, first execute the blkid {device-name} command to check LABEL and UUID.
If the dlmbootstart utility was used to configure the boot disk environment that uses HDLM, you do not need to check LABEL and UUID by executing the blkid command.
The following shows an example of executing the command.
# /sbin/blkid /dev/sddlmaa2 /dev/sddlmaa2: LABEL="/" UUID="19597725-5d20-4d1d-9906-f9f891b7711a" TYPE="ext2" #
- Note
-
Depending on the environment you are using, you might not be able to obtain information even if you specify a swap device for blkid. Specify the LABEL or UUID that you recorded during migration to the HDLM boot disk environment.
If you did not record the LABEL or UUID, disable the swap and then recreate the swap with LABEL specified. After the swap is created, make sure to enable the swap.
The following example shows the edited settings when a swap is used:
# /sbin/swapoff /dev/{HDLM-device-name} # /sbin/mkswap -L {LABEL} {HDLM-device-name} # /sbin/swapon /dev/{HDLM-device-name}
-
Back up the /etc/fstab file.
-
Edit the /etc/fstab file.
Change the mount point of HDLM-managed devices from the HDLM device to the SCSI device.
When the dlmbootstart utility is used to configure a boot disk environment, the lines that were enabled before the utility was executed are commented out by adding # Backed up by HDLM. In this case, disable the lines that are currently enabled, and enable the lines that contain # Backed up by HDLM.
If the boot disk environment was configured by performing the procedure described in SETTINGS_FOR_A_MULTIPATH_BOOT_DISK_ENVIRONMENT=GUID-D1139199-D2D6-4E66-80E8-F96431212132=5=EN=.html, mark the existing HDLM device specification as a comment by placing a hash mark (#) at the beginning of each line. Then, specify the SCSI device by using the SCSI device name (in LABEL or UUID notation) that you checked in step 4.
The following shows an example of editing the /etc/fstab file.
: #/dev/sddlmaa2 / ext2 defaults 1 1 LABEL=/ / ext2 defaults 1 1 #/dev/sddlmaa1 /boot ext2 defaults 1 2 LABEL=/boot /boot ext2 defaults 1 2 :
-
Create an initial RAM disk image file for SCSI.
From the following, perform the procedure that corresponds to the host OS.
For details on OS commands, see the documentation for the mkinitrd command or the dracut command.
-
SUSE LINUX Enterprise Server 12 or 15, Red Hat Enterprise Linux 7, 8, or 9, Oracle Unbreakable Enterprise Kernel 7, or 8:
-
Check the hdlm_dracut specification that is defined in /etc/opt/DynamicLinkManager/hdlm.conf. If hdlm_dracut=y is specified, change it to hdlm_dracut=n.
-
Execute the dracut command.
The following shows an example of executing the command:
Red Hat Enterprise Linux 7, 8, or 9, Oracle Unbreakable Enterprise Kernel 7, or 8:
# dracut /boot/initramfs-{kernel-version}.img {kernel-version}SUSE LINUX Enterprise Server 12 or 15:
# /usr/bin/dracut /boot/initrd-{kernel-version} {kernel-version}If the OS is SUSE LINUX Enterprise Server 12 or 15, Red Hat Enterprise Linux 7, 8, or 9, Oracle Unbreakable Enterprise Kernel 7 or 8, back up the initial RAM disk image used in the SAN boot environment, and then execute the command using the same file name.
-
-
For OSs other than the above:
Execute the mkinitrd command.
The following shows an example of executing the command:
# mkinitrd /boot/initrd-{kernel-version}.img {kernel-version}
-
-
Back up the boot loader configuration file.
-
Edit the boot loader configuration file.
When the dlmbootstart utility is used to configure a boot disk environment, the lines that were enabled before the utility was executed are commented out by adding # Backed up by HDLM.
- If the boot loader is GRUB:
-
In the /boot/grub/grub.conf file, # Backed up by HDLM is added to the lines that were enabled before the utility was executed, thereby commenting out those lines. In this case, disable the lines that are currently enabled, and enable the lines that contain # Backed up by HDLM. After editing the file, go to step 10.
- If the boot loader is GRUB2:
-
-
In the /etc/default/grub file, # Backed up by HDLM is added to the lines that were enabled before the utility was executed, thereby commenting out those lines. In this case, disable the lines that are currently enabled, and enable the lines that contain # Backed up by HDLM.
-
Execute the grub2-mkconfig command provided by the OS to create /boot/grub2/grub.cfg again. After editing the file, go to step 10.
-
If the boot disk environment was configured by performing the procedure described in SETTINGS_FOR_A_MULTIPATH_BOOT_DISK_ENVIRONMENT=GUID-D1139199-D2D6-4E66-80E8-F96431212132=5=EN=.html without using the dlmbootstart utility, copy the settings in the boot loader configuration file that was used for the current startup in step 10 on page SETTINGS_FOR_A_MULTIPATH_BOOT_DISK_ENVIRONMENT=GUID-D1139199-D2D6-4E66-80E8-F96431212132=5=EN=.html.
-
Edit the /etc/opt/DynamicLinkManager/hdlm.conf file.
Change the hdlm_cfg_all setting to hdlm_cfg_all=n so that HDLM is not configured when the server starts.
-
If any application directly specifies the HDLM device name, change the application settings so that the SCSI device is specified. For details on how to configure settings for each application, see the documentation for that application.
If you restart the server, HDLM is not configured. Note that, if an application directly specifies the HDLM device name, an error message appears when you restart the server.
-
Shut down the host.
Execute the following command to shut down the host:
# shutdown -h now
-
Reduce the number of paths to the LU (system disk) and then change the configuration from a multi-path configuration to a single-path configuration.
-
Start the host.
-
After the host starts, check that migration to the SCSI boot disk environment was successful and that the HDLM boot disk environment is not used.
See /proc/mounts to check the devices that are mounted on the root (/). Execute the following command to output the root information, and then check the devices that are output.
# /bin/cat /proc/mounts | /bin/grep -w / | /bin/grep -v rootfs
Check as follows, depending on the devices that are output.
-
If /dev/{SCSI-device} is output:
The SCSI boot disk environment is used.
The HDLM boot disk environment is not used.
-
If another device is output:
-
Execute the /usr/bin/readlink -f {output-device} command.
The full path of the file is output.
-
Execute the /bin/ls -l {output-device} command.
In a general file, the major and minor values are displayed where the file size is displayed.
-
Execute the following command with the major value specified for the argument:
# /bin/cat /proc/devices | /bin/grep -w {major}-
If sd is output, the SCSI boot disk environment is used.
The HDLM boot disk environment is not used.
-
If device-mapper is output:
Execute /sbin/dmsetup ls --tree to check the major and minor values of the device associated with the major and minor values displayed in b..
Display example:
# /sbin/dmsetup ls --tree vg00-lv_tmp (253:1) |- (8:2) vg00-lv_var (253:2) |- (8:2) vg00-lv_swap (253:3) |- (8:2) vg00-lv_root (253:0) |- (8:2) #
If the major and minor values in b. are 253 and 0 respectively, then, in the example above, the corresponding device is (8:2), which has major and minor values of 8 and 2 respectively.
Execute the following command with the major value specified for the argument:
/bin/cat /proc/devices | /bin/grep -w {major}If sddlmfdrv is not output, the HDLM boot disk environment is not used.
-
If another device is output:
The HDLM boot disk environment is not used.
-
-
-
-
Remove HDLM.
To remove HDLM, execute the following command:
# /opt/DynamicLinkManager/remover/removehdlm
-
Make sure that the removal has been completed.
You must execute the following command to make sure that the removal has been completed. The following information is output.
# rpm -qi HDLM package HDLM is not installed