(Optional) Perform Post-BMR Operations

The following topics are optional configuration settings that you may have to perform after a BMR:

Configure X Windows

When you perform a BMR across a dissimilar hardware, X Windows of the restored OS does not function properly and the target node displays an error dialog. The error dialog appears because the display configuration has changed. To resolve this error, follow the instructions in the error dialog to configure the graphic card. After that, you can see the X Windows and the desktop UI.

Configure the System Fully Qualified Domain Name (FQDN)

When you need an FQDN, then you must configure the FQDN. The BMR process does not automatically configure the FQDN.

Maximum character count for FQDN: 63

Follow these steps to configure the FQDN:

  1. Edit the /etc/hosts file and provide the IP Address, the FQDN name, and the server name.
  2. #vi /etc/hosts

    ip_of_system  servername.domainname.com  servername

  3. Restart the network service.
  4. #/etc/init.d/network restart

  5. Verify the host name and the FQDN name.
  6. #hostname

    servername

    #hostname -f

    servername.domainname.com

  7. The FQDN is configured.

Extend the Data Volume after a BMR on Dissimilar Disks

When you perform a BMR to a larger disk than the disk on the original node, some disk space is left unused. The BMR operation does not automatically process the unused disk space. You can format the disk space to a separate partition or resize the existed partition with the unused disk space. The volume that you want to resize must be unused, so you must avoid resizing a system volume. In this section, we will focus on how to extend a data volume with the unused disk space.

Note: To avoid data loss, resize your volumes immediately after the BMR process. You can also back up the node before starting the volume resizing task.

When the target machine successfully restarts after the BMR, you can extend the data volume.

Raw partition volume

For example, a 2-GB disk in the session is restored to a 16-GB disk named /dev/sdb with only one partition. The /dev/sdb1 raw partition is directly mounted on the /data directory.

This example is used to explain the procedure of extending Raw partition volume.

Follow these steps:

  1. Check the status of the /dev/sdb1 volume.
  2. # df –h /dev/sdb1

    /dev/sdb1             2.0G   40M  1.9G   3% /data

  3. Umount the /dev/sdb1 volume.
  4. # umount /data

  5. Resize /dev/sdb1 to occupy the entire disk space using the fdisk command.
  6. To perform this operation, first delete your existing partition and then recreate it with the same start sector number. The same start sector number is responsible for avoiding the data loss.

    # fdisk -u /dev/sdb

    Command (m for help): p

    Disk /dev/sdb: 17.1 GB, 17179869184 bytes

    255 heads, 63 sectors/track, 2088 cylinders, total 33554432 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Device Boot      Start         End      Blocks   Id  System

    /dev/sdb1              63     4192964     2096451   83  Linux

    Command (m for help): d

    Selected partition 1

    Command (m for help): n

    Command action

    e   extended

    p   primary partition (1-4)

    p

    Partition number (1-4): 1

    First sector (63-33554431, default 63):

    Using default value 63

    Last sector or +size or +sizeM or +sizeK (63-33554431, default 33554431):

    Using default value 33554431

    Command (m for help): p

    Disk /dev/sdb: 17.1 GB, 17179869184 bytes

    255 heads, 63 sectors/track, 2088 cylinders, total 33554432 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Device Boot      Start         End      Blocks   Id  System

    /dev/sdb1              63    33554431    16777184+  83  Linux

    Command (m for help): w

    The partition changes to the same start sector number as the original partition and the end sector number is 33554431.

  7. Resize the volume using resize2fs command. If necessary, first run the e2fsck command.
  8. # e2fsck -f /dev/sdb1

    # resize2fs /dev/sdb1

  9. Mount the volume to the mount point and check the volume status again.
  10. # mount /dev/sdb1 /data

    # df –h /dev/sdb1

    /dev/sdb1             16G   43M   16G   1% /data

    The volume is extended to 16 GB and is ready for use.

LVM volume:

For example, an 8-GB disk in the session is restored to a 16-GB disk named /dev/sdc with only one partition. The /dev/sdc1 raw partition is used as the only physical volume of the /dev/mapper/VGTest-LVTest LVM logical volume whose mount point is /lvm.

This example is used to explain the procedure of extending LVM volume.

Follow these steps:

  1. Check the status of the /dev/mapper/VGTest-LVTest volume.
  2. # lvdisplay –m /dev/mapper/VGTest-LVTest

    --- Logical volume ---

    LV Name                /dev/VGTest/LVTest

    VG Name                VGTest

    LV UUID                udoBIx-XKBS-1Wky-3FVQ-mxMf-FayO-tpfPl8

    LV Write Access        read/write

    LV Status              available

    # open                 1

    LV Size                7.88 GB

    Current LE             2018

    Segments               1

    Allocation             inherit

    Read ahead sectors     0

    Block device           253:2

    ---Segments---

    Logical extent 0 to 2017:

    Type                linear

    Physical volume     /dev/sdc1

    Physical extents    0 to 2017

    The physical volume is /dev/sdc1, the volume group is VGTest, and the logical volume is /dev/VGTest/LVTest or /dev/mapper/VGTest-LVTest.

  3. Umount the /dev/mapper/VGTest-LVTest volume.
  4. # umount /lvm

  5. Disable the volume group in which the /dev/sdc1 physical volume is located.
  6. # vgchange -a n VGTest

  7. Create a partition to occupy the unused disk space using the fdisk command.
  8. # fdisk -u /dev/sdc

    Command (m for help): p

    Disk /dev/sdc: 17.1 GB, 17179869184 bytes

    255 heads, 63 sectors/track, 2088 cylinders, total 33554432 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Device Boot      Start         End      Blocks   Id  System

    /dev/sdc1              63    16777215     8388576+  83  Linux

    Command (m for help): n

    Command action

    e   extended

    p   primary partition (1-4)

    p

    Partition number (1-4): 2

    First sector (16777216-33554431, default 16777216):

    Using default value 16777216

    Last sector or +size or +sizeM or +sizeK (16777216-33554431, default 33554431):

    Using default value 33554431

    Command (m for help): p

    Disk /dev/sdc: 17.1 GB, 17179869184 bytes

    255 heads, 63 sectors/track, 2088 cylinders, total 33554432 sectors

    Units = sectors of 1 * 512 = 512 bytes

    Device Boot      Start         End      Blocks   Id  System

    /dev/sdc1              63    16777215     8388576+  83  Linux

    /dev/sdc2        16777216    33554431     8388608   83  Linux

    Command (m for help): w

    The /dev/sdc2 partition is created.

  9. Create a new physical volume.
  10. # pvcreate /dev/sdc2

  11. Extend the volume group size.
  12. # vgextend VGTest /dev/sdc2

  13. Enable the volume group that you have already disabled.
  14. # vgchange -a y VGTest

  15. Extend the logical volume size using the lvextend command.
  16. # lvextend -L +8G /dev/VGTest/LVTest

  17. Resize the volume using the resize2fs command. If necessary, first run the e2fsck command.
  18. # e2fsck -f /dev/mapper/VGTest-LVTest

    # resize2fs /dev/mapper/VGTest-LVTest

  19. Mount the volume to the mount point and check the volume status again.
  20. # mount /dev/mapper/VGTest-LVTest /lvm

    # lvdisplay -m /dev/mapper/VGTest-LVTest

    ---Logical volume---

    LV Name                /dev/VGTest/LVTest

    VG Name                VGTest

    LV UUID                GTP0a1-kUL7-WUL8-bpbM-9eTR-SVzl-WgA11h

    LV Write Access        read/write

    LV Status              available

    # open                 0

    LV Size               15.88 GB

    Current LE             4066

    Segments               2

    Allocation             inherit

    Read ahead sectors     0

    Block device           253:2

    --- Segments ---

    Logical extent 0 to 2046:

    Type                linear

    Physical volume     /dev/sdc1

    Physical extents    0 to 2046

    Logical extent 2047 to 4065:

    Type                linear

    Physical volume     /dev/sdc2

    Physical extents    0 to 2018

    The LVM volume extends to 16 GB and is ready for use.