Remove faulty disk LV from VG | Unix Linux Forums | HP-UX

  Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

Remove faulty disk LV from VG

HP-UX


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-20-2012
Shirishlnx Shirishlnx is offline
Registered User
 
Join Date: Feb 2012
Last Activity: 20 May 2014, 3:00 AM EDT
Location: India
Posts: 112
Thanks: 9
Thanked 3 Times in 3 Posts
Remove faulty disk LV from VG

Hi,

Have mirrored the primary disk to 3 .

Server and OS:
# uname -a
HP-UX pdwp1s B.11.11 U 9000/800 118434630 unlimited-user license

# model
9000/800/L3000-7x



Code:
# strings /etc/lvmtab
/dev/vg00
+F@<
/dev/dsk/c1t2d0
/dev/dsk/c2t2d0
/dev/dsk/c2t0d0

But now I have only 1 disk active (Other 2 removed ).. But am failed to remove the red marked disk from VG00 .. .

Here's the present status

Code:
# vgdisplay -v vg00
vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group
vgdisplay: Warning: couldn't query all of the physical volumes.
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      10
Open LV                     10
Max PV                      16
Cur PV                      3
Act PV                      2
Max PE per PV               4350
VGDA                        4
PE Size (Mbytes)            8
Total PE                    8680
Alloc PE                    7713
Free PE                     967
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0

# lvlnboot -v
lvlnboot: Couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group

Now I want to remove the above VG error as something expecting like this .


Code:
# strings /etc/lvmtab
/dev/vg00
+F@<
/dev/dsk/c1t2d0

## Have tried below
# vgreduce vg00 /dev/dsk/c2t0d0
vgreduce: Couldn't query physical volume "/dev/dsk/c2t0d0":
The specified path does not correspond to physical volume attached to
this volume group

# mv /etc/lvmtab /etc/lvmtab_
# vgscan -av
# vgchange -a y /dev/vg00
vgchange: Volume group "/dev/vg00" does not exist in the "/etc/lvmtab" file.

Please suggest the Solution steps ...

--Shirish Shukla
Sponsored Links
    #2  
Old 03-22-2012
RuBiCK RuBiCK is offline
Registered User
 
Join Date: Aug 2009
Last Activity: 3 June 2014, 8:45 AM EDT
Location: Spain
Posts: 49
Thanks: 4
Thanked 1 Time in 1 Post
Did your try the following?

Code:
 
 vgreduce -f vg00

Extract from man vgreduce:
Quote:
-f vg_name force reduction of missing physical volume(s) in a
given volume group. vgreduce obtains the name of
each physical volume (PV) belonging to the volume
group. It then reads the kernel PV structures to
work out which PVs are missing. PVs which are
missing will be candidates for removal. If all
the physical extents on the missing PV are free
then it will be removed from the volume group.
Otherwise vgreduce will report the physical to
logical extent mapping. For missing PVs which
have extents in use, you must free up all the
extents by using lvreduce or lvremove and re-run
vgreduce with the -f option. This option is most
commonly used when the vgdisplay(1M) command shows
"Cur PV" higher than "Act PV" and all of the PVs
belonging to the volume group are attached. This
option only works on PVs and not on links. See
the -l option for details on handling missing
links.
Sponsored Links
    #3  
Old 03-22-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 673 Times in 642 Posts
Please post the output from:

Code:
ioscan -fn

And explain in detail how you got into this situation. If this is another attempt at cloning without using a HP-UX Ignite backup or a cold build, please give the history with every command typed.
No idea why you persist in trying to make a valid system from trying to repair broken mirrors. It is not possible.

Last edited by methyl; 03-22-2012 at 05:37 PM.. Reason: spelin
    #4  
Old 04-23-2012
hedkandi's Avatar
hedkandi hedkandi is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 10 December 2012, 5:52 AM EST
Location: Doha, Qatar
Posts: 187
Thanks: 27
Thanked 9 Times in 8 Posts
This is what I did after mirroring to remove the old disks:

1.unmirror disks

Code:
spthpnXX:/root# lvreduce -m 0 /dev/vgSPAN/lvol1 /dev/dsk/c33t8d2 /dev/dsk/c35t8d3 /dev/dsk/c33t8d4 /dev/dsk/c35t8d5 
Logical volume "/dev/vgSPAN/lvol1" has been successfully reduced.
Volume Group configuration for /dev/vgSPAN has been saved in /etc/lvmconf/vgSPAN.conf

2. remove old LUN from VG


Code:
# vgreduce vgSPAN /dev/dsk/c33t8d2 /dev/dsk/c35t8d3 /dev/dsk/c33t8d4 /dev/dsk/c35t8d5

3. Remove the old entries from /etc/lvmpvg


Code:
PVG     PVG0
/dev/dsk/c33t8d2
/dev/dsk/c35t8d3
/dev/dsk/c33t8d4
/dev/dsk/c35t8d5

4. issue "rmsf /dev/dsk/cXtXdX" on following devices


Code:
rmsf /dev/dsk/c33t8d2
rmsf /dev/dsk/c35t8d3
rmsf /dev/dsk/c33t8d4
rmsf /dev/dsk/c35t8d5

OR


Code:
# rmsf -H <HW PATH>

Sponsored Links
    #5  
Old 04-24-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 673 Times in 642 Posts
@hedkandi
Were you running HP-UX when you issued those commands?
Sponsored Links
    #6  
Old 04-24-2012
hedkandi's Avatar
hedkandi hedkandi is offline
Registered User
 
Join Date: Aug 2008
Last Activity: 10 December 2012, 5:52 AM EST
Location: Doha, Qatar
Posts: 187
Thanks: 27
Thanked 9 Times in 8 Posts
@methyl

yes..its from an 11.11
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Remove Faulty disk from HP-UX LVM VG Shirishlnx HP-UX 9 04-13-2012 10:05 AM
VXVM : How to Remove Disk? kamaldeep1986 Solaris 1 07-02-2009 01:52 AM
Removing Faulty Disk SSA vuppala360 AIX 2 09-08-2008 11:59 AM
How to remove disk from mirror? Yac AIX 3 09-24-2007 02:40 PM
Need to remove a disk from Veritas kiem Solaris 3 04-04-2007 05:13 PM



All times are GMT -4. The time now is 02:32 PM.