Operating System - HP-UX
1752572 Members
4504 Online
108788 Solutions
New Discussion юеВ

Re: To change Disk hardware path

 
SOLVED
Go to solution
twang
Honored Contributor

To change Disk hardware path

Dear guys,
This morning, I found one of disks has problem, I try to plug the problem disk onto another slot, and I can successfully find this disk, I believe the problem is because of the bad slot. Now I need to change the disk's hardware path and readd this disk into its VG.
Do you have any advice?

Thanks in advance.
tommy

10 REPLIES 10
twang
Honored Contributor

Re: To change Disk hardware path

More info...
I have reinstalled the device file and test the "problem disk" and it works well:
# insf -eC disk

# dd if=/dev/rdsk/c0t10d0 of=/dev/null bs=32768k

Naveej.K.A
Honored Contributor

Re: To change Disk hardware path

hi tommy,

vgreduce -f will remove all physical volumes from the volume group.

or vgreduce -l pvpath will remove the particular entry for the PV from the /etc/lvmtab file

vgimport /dev/vgname /dev/dsk/newPVpath

should work for you...

with best wishes
Naveej
practice makes a man perfect!!!
Steven E. Protter
Exalted Contributor

Re: To change Disk hardware path

Each of the "slots" has a hardware path associated with it.

How it works depends on the model and the dip switch settings set.

Its important to get the problem diagnosed and corrected because it could be the first sign of a common piece of hardware going. Many systems have a part called a drive cage. all power and scsi channels go through it. When it starts to go, eventually the system starts consuming drives until the drive cage is replaced.

For more specific help, posting the system model type and number is useful.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Tapas Jha
Valued Contributor

Re: To change Disk hardware path

Hi Tommy,

I think insf command will only match disk at a hardware path and will show disk hardware path by ioscan which you have already found.
I think you need following things to be done(If it is mirrored)

1)Boot the system in LVM maintenance (bo alt; interact with IPL->y;hpux -lm -lq

2)vgcfgrestore -n /dev/vg?? /dev/rdsk/c?t?d?

3) vgchange -a y /dev/vg?? ( Normally this automatically sync the vg??)

Rgds
Tapas
Tapas Jha
twang
Honored Contributor

Re: To change Disk hardware path

Thanks guys for your reply, attached is output from "vgdisplay -v /dev/vg01".

Yes, I can remove the PV from the problem VG and readd the PV,
but I would like to use the data on the problem disk. Is it possible to use this method?

More info...
# diskinfo /dev/rdsk/c0t10d0
SCSI describe of /dev/rdsk/c0t10d0:
vendor: SEAGATE
product id: ST39173WC
type: direct access
size: 8891556 Kbytes
bytes per sector: 512

# ioscan -fnkC disk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 8/4.5.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c0t5d0 /dev/rdsk/c0t5d0
disk 1 8/4.8.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c0t8d0 /dev/rdsk/c0t8d0
disk 12 8/4.10.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c0t10d0 /dev/rdsk/c0t10d0
disk 9 8/12.3.0 sdisk CLAIMED DEVICE IBM DGHS09Y
/dev/dsk/c1t3d0 /dev/rdsk/c1t3d0
disk 3 8/12.4.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c1t4d0 /dev/rdsk/c1t4d0
disk 4 8/12.5.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c1t5d0 /dev/rdsk/c1t5d0
disk 5 8/12.6.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c1t6d0 /dev/rdsk/c1t6d0
disk 2 8/16/5.2.0 sdisk CLAIMED DEVICE PIONEER DVD-ROM DVD-303
/dev/dsk/c2t2d0 /dev/rdsk/c2t2d0
disk 10 10/12.3.0 sdisk CLAIMED DEVICE IBM DGHS09Y
/dev/dsk/c4t3d0 /dev/rdsk/c4t3d0
disk 6 10/12.4.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c4t4d0 /dev/rdsk/c4t4d0
disk 8 10/12.6.0 sdisk CLAIMED DEVICE SEAGATE ST39173WC
/dev/dsk/c4t6d0 /dev/rdsk/c4t6d0

regards tommy
V.Tamilvanan
Honored Contributor
Solution

Re: To change Disk hardware path

Hi,


#/usr/sbin/vgcfgrestore [-R] [-F] -n vg_name [-o old_pv_path] pv_path


#/usr/sbin/vgcfgrestore -n vg01 -o /dev/rdsk/c0t9d0 /dev/rdsk/c0t10d0
#vgchange -a y vg01

See man pages of vgcfgrestore.
V.Tamilvanan
Honored Contributor

Re: To change Disk hardware path

Hi twang,

You no need to remove or add any disks into VG. You just execute the previos 2 commands what i have mentioned. It will solve your problem.
Even I did it so many times. The data will be intact if your disk is OK.
twang
Honored Contributor

Re: To change Disk hardware path

Hi Tamil,
The vgchange command shows a warning, is it normal?
The following is command output:
# vgcfgrestore -n /dev/vg01 -o /dev/rdsk/c0t9d0 /dev/rdsk/c0t10d0
Volume Group configuration has been restored to /dev/rdsk/c0t10d0
wmo_host# vgchange -a y /dev/vg01
vgchange: Warning: Couldn't attach to the volume group physical volume "/dev/dsk/c0t9d0":
The path of the physical volume refers to a device that does not
exist, or is not configured into the kernel.
Activated volume group
Volume group "/dev/vg01" has been successfully changed.

regards
tommy
V.Tamilvanan
Honored Contributor

Re: To change Disk hardware path

Hi twang,

Can you check whether the /dev/dsk/c0t9d0 is still in the /etc/lvmtab. If it is so move the /etc/lvmtab to different name and do a vgscan. It should remove the entry of /dev/dsk/c0t9d0 from the /etc/lvmtab.

#mv /etc/lvmtab /etc/lvmtab.org
#vgscan -a -v

Once u do . Can u post your /etc/lvmtab and vgdisplay output.