Moving an LVM disk drive to a new SCSI address

Prepared by Peggy Bruehl and Rich Grumm (SOO, CTP)


The following instructions are NOT intended for a disk containing the root file system. For instructions on moving a root file system, please see the manual Configuring HP-UX for Peripherals on your LaserROM Documentation CD

  1. Make a tape back up of the contents of the drive to be moved. If the drive to be moved is NFS mounted to other computers, unmount the drive and notify users that the drive will be unavailable for a short time.
  2. Make a copy of the existing device drivers for this volume group.
    
        cp -R /dev/vg03 /dev/vg03.bak
    
  3. Halt and power down the system.
    
        shutdown -h 0
    
  4. Change scsi jumpers to new SCSI ID. For example, the original SCSI ID is 3, and the new SCSI ID is 4.
  5. Power on the system.
  6. Interrupt boot sequence by pressing the ESC key.
  7. Boot to the ISL level:
    
        boot pX isl
    
    where X is the SCSI ID of the root file system
  8. Boot to the LVM maintenance mode.
    
        hpux -lm
    
  9. Now, extract the volume group information from the old volume group.
    
        vgexport /dev/vg03
    
    Check to be sure that the volume group directory and all its files have been removed. If they are not gone, remove them now.
    
        rm -rf /dev/vg03
    
  10. Make a new directory for the volume group.
    
         mkdir /dev/vg03
    
  11. Make a new device file for the volume group.
    
         mknod /dev/vg03/group c 64 0xNNI000
    
    where NN is the card instance of your SCSI interface card, and I is the *new* SCSI ID for the disk. You can find the card instance number by looking at the minor numbers of all your other SCSI device files. For example:
    
         ls -ls /dev/dsk
         0 brw-r----- 1 root sys 31 0x005000 Jun 7 1996 c0t5d0
         0 brw-r----- 1 root sys 31 0x006000 Jun 7 1996 c0t6d0
         ls -ls /dev/vg00/group
         0 crw-r----- 1 root root 64 0x000000 Jun 7 1996 /dev/vg00/group
    
    In this case, the card instance number is "00". To change the SCSI ID to 4, the command is:
     
         mknod /dev/vg03/group c 64 0x004000
    
  12. Add the new volume group (with the new SCSI ID) to the system.
    
         vgimport /dev/vg03 /dev/dsk/c0t4d0
    
  13. Activate the volume group.
    
         vgchange -a y /dev/vg03
    
  14. Add the new volume group to the LVM volume group configuration backup file.
    
         vgcfgbackup /dev/vg03
    
  15. Reboot.
  16. Use SAM to mount (now and at boot) the new volume group. Do not initialize the disk or create a new filesystem. Also, use SAM to re-establish any NFS mounts.