- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- 11.23 - reduce dead PV from VG permanently
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2009 10:35 AM
07-31-2009 10:35 AM
11.23 - reduce dead PV from VG permanently
my environment:
HP-UX 11.23 and EMC Symmetrix storage system
I'm using EMC Clone technology to clone copy shared VG that has one mirror copy (production system). The clone target is having just half amount of PVs comparing to the production.
OK, then I'll import the target VG to a test system.
after import I need to execute:
vgchange -c n
vgchange -a y -q n
OK, then my question is:
vgdisplay
of course because the mirror is not available.
Now I would like to remove the 'dead' or 'ghost' PVs from the VG.
I know the PV-Keys for the stale PVs.
I've tried:
# vgreduce -f
Not all extents are free. i.e.
Out of 2085 PEs, only 77 are free.
You must free all PEs using
lvreduce/lvremove before the
PV can be removed.
# lvreduce -m 0 -k
Physical extents on remaining physical
volumes are stale or
Remaining physical volumes are not
responding.
lvreduce: The LVM device driver failed
to reduce mirrors on
the logical volume "
# lvreduce -m 0 -k
same error as above... this syntax works great on HP-UX 11i v3... but not on HP-UX 11.23 :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2009 10:49 AM
07-31-2009 10:49 AM
Re: 11.23 - reduce dead PV from VG permanently
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2009 11:02 AM
07-31-2009 11:02 AM
Re: 11.23 - reduce dead PV from VG permanently
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2009 11:11 AM
07-31-2009 11:11 AM
Re: 11.23 - reduce dead PV from VG permanently
To mirror on EMC you have to set up a disk to disk sync. i.e.
symbcv -g
symmir -g
Have you done this for the 25 disks?
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2009 11:23 AM
07-31-2009 11:23 AM
Re: 11.23 - reduce dead PV from VG permanently
Things I've done:
* I mapped 25 disks for the test system.
* Activated the EMC Clone (snapshot) from 25 production mirror devices to the target devices, visible for the test system.
* vgimport on test system
* vgchange -c n
* vgchange -a y -q n
then I've tried to remove those stale PEs from each LV on the VG... that is my goal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2009 11:25 AM
07-31-2009 11:25 AM
Re: 11.23 - reduce dead PV from VG permanently
Since you say Yes to BCV, this is how I do BCV refreshes (i.e. mirror the disk/split off and them mount only the final BCV mirror on new node). I never did it with less disk though. But hey, that's why they call it a test box.
On the node with the 25 active PV's:
1. Create a file with those EMC disk device numbers (the BCV or clone copy) - one to a line.
2. Run this quick loop to create an output file:
for d in `cat
do
syminq | grep -i $d >>
done
3. Check to make sure you only have the disk info you need (c-t-d-) by doing a simple:
ll
If more, clean up the bogus lines you got....till your sure you only have those records. One of the columns will have the device number it in to compare.
4. OK. Now trim down the file for what you really need:
cat
5. Now you have just the list you want. Such fun...I love this part...
vi
On line one do a CTL A (to put you at end of line). Hit your 'esc' key one time. Now with your curser there, hold down & keep holding down the Shift key and keep hitting the letter "j". You should see the next line jump up to the first line. Keep hitting that letter "j" until you have everything in one continual line!....Such fun.... When it's all one line save the file to a
6. OK...let's deal with your vg.
From the PRODUCTION node create a mapfile this way:
vgexport -pv -m /etc/lvmconf/vgname.mapxx /dev/vgname
Now copy that mapfile over to your test node.
Run (you better be on the test node here)
vgexport
mkdir /dev/vg
mknod /dev/vg/group c 64 0x--0000
Here is the key...
vgimport -v -m /path/vgname.mapxx -f /path/filename.out2 /dev/vgname
This vgimport will take the disk c-t-d- info supplied in that file you created and recreate the volume group with ONLY those disks.
Then do your vgchange lines you mention, and see where your at....and let us know.
Nite,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2009 11:42 AM
07-31-2009 11:42 AM
Re: 11.23 - reduce dead PV from VG permanently
however, as all the EMC source ldevs, aka LUNs, that are visible to the test system... are having exactly the information as the production...
and the production VG displays 50 PVs... 25 from each EMC Symmetrix.
clone source and target are from the same EMC Symmetrix. now when I'm importing the target, as a new VG to the test server... (yes, I'm having a disk file (vgimport -f
lvdisplay -v
although it is able to give a PV-key for it...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2009 12:25 PM
07-31-2009 12:25 PM
Re: 11.23 - reduce dead PV from VG permanently
You can remove the evil cat with:
for d in $(<
> ll
If you want to count the lines in the file:
wc -l
>cat
(Did you want something in the "", a space?)
You can optimize this to remove the evil cat:
cut -d" " -f 1
>Such fun...I love this part
Once is fun, otherwise you write a script. :-)
>On line one do a CTL A (to put you at end of line)
I think you meant shift A. And if you really want to just go to the end, just use "$".
>keep hitting the letter "j".
You can use a number before "J".
In fact you don't need to go to the end of the line, maybe just use "100J" and ignore any errors?
>When it's all one line
If you just wanted that, you could redo the cut(1) step:
echo $(cut -d" " -f 1
- Tags:
- evil cat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2009 10:30 PM
08-01-2009 10:30 PM
Re: 11.23 - reduce dead PV from VG permanently
I didn't request top tips for VI or for loopping :-)
in a summary what I need:
reduce mirror from each LV in a VG.
reduce dead ("???") PV from a VG that was imported from a production system.
purpose:
* I need to be able to extend those LVs and it is impossible if I can't remove the mirror, right?
* cosmetic error :) I hate to see some "available/stale" messages when running vgdisplay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2009 12:50 AM
08-02-2009 12:50 AM
Re: 11.23 - reduce dead PV from VG permanently
Assume c3t2do is your failed PV
# pvdisplay -v /dev/dsk/c3t2d0 | more
--- Physical volumes ---
PV Name /dev/dsk/c3t2d0
VG Name /dev/vg00
PV Status unavailable
# pvchange -a n /dev/dsk/c3t2d0
will make the disk unavailable to LVM and ready to pull.
Then you try to vgreduce the PV.