Operating System - HP-UX
1837651 Members
2864 Online
110117 Solutions
New Discussion

pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root disk)

 
SOLVED
Go to solution
Sammy_2
Super Advisor

pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root disk)

rp4440/ hpux 11.11

I have a disk which shows as claimed on ioscan but vgdisplay -v vg00 shows as unavailable. (ioscan and vgdisplay screenshot below).

 

I have instructions on disabling access to potentially bad drive with pvchange and then replace the drive. But pvchange does not have -n or N option. Why ?

 

Alternatively, if I lvreduce all lvols in bad drive and then pull out the drive, is that safe on a live system  ? I guess ioscan will show the drive as "CLAIMED" even if I lvreduce all lvos so is the drive still connected to the bus. ?

 

 

 

inbphes6:/etc/lvmconf ==> pvchange -a N /dev/dsk/c2t1d0
Usage: pvchange
        [-A Autobackup]
        [-s] |
        {[-S Autoswitch] [-x Extensibility] [-t IOTimeout] [-z SparePV]}
        PhysicalVolumePath
"a": Illegal option.


inbphes6:/etc/lvmconf ==> model
9000/800/rp4440
inbphes6:/etc/lvmconf ==> uname -a
HP-UX inbphes6 B.11.11 U 9000/800 2858018648 unlimited-user license


#vgdisplay -v vg00

 --- Physical volumes ---
   PV Name                     /dev/dsk/c2t1d0
   PV Status                   unavailable
   Total PE                    4374
   Free PE                     2311
   Autoswitch                  On

   PV Name                     /dev/dsk/c3t0d0
   PV Status                   available
   Total PE                    4374
   Free PE                     601
   Autoswitch                  On

 

nbphes6:/etc/lvmconf ==> ioscan -fnkC disk|more
Class     I  H/W Path        Driver   S/W State   H/W Type     Description
===========================================================================
disk      0  0/0/3/0.0.0.0   sdisk    CLAIMED     DEVICE       TEAC    DV-28E-C
                            /dev/dsk/c0t0d0   /dev/rdsk/c0t0d0
disk      1  0/1/1/0.1.0     sdisk    CLAIMED     DEVICE       HP 73.4GST373454L
C
                            /dev/dsk/c2t1d0   /dev/rdsk/c2t1d0
disk      2  0/1/1/1.0.0     sdisk    CLAIMED     DEVICE       HP 73.4GST373454L
C

good judgement comes from experience and experience comes from bad judgement.
9 REPLIES 9
Bill Hassell
Honored Contributor

Re: pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root di

Check the man page for pvchange on your system. The command is reporting that -a is not a valid option. It sounds like your system is very badly out of date and needs patching. pvchange -a was not part of the original HP-UX release. So you'll have to either patch your system (a *lot* of LVM and disk patches are missing), or deactivate the volume group.If that doesn't work, you'll have to reboot into single user mode to replace the disk.



Bill Hassell, sysadmin
Torsten.
Acclaimed Contributor

Re: pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root di

As said, you need patches, but since it is already "unavailable" it has now the same status as it would have after running "pvchange -a n ...", so you can replace the drive now.


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Sammy_2
Super Advisor

Re: pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root di

 


Torsten,
I intend to lvreduce all vol from partially defective drive adn vgreduce the drive out of VG. From what I can gather from  your comment, I can replace the drive (due to unavailable status in vgdisplay -v). The ioscan -fnkC status "CLAIMED" status for this defective drive can be ignored.  Right ?
Also, when I do lvreduce -m 0 , it says command succeedded but does not release the lock and not give me the prompt back.

Is it ok to rm the lvmlock and proceed lvreducing other logical volus in vg00 ?

Thanks


Bill,
I intend to install PHKL_31216 and PHCO_30698 patches to enable OLR so I can do the pvchange options to deactivate the drive and replace it this time. Thanks for helping me with solution.

Thanks

good judgement comes from experience and experience comes from bad judgement.
Torsten.
Acclaimed Contributor
Solution

Re: pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root di

The disk controller is somehow alive (CLAIMED), but the disk mech itself is dead - hence no write or read.

If you do a LVM operation (like lvreduce), the system want to write the changed information on each disk within the VG.

But it cannot write to the bad disk, hence it hung.

Recommended procedure (without the patches) is to lvreduce -k ..., but since it is already unavailable, I would proceed with removing the disk, check ioscan and vgdisplay again, insert the new disk, ioscan, vgcfgrestore , etc ...

If you removed some mirrors, take care to set them up again!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Sammy_2
Super Advisor

Re: pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root di

Torsten, Thanks again.

I agree with you. So, I dont have very current patches so

1)I will lvreduce all lvols ( I have done some already),

2)If lvols come back successfully and dont give me prompt back (like they did before), I delete the lvmlock file and go onto lvreduce next vol.

3) pull out drive (Hopefully no issues )

4) ioscan to see claimed changed to NO_HW

5) put in drive , ioscan, change to CLAIMED

6) do the mirroring the boot drive (mkboot, lvextend, etc)

That shoud be it .

 

Let me know if you dont agree with anything I did. Thanks

good judgement comes from experience and experience comes from bad judgement.
Torsten.
Acclaimed Contributor

Re: pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root di

As long as the disk is not really dead, it will stay in CLAIMED status. Maybe you did not really reduce the mirrors, because the process got hung. I would either do a lvreduce with -k option or just pull the disk. Once pulled out, you can force LVM to reduce the disk (vgreduce -f -- see man page). Then start over with mirroring.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
sumakuma2011
Occasional Advisor

Re: pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root di

Hi,

 

    Follow below steps to remove mirrored disk 

 

#vgreduce  vg00   /dev/dsk/c2t1d0

Then run 

#pvremove /dev/rdsk/c2t1d0

 

Regards,

Sumant
Torsten.
Acclaimed Contributor

Re: pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root di

This will probably hang too ...

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Sammy_2
Super Advisor

Re: pvchange -a n /dev/dsk/c2t1d0 gives me usage error (trying to replace defective mirrored root di

Thanks.

when I do "vgreduce -f vg00", how does the lvm know which of the 2 luns to remove from lvmtab. Do I have to specify somewhere to vgreduce the "stale" disk drive.

good judgement comes from experience and experience comes from bad judgement.