Showing posts with label Root Disk. Show all posts
Showing posts with label Root Disk. Show all posts

Thursday, 24 November 2011

Root disk failed in HP Unix ??? How to change the Root disk?

If the disk is hot swappable, remove the disk

1. # vgreduce -f /dev/vg00

This will remove the failed disk from vg00

2. # lvlnboot -R

3. Insert the new disk

4. # ioscan -fnC disk

5. # vgcfgrestore -n /dev/vg00 /dev/rdsk/

6. # mkboot /dev/rdsk/devicefile

7. # mkboot -a "hpux" /dev/rdsk/devicefile

8. # vgchange -a y /dev/vg00

9. # vgsync /dev/vg00

10. # lvlnboot -R

11. confirm with vgdisplay, lvdisplay, pvdisplay and lvlnboot.

=============================
If the disks are not hot swappable

1. Shutdown and get the disk replaced

2. boot in single-user mode

3. ioscan, find the device file

4. vgcfgrestore -n /dev/vg00 /dev/dsk/

5. mkboot /dev/rdsk/

6.mkboot -a "hpux" /dev/rdsk/

7.vgchange -a y /dev/vg00

8.vgsync /dev/vg00

9. Reboot in multi-user mode

Wednesday, 23 November 2011

LUN path status - How to ??

To get the LUN path status and no.of paths details run the below command

scsimgr lun_map -D /dev/rdisk/diskXXX

Replace failed root disk in itanium server - With breaking the mirror.

(THIS IS BREAKING THE MIRROR ON FAILED DISK METHOD)

Pre activity steps: Take the below command o/p

# lvlnboot –v

#setboot

#pvdisplay -v /dev/disk/disk?? | more

#vgcfgbackup /dev/vg00

#vgexport -p -v -m /tmp/vg00.map /dev/vg00

==========================


Replacement steps: (This is for Mirrored alternate boot disk replacement)

Break the mirrors first on failed disk

step 1: Remove the mirror copy from disk consider failed disk as - /dev/disk/disk2


#for I in 0 1 2 3 4 5 6 7 8
>do
>lvextend –m 0 /dev/vg00/lvol$I /dev/dsk/disk2
>done

step 2 : # vgreduce /dev/vg00 /dev/disk/disk2_p2

step 3 : # pvchange -a N /dev/dsk/disk2_p2 (Deactivate the disk)

===========================


Step 4 : Then remove the failed disk and replace with a new disk

Stpe 5: #ioscan -m lun and #ioscan -funNC disk

(check the new lun number for new disk)

step 6: vi /tmp/partfile

3
EFI 500MB
HPUX 100%
HPSP 400MB

(Dont copy paste, edit the file manually)

Step 7: #idisk -wf /tmp/partfile /dev/rdisk/disk32

( Lets consider the new disk lun id as 32)

Step 8 : #insf -e -C disk

(create a disk file for new lun)

step 9 : # mkboot -e -l /dev/rdisk/disk32

(set the boot partition on the disk)

step 10 : # efi_fsinit -d /dev/rdisk/disk32_p1

(initialize the FAT FS on new disk's EFI partition)

step 11: # efi_cp -d /dev/rdisk/disk32_p1 -u /EFI/HPUX/AUTO /tmp/auto

(cat /tmp/auto - check the auto file content)

step 12 : #mkboot -a "boot vmunix -lq" /dev/rdisk/disk32

(change the auto file content)

step 13 : # efi_ls -d /dev/rdisk/disk32_p1

step 14 : # efi_ls -d /dev/rdisk/disk??_p3 /EFI/HP

(chk this for primary boot disk , To check whether diag utilities are there on primary boot disk)

step 15 : # dd if=/dev/rdisk/disk??_p3 of=/dev/rdisk/disk32_p3 bs=1024k

(copy the diag utility from primary boot disk to sec boot disk)


step 16 : # pvcreate -f -B /dev/rdisk/disk32_p2

step 17 : # vgextend vg00 /dev/disk/disk32_p2

step 18 : #vgdisplay -v vg00

(cpnfirm disk added to the VG)

step 19 : #Extend the lvols one by one (mirror the lvols ot the new disk)

#for I in 0 1 2 3 4 5 6 7 8
>do
>lvextend –m 1 /dev/vg00/lvol$I /dev/dsk/
>done


step 20 : #vgdisplay -v vg00

(to check all the lvols are extended and in sync)


step 21 : #lifls -l /dev/rdisk/disk32_p2

step 22 : setboot -a "lun path of sec disk"

Copy HPSP DIAG utilities to new disk - ??

After Replace the failed disk or added new root disk on Itanium server ..We need to mirror the disk and also we need to copy HPSP partition and its information.
Normally while Mirror the DIAG utilities not gettting copied to new disk. This we need to copy using below DD command only.

First check DIAG utilities are there on existing disk

# efi_ls -d /dev/rdisk/disk3_p3 /EFI/HP

Then run the below command to copy the Files to new disk

#dd if=/dev/rdisk/disk3_p3 of=/dev/rdisk/disk2_p3 bs=1024k

(disk3 - old disk and disk2 - new disk)

==================================================

Note : If the DIAG utilities are there means u will get the o/p like below..

# efi_ls -d /dev/rdisk/disk3_p3 /EFI/HP

FileName Last Modified Size
. 3/10/2010 0
.. 3/10/2010 0
DIAG/ 3/10/2010 0
TOOLS/ 3/10/2010 0

total space 418598912 bytes, free space 379895808 bytes