Operating System - HP-UX
1837431 Members
3357 Online
110116 Solutions
New Discussion

Changing Harddisk in HPUX10.20b

 
SOLVED
Go to solution
Henry Chua
Super Advisor

Changing Harddisk in HPUX10.20b

Hi Guys,

I am running HPUX10.20b, one of my harddrive is faulty and I have gotten a new harddisk to replace it. Do I need to format it? if so how should I do it?..

Best regards
Henry
14 REPLIES 14
Ranjith_5
Honored Contributor

Re: Changing Harddisk in HPUX10.20b

Hi Henry,

Yes, Steps are here.

1. Connect the disk.
2. issue ioscan -fnC disk to find out the device file.
3.do pvcreate /dev/rdsk/cxtxdx ( this formats the drive)

Regards,
Syam
Ravi_8
Honored Contributor

Re: Changing Harddisk in HPUX10.20b

Hi

No need to format the disk

Just plug in the disk
#ioscan -fnC disk

check whether the disk is claimed or not, if claimed, you are free to manage the disk, if not claimed install the patch bundle
never give up
Sunil Sharma_1
Honored Contributor

Re: Changing Harddisk in HPUX10.20b

Henry,

1. remove hard disk
2. set the SCSI ID on new disk
3. insert/connect disk
4. ioscan
5. insf -e
6. ioscan -funCdisk (check the new disk and it's device file)
7. pvcreate /dev/rdsk/
8. vgcfgrestore -n /dev/dsk/
9. mount -a
10. restore data


sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Indira Aramandla
Honored Contributor

Re: Changing Harddisk in HPUX10.20b

Hi Henry,

If your disks are mirrored then you can hot swap (replace the faulty disk "on the fly").

Insert the new disk in the same slot of the faulty disk.

1. connect new hard disk in same slot
2. verify through ioscan to see the disk as claimed status
3. run vgcfgrestore command on this disk
#vgcfgrestore -n vgA /dev/dsk/cxtydz

4. vgchange vgA(not must but should be)

Now you can restore the data.

IA
Never give up, Keep Trying
Henry Chua
Super Advisor

Re: Changing Harddisk in HPUX10.20b

Hi Guys,

The disk appeared to be claimed using command ioscan -fnCdisk.

However when I used command "pvcreate" to format it as suggested the system prompted "pvcreate: The physical volume already belongs to a volume group"

so I used vgcfgrestore and the system then prompted
"vgcfgrestore -n /dev/vg01 /dev/rdsk/c0t5d0
vgcfgrestore: Couldn't query physical volume "/dev/dsk/c3t3d0":
The specified path does not correspond to physical volume attached to
this volume group
vgcfgrestore: Couldn't query physical volume "/dev/dsk/c0t5d0":
The specified path does not correspond to physical volume attached to
this volume group
PV /dev/rdsk/c0t5d0 has the following bad block/s with allocated alternates
which resides inside the user data area. Please run pvcreate [-B] -b
and specify these bad blocks before re-running vgcfgrestore.
Should you wish to override this operation, re-run the command
with the -F argument. In doing so, you may encounter data corruption.
Bad blocks: 52236033 197237179 66104452 22439530 158559020 156180
512 5462355 0 84443583 167772784 101690576 0 52236033 197237179
66104452 22439530 158559020 156180512 5462355 0 84443583 1677727
84 101690576 0 "

you guys know whats wrong?

thanks!!
Henry Chua
Super Advisor

Re: Changing Harddisk in HPUX10.20b

just to Add..2 disks were replaced in this instance.. i.e. c3t3d0 and c0t5d0..
Ranjith_5
Honored Contributor

Re: Changing Harddisk in HPUX10.20b

henry,

Pls post the output of
#strings /etc/lvmtab and

#ioscan -fnC disk.

Regards,
Syam

Henry Chua
Super Advisor

Re: Changing Harddisk in HPUX10.20b

sure Syam,

# cd /etc
# strings lvmtab
/dev/vg00
/dev/dsk/c0t6d0
/dev/vg01
/dev/dsk/c3t2d0
/dev/dsk/c3t3d0
/dev/dsk/c3t4d0
/dev/dsk/c0t5d0

# ioscan -fnCdisk
Class I H/W Path Driver S/W State H/W Type Description
============================================================================
disk 10 8/0/3/0.2.0 sdisk CLAIMED DEVICE SEAGATE ST39204LW
/dev/dsk/c3t2d0 /dev/rdsk/c3t2d0
disk 11 8/0/3/0.3.0 sdisk CLAIMED DEVICE SEAGATE ST39173W
/dev/dsk/c3t3d0 /dev/rdsk/c3t3d0
disk 4 8/0/3/0.4.0 sdisk CLAIMED DEVICE SEAGATE ST39173W
/dev/dsk/c3t4d0 /dev/rdsk/c3t4d0
disk 0 8/4/19/0.5.0 sdisk CLAIMED DEVICE IBM DDRS-39130WS
/dev/dsk/c0t5d0 /dev/rdsk/c0t5d0
disk 1 8/4/19/0.6.0 sdisk CLAIMED DEVICE IBM DDRS-39130WS
/dev/dsk/c0t6d0 /dev/rdsk/c0t6d0
disk 2 8/12/5.0.0 sflop CLAIMED DEVICE TEAC FC-1 HF 07
/dev/floppy/c1t0d0 /dev/rfloppy/c0t1d0 /dev/rfloppy/c1t0d0
disk 3 8/12/5.2.0 sdisk CLAIMED DEVICE TOSHIBA CD-ROM XM-6201TA
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
#


thanks guys
Ranjith_5
Honored Contributor

Re: Changing Harddisk in HPUX10.20b

Henry,

From your last post I understand that the 2 disks which you are planning to replace belong to a single VG called vg01, which is having total of 4 disks.

Have you enabled mirroring on this volumes? Are you able to fully access your data on this VGs?

Regards,
Syam
Henry Chua
Super Advisor

Re: Changing Harddisk in HPUX10.20b

Hi Syam,

Actually I have umount the specified filesystem belonging to the lv and lvremoved the lv prior to this. So I am not able to access the lv now.

c0t5d0 and c3t3d0 were faulty and has not been used for a period of time. so I merged c3t2d0 and c3t4d0 and worked with them till I gotten a replacement for the faulty units today..

hope this info help.. thanks!!!!

Ranjith_5
Honored Contributor
Solution

Re: Changing Harddisk in HPUX10.20b

Hi Henry

Now I understand that the lvs which were belonging to these PVs were removed by you.If it is done

THEN AND IF YOU ARE SURE

Deactivate your vg01 and do vgreduce

To remove the PVs which are marked missing in VG01, but entry still there in /etc/lvmtab , use the command

vgreduce -l /dev/vg01

The following messages will appear after missing PVS has been removed
successfully:

PV with key 0 successfully deleted from vg /dev/vg01

Repair done, please do the following steps.....:

1. Save /etc/lvmtab to another file.

2. Remove /etc/lvmtab.

3. Use vgscan -v to recreate /etc/lvmtab.

4. NOW use vgcfgbackup to save the LVM setup.

See man page of vgreduce.

Then do pvcreate and vgextend on thease PVs.

after this create new LVs using lvcreate and then newfs to create filesystem

The syntax for thease are already there in the above posts.

regards,
Syam
Henry Chua
Super Advisor

Re: Changing Harddisk in HPUX10.20b

Hi Syam,

Thanks for the valuable input. I think I am very close into achieving my goal.. but there seems to be a small hurdle when I attempted to create the new lv...
"
# lvcreate -n lvol01 /dev/vg01
Logical volume "/dev/vg01/lvol01" has been successfully created with
character device "/dev/vg01/rlvol01".
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
# lvextend -l 2168 /dev/vg01/lvol01 /dev/dsk/c3t2d0
Logical volume "/dev/vg01/lvol01" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
# lvextend -l 4338 /dev/vg01/lvol01 /dev/dsk/c3t3d0
lvextend: Physical volume "/dev/dsk/c3t3d0" does not belong
to volume group "/dev/vg01".
# "

I am stuck at the second PV

what do u think i should do..
THANKS!!!!
Henry
Ranjith_5
Honored Contributor

Re: Changing Harddisk in HPUX10.20b

Hi Henry,

#mv /etc/lvmtab /etc/lvmtab.old

#vgscan -av

this recreates the /etclvmtab with the updated PVs.

Else,

To forcefully remove the missing PVs from VG01 use:

#vgreduce -f /dev/vg01

Try now and reply. Im waiting.

Regards,
Syam
Henry Chua
Super Advisor

Re: Changing Harddisk in HPUX10.20b

Hi Syam,

Sorry I wasnt able to get back to you yesterday, somehow I was not able to log on to the forum.

I removed the entire vg01 and then recreated it.. thereafter it work perfectly with the guide u provided.. was able to complete without any problem.

Thank u for u help!!