Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Configuring HP-UX For Peripherals: HP 9000 Computers > Chapter 4 Configuring Disk Drives, Disk Arrays, and CD-ROM Drives

Moving a Disk Drive to a Different Address

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Occasionally, you might find yourself having to move a disk from one interface card to another. This procedure explains how to do so.

NOTE: Moving the root disk and moving an LVM root disk are special cases. You will find additional instructions at several points in this procedure to cover these requirements.

To move a disk drive using HP-UX commands:

  1. Back up the files on the disk drive to be moved; see the backup chapter in Managing Systems and Workgroups.

  2. If you are moving a root LVM disk, execute the lvlnboot -v command to view the current configuration. Record the information. For example,

    /usr/sbin/lvlnboot -v
     
    Boot Definitions for Volume Group /dev/vg00:
    Physical Volumes belonging in Root Volume Group:
     /dev/dsk/c0t6d0 (56/52.6.0)  Boot Disk
    Root: lvol1 on:  /dev/dsk/c0t6d0
    Swap: lvol2 on:  /dev/dsk/c0t6d0
    Dump: lvol3 on:  /dev/dsk/c0t6d0
  3. Notify users that the system will be shut down to move the disk. You can use the wall command and/or the interactive capabilities of the shutdown command to broadcast a message to users before the system goes down. See wall(1M) or shutdown(1M) in the HP-UX Reference.

  4. If your system is an NFS server and file systems on the disk you are moving are exported,

    1. Find the NFS clients by logging in to the NFS server and looking at the /etc/exports file. Refer to exports(4) in the HP-UX Reference.

    2. Notify the users on the NFS client systems that data on the disk being relocated will be inaccessible temporarily (users on a diskless system will be unable to use their system at all).

    3. Unmount the file systems from the NFS client. If you do not unmount the file systems from the client, the client will receive NFS error messages when accessing the files on the disk.

      There are several methods to unmount the NFS client file systems:

      • Enter the Remote Administration area of SAM on the NFS server and unmount the file systems remotely.

      • Log in directly to each NFS client and unmount the file systems using either SAM or HP-UX commands.

      Refer to the file systems chapter of the Managing Systems and Workgroups for specific instructions on unmounting file systems. For detailed information on Network File Systems, refer to Installing and Administering NFS Services.

  5. If you are moving an LVM disk which is not being used for the root file system,

    1. Execute a vgdisplay -v command to display the contents of the active volume groups. (When moving an LVM disk, most of your LVM commands will be based on the volume group to which the disk belongs.)

    2. Execute lvdisplay -v for every logical volume in the volume group of the disk being removed to locate any logical volumes currently straddling the disk being moved and another disk. If you find any,

      • Back up the data and remove the logical volume, by executing an lvremove command.

        Or, if the logical volume is mirrored,

      • Remove the mirroring, by executing an lvreduce -m 0 command.

    3. Execute a vgchange command to deactivate the volume group to which the disk is being added.

    4. If the disk comprises an entire volume group, execute a vgexport command to remove it from the current configuration.

      If the disk comprises a portion of a volume group, execute a vgreduce command.

      The disk is now free to be used as desired.

  6. Determine the hardware address for the new location. Look at the Hardware Path field of ioscan output to make sure you choose an unused hardware address.

  7. If you are moving a disk drive containing the root file system (and you want to continue to use it as root), you will need to make sure the AUTO file on the root disk boot area does not specify a hard-coded hardware path. To check this,

    1. Locate the root disk by executing mount or bdf and looking for the / entry.

    2. View the current contents of the AUTO file by executing the lifcp command and using - to display the output. For example,

      bdf
         Filesystem          kbytes    used   avail %used Mounted on
         /dev/dsk/c1t6d0    1813487  467756 1164382   29% /
         hera:/users        3916236 2978782  545830   85% /hera/home
         ...
      /usr/bin/lifcp /dev/dsk/c1t6d0:AUTO -
         hpux (;0)/stand/vmunix

      The output from lifcp should appear just as in this example. If instead, you see output that shows an explicit hardware path (for example, hpux (56.6.0;0)/stand/vmunix), you will need to update the AUTO file. To do so, execute the mkboot command with the -a option and verify your results:

      /usr/sbin/mkboot -a "hpux (;0)/stand/vmunix" /dev/dsk/c1t6d0
      /usr/bin/lifcp /dev/dsk/c1t6d0:AUTO -
         hpux (;0)/stand/vmunix
      • Once the hardware path is removed, the system will boot using the path selected from processor-dependent code.

      • The ;0 specifies that you are dealing with the entire disk.

      • /dev/dsk/c1t6d0 is the device special file for the current location of the root disk.

      CAUTION: The mkboot command overwrites the contents of the autoboot string.
  8. If your /stand/system file includes (optionally) an explicit reference to the location of swap and/or dump, and these are located on the disk being moved, your kernel will have to be rebuilt for the operating system to find the new locations.

    1. Change directory to the build environment (/stand/build). There, execute a system preparation script, system_prep, which extracts the system file from the current kernel, as follows:

      cd /stand/build
      /usr/lbin/sysadm/system_prep -v -s system

      The system_prep script writes a system file in your current directory (that is, it creates /stand/build/system). The -v gives verbose explanation as the script executes.

    2. Manually edit the /stand/build/system file to reflect the new hardware path(s).

      NOTE: Do not use the kmsystem command to perform this step; edit the file directly.
    3. Build the kernel by invoking the command

      /usr/sbin/mk_kernel -s /stand/build/system

      The mk_kernel command creates /stand/build/vmunix_test, a kernel ready for testing.

    4. Save the old system file by moving it. Then move the new system file into place.

      mv /stand/system /stand/system.prev
      mv /stand/build/system /stand/system
    5. Prepare for rebooting by invoking the kmupdate command. This action sets a flag that tells the system to use the new kernel when it restarts.

      /usr/sbin/kmupdate
  9. Shut down and halt your system using the /usr/sbin/shutdown -h command.

  10. Turn off the peripheral devices (including the disk drive) and then your SPU.

  11. Physically move the disk drive and write down its new hardware location

  12. Power up all peripheral devices, wait for them to indicate "ready", and then power on the SPU.

  13. If you are moving a disk containing the root file system, you must change the hardware path that is read from stable storage:

    1. Start up your system, but override the autoboot. Do not boot from the primary or alternate boot path. Instead, enter Boot Administration mode. (Note, boot ROM administration is system-dependent, and thus differs for Series 700 and 800 systems. The boot ROM menus, however, are self-explanatory. Use one of the help commands (Help or ?) whenever you are uncertain of what to do.

    2. On a Series 700, boot from the new hardware address of your root disk by using the Boot command and proceed to the initial system loader. For example,

      BOOT-ADMIN> boot 2/0/1.4.0 is

      On a Series 800, enter the new hardware address of your root disk and boot your system. For example, if your new hardware address is 52.1, enter b 52.1.

      Answer Y to the prompt: Interact with IPL? This will invoke the initial program loader.

    3. Set the system's primary boot path in stable storage to the new hardware address, by using the primpath command at the ISL> prompt. The system will prompt you to enter the primary boot path.

    4. Verify the contents of your AUTO file, this time, by executing the lsautofl command. You should see hpux (;0)/stand/vmunix.

    5. Boot your system by typing in the contents of the AUTO file. Note, if you have moved a root LVM disk, boot to LVM maintenance mode by using the -lm option.

      For example,

      ISL> hpux boot (;0)/stand/vmunix
      or
      ISL> hpux -lm boot (;0)/stand/vmunix

      This command loads the kernel from the HP-UX file system and transfers control to the loaded device. On booting up, insf identifies all devices it finds (including the newly moved disk) and creates /dev files for them.

  14. Log in.

  15. If you have moved an LVM root disk, proceed through the following sequence of commands to gain access to the root disk at the new location:

    1. Execute a vgchange command to reactivate the root volume group.

    2. Execute an lvlnboot command to view the logical volumes in the volume group.

    3. Execute an lvrmboot command to remove the current definitions of root, swap, and dump from the disk's Boot Data Reserved Area.

    4. Execute lvlnboot commands to redefine root, swap, and dump. Use the -v option for verbose output.

    5. Execute a vgchange command to deactivate the root volume.

    6. Reboot the system.

    For example, if root is redefined as lvol1, swap as lvol2, and dump as lvol3,

    /usr/sbin/vgchange -a y /dev/vg00
    /usr/sbin/lvlnboot -v
    /usr/sbin/lvrmboot -r /dev/vg00
    /usr/sbin/lvlnboot -r /dev/vg00/lvol1
    /usr/sbin/lvlnboot -s /dev/vg00/lvol2
    /usr/sbin/lvlnboot -d /dev/vg00/lvol3
    /usr/sbin/vgchange -a n /dev/vg00
    /usr/sbin/reboot
  16. Identify the device files corresponding to the newly moved disk, by using /usr/sbin/ioscan -fun -C disk and looking for the disk's hardware path. Write down the name of the new block device special file.

  17. Create a backup copy of the /etc/fstab file:

    cp /etc/fstab /etc/fstab.old
  18. Edit /etc/fstab to include the block device special file of the disk at its new location.

    Once edited, the /etc/fstab file will provide accurate information to the mount command. If the newly located disk is not the root disk, you may now mount it. (If the newly located disk is the root disk, it has been mounted already by other means.)

    /usr/sbin/mount -a
  19. If your system is an NFS server, remount the file systems on its clients. Do so by executing the mount command on the NFS client systems.

  20. Update any software application configurations that use the relocated disk drive to make sure they use the new device files. Refer to your software application documentation for specific instructions.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000 Hewlett-Packard Development Company, L.P.