Sun Cluster System Administration Guide for Solaris OS

ProcedureHow to Restore an Encapsulated Root (/) File System (Veritas Volume Manager)

Use this procedure to restore an encapsulated root (/) file system to a node. The node being restored should not be booted. Ensure the cluster is running with errors before performing the restore procedure.


Note –

Because you must partition the new disk using the same format as the failed disk, identify the partitioning scheme before you begin this procedure, and recreate file systems as appropriate.


The phys-schost# prompt reflects a global-cluster prompt. Perform this procedure on a global cluster.

This procedure provides the long forms of the Sun Cluster commands. Most commands also have short forms. Except for the long and short forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix B, Sun Cluster Object-Oriented Commands.

  1. Replace the failed disk on the node where the root file system will be restored.

    Refer to disk replacement procedures in the documentation that shipped with your server.

  2. Boot the node that you are restoring.

    • If you are using the Solaris OS CD, at the OpenBoot PROM ok prompt, type the following command:


      ok boot cdrom -s
      
    • If you are using a Solaris JumpStart server, at the OpenBoot PROM ok prompt, type the following command:


      ok boot net -s
      
  3. Create all the partitions and swap space on the root disk by using the format command.

    Re-create the original partitioning scheme that was on the failed disk.

  4. Create the root (/) file system and other file systems as appropriate, by using the newfs command.

    Re-create the original file systems that were on the failed disk.


    Note –

    Ensure that you create the /global/.devices/ node@nodeid file system.


  5. Mount the root (/) file system on a temporary mount point.


    # mount device temp-mountpoint
    
  6. Restore the root (/) file system from backup.


    # cd temp-mountpoint
    # ufsrestore rvf dump-device
    # rm restoresymtable
    
  7. Create an empty install-db file.

    This file puts the node in VxVM installation mode at the next reboot.


    # touch \
    /temp-mountpoint/etc/vx/reconfig.d/state.d/install-db
    
  8. Remove the following entries from the / temp-mountpoint/etc/system file.


    * rootdev:/pseudo/vxio@0:0
    * set vxio:vol_rootdev_is_volume=1
  9. Edit the /temp-mountpoint /etc/vfstab file and replace all VxVM mount points with the standard disk devices for the root disk, such as /dev/dsk/c0t0d0s0.


    Example: 
    Change from—
    /dev/vx/dsk/rootdg/rootvol /dev/vx/rdsk/rootdg/rootvol /      ufs   1     no -
    
    Change to—
    /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0  / ufs   1     no       -
  10. Unmount the temporary file system and check the file system.


    # cd /
    # umount temp-mountpoint
    # fsck raw-disk-device
    
  11. Install the boot block on the new disk.


    # /usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk raw-disk-device
    
  12. Reboot the node in multiuser mode.


    # reboot
    
  13. Update the device ID by using scdidadm(1M).


    # cldevice repair /dev/rdsk/c0t0d0
    
  14. Run the clvxvm encapsulate command to encapsulate the disk and reboot.

  15. If a conflict in minor number occurs with any other system, unmount the global devices and re-minor the disk group.

    • Unmount the global devices file system on the cluster node.


      # umount /global/.devices/node@nodeid
      
    • Re-minor the rootdg disk group on the cluster node.


      # vxdg reminor rootdg 100
      
  16. Shut down and reboot the node in cluster mode.


    # shutdown -g0 -i6 -y
    

Example 12–9 Restoring an Encapsulated root (/) File System (Veritas Volume Manager)

The following example shows an encapsulated root (/) file system restored to the node phys-schost-1 from the tape device /dev/rmt/0.


[Replace the failed disk and boot the node:]

Boot the node from the Solaris OS CD. At the OpenBoot PROM ok prompt, type the following command:


ok boot cdrom -s
...
[Use format and newfs to create partitions and file systems]
[Mount the root file system on a temporary mount point:]
# mount /dev/dsk/c0t0d0s0 /a
[Restore the root file system:]
# cd /a
# ufsrestore rvf /dev/rmt/0
# rm restoresymtable
[Create an empty install-db file:]
# touch /a/etc/vx/reconfig.d/state.d/install-db
[Edit /etc/system on the temporary file system and 
remove or comment out the following entries:]
	# rootdev:/pseudo/vxio@0:0
	# set vxio:vol_rootdev_is_volume=1
[Edit /etc/vfstab on the temporary file system:]
Example: 
Change from—
/dev/vx/dsk/rootdg/rootvol /dev/vx/rdsk/rootdg/rootvol / ufs 1 no-

Change to—
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0  / ufs   1     no       -
[Unmount the temporary file system, then check the file system:]
# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s0
[Install a new boot block:]
# /usr/sbin/installboot /usr/platform/`uname \
-i`/lib/fs/ufs/bootblk /dev/rdsk/c0t0d0s0
[Reboot:]
# reboot
[Update the disk ID:]
# cldevice repair /dev/rdsk/c0t0d0
[Encapsulate the disk::]
# vxinstall
Choose to encapsulate the root disk.
[If a conflict  in minor number occurs, reminor the rootdg disk group:]
# umount /global/.devices/node@nodeid
# vxdg reminor rootdg 100
# shutdown -g0 -i6 -y

See Also

For instructions about how to mirror the encapsulated root disk, see the Sun Cluster Software Installation Guide for Solaris OS.