Manually unencapsulating a root disk

The following steps recover the system in the unlikely event that an error makes the system unbootable during the root disk encapsulation or unencapsulation process.

To manually unencapsulate a boot disk

  1. Turn on the system and boot it from the installation CD number 1.
  2. Run the following command at the boot prompt to put the system in rescue mode.
    boot: linux rescue
  3. Select the language, keyboard, and choose to skip that step to find your installation.
  4. Use the fdisk command to inspect the boot disk for the partitions that VxVM created to logically manage the disk:
    # fdisk -l /dev/sda

    The boot disk may contain a VxVM partition, either the VxVM Public Region partition (tag 7e), the VxVM Private Region partition (tag 7f), or both. If these partitions are present, delete the partitions from the disk using the following command:

    # fdisk /dev/sda

    See the fdisk(8) manual page for details.

    The following example shows the output before and after removing the VxVM partitions from the disk.

    VxVM Public Region in primary partition 3 (tag 7e) and VxVM Private Region in logical partition 6 (tag 7f) were found on the root disk:

    # fdisk -lu /dev/sda
    Disk /dev/sda: 36.4 GB, 36420075008 bytes
    255 heads, 63 sectors/track, 4427 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot    Start       End    Blocks   Id  System /dev/sda1            63   1028159    514048+  83  Linux
    /dev/sda2       1028160  15358139   7164990   83  Linux
    /dev/sda3            63  71119754  35559846   7e  Unknown
    /dev/sda4      15566985  71119754  27776385    5  Extended
    /dev/sda5      15567048  17667277   1050115   82  Linux swap
    /dev/sda6      17667341  17669388      1024   7f  Unknown
    /dev/sda7      17671563  71119754  26724096   83  Linux

    After you remove the VxVM partitions from the root disk, the following output displays:

    # fdisk -lu /dev/sda
    Disk /dev/sda: 36.4 GB, 36420075008 bytes
    255 heads, 63 sectors/track, 4427 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot    Start       End    Blocks   Id  System
    /dev/sda1            63   1028159    514048+  83  Linux
    /dev/sda2       1028160  15358139   7164990   83  Linux
    /dev/sda4      15566985  71119754  27776385    5  Extended
    /dev/sda5      15567048  17669388   1051170   82  Linux swap
    /dev/sda6      17671563  71119754  26724096   83  Linux

    In this example. the VxVM Private Region is taken from the swap partition because the required free space is not available.

  5. Make a temporary mount point, /vxvm, and mount the root partition on it:
    # mkdir /vxvm
    # mount -t ext3 /dev/sda1 /vxvm
  6. If the disk has a separate boot partition, mount this partition on /vxvm/boot:
    # mount -t ext3 /dev/sda2 /vxvm/boot
  7. Before restoring the /etc/fstab and /etc/lilo.conf files, save the files for problem analysis.

    To save the /etc/fstab definitions, use the following command:

    # cp /vxvm/etc/fstab /vxvm/etc/fstab_savefile

    To save the boot configuration file, use one of the following methods.

    For the LILO boot loader:

    # cp /vxvm/etc/lilo.conf /vxvm/etc/lilo.conf_savefile

    For the GRUB boot loader:

    # cp /vxvm/etc/grub.conf /vxvm/etc/grub.conf_savefile

    The following file may also be needed for problem analysis:

    hostname='uname -n' 
    /etc/vx/rootdisk_info.$hostname

    You can obtain the file after the system is rebooted.

  8. Restore the /etc/fstab file:
    # cp /vxvm/etc/fstab.b4vxvm /vxvm/etc/fstab
  9. Restore the boot loader configuration, using one of the following methods:

    For the LILO boot loader:

    # cp /vxvm/etc/lilo.conf.b4vxvm /vxvm/etc/lilo.conf
    # /vxvm/sbin/lilo -r /vxvm

    For the GRUB boot loader:

    # cp /vxvm/etc/grub.conf.b4vxvm /vxvm/etc/grub.conf
  10. Unmount the partitions, run sync and exit the rescue shell
    # cd /
    # umount /vxvm/boot
    # umount /vxvm
    # sync
    # exit 
  11. Shut down and reboot the system.