 |
» |
|
|
 |
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: Back up the files on the disk drive to be
moved; see the backup chapter in Managing Systems and
Workgroups. 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 |
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. If your system is an NFS server and file systems on
the disk you are moving are exported, 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. 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). 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.
If you are moving an LVM disk which is not being
used for the root file system, 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.) 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.
Execute a vgchange command to deactivate the volume group to which
the disk is being added. 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.
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. 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, Locate the root disk by executing mount or bdf and looking for the / entry. 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. |  |  |  |  |
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. 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. 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. |  |  |  |  |
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. 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 |
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.
Shut down and halt your system using the /usr/sbin/shutdown -h command. Turn off the peripheral devices (including the disk
drive) and then your SPU. Physically move the disk drive and write down its new
hardware location Power up all peripheral devices, wait for them to indicate
"ready", and then power on the SPU. If you are moving a disk containing the root file
system, you must change the hardware path that is read from stable
storage: 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. 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. 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. Verify the contents of your AUTO file, this time, by executing the lsautofl command. You should see hpux (;0)/stand/vmunix. 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.
Log in. 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: Execute a vgchange command to reactivate the root volume group. Execute an lvlnboot command to view the logical volumes in the volume
group. Execute an lvrmboot command to remove the current definitions of root, swap, and dump from the disk's Boot Data Reserved Area. Execute lvlnboot commands to redefine root, swap, and dump. Use the -v option for verbose output. Execute a vgchange command to deactivate the root volume. 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 |
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. Create a backup copy of the /etc/fstab file: cp /etc/fstab /etc/fstab.old |
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.) 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. 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.
|