- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script help please
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
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
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
02-03-2003 09:51 AM
02-03-2003 09:51 AM
Re: script help please
The 'basename' and 'dirname' commands are Unix commands that extract portions of path names. Here is an example:
# basename /dev/vg043data/lvol1
lvol1
# dirname /dev/vg043data/lvol1
/dev/vg043data
The 'basename' command gives us a cheap way to extract just the logical volume name from the full logical volume name. The 'dirname' command also gives us an easy way to build the raw logical volume name.
I looked through the script and I did find one bug. I was doing a string comparison on the PEs as the volume group gets extended. Try changing this line:
while ((VGPECOUNT < TOTALPE))
to this:
while [[ VGPECOUNT -lt TOTALPE ]]
I probably got lucky and it worked with the string comparison, but it really should compare the expressions instead. The function that figures out the next minor number for the vgcreate also has this bug. I want to re-write that function anyway as it just counts in decimal and the minor numbers are incremented in hex, so it could trip up in certain cases [with more than ten volume groups, it will calculate minor numbers as 08, 09, 10, 11 ... instead of 09, 0a, 0b. Oops!]
Your config file for the vg043bin volume group didn't have filesystem mount points listed for lvol8 and lvol15. Do those lvols have real mountpoints? If so, you might want to either re-run the 'build_vg_conf' script or else just edit the vg043bin.config file to make sure it has valid mount points. I probably need to work on making the 'build_vg_conf' script [and 'recreate_vg'] a little more robust.
Let me know what you find.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2003 10:00 AM
02-03-2003 10:00 AM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2003 10:05 AM
02-03-2003 10:05 AM
Re: script help please
while ((VGPECOUNT < TOTALPE))
whould the VGPECOUNJT and TOTALPE have $ in front and read as
while (($VGPECOUNT < $TOTALPE))
??
i'm just curious.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2003 12:48 PM
02-03-2003 12:48 PM
Re: script help please
As for the test you mentioned, I tried it and it works both ways, with or without the dollar sign in front of the variables. I've got to read up some more on expressions and tests to understand why it does that, but in a little test script I wrote it worked either way.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 04:46 AM
02-04-2003 04:46 AM
Re: script help please
So you think the problem is in the vgcreate? That would explain with the lvcreate didn't work properly. Interesting how it still created all the necessary fstab entries (my earlier attached file)
I want to thank you for all your help John.... When this is all over I'll have to get your contact info and send you a big box of candy (I work for M&M Mars). Thanks for all your help so far. This will literally save me hours of work at our disaster recovery tests.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 09:11 AM
02-04-2003 09:11 AM
Re: script help please
when I run it the way you have it it is bringing up some values that cause errors. when I do a vgscan it reports the following:
# vgscan
vgscan: Couldn't access the list of physical volumes for volume group "/dev/build_vg".
vgscan: The physical volume "/dev/dsk/c1t6d0" is already recorded in the "/etc/lvmtab" file.
vgscan: The physical volume "/dev/dsk/c2t6d0" is already recorded in the "/etc/lvmtab" file.
Physical Volume "/dev/dsk/c0t2d0" contains no LVM information
Physical Volume "/dev/dsk/c3t0d0" contains no LVM information
Physical Volume "/dev/dsk/c3t4d6" is not part of a Volume Group
Physical Volume "/dev/dsk/c3t4d7" is not part of a Volume Group
Physical Volume "/dev/dsk/c3t5d0" is not part of a Volume Group
Physical Volume "/dev/dsk/c3t6d2" is not part of a Volume Group
Physical Volume "/dev/dsk/c3t6d3" is not part of a Volume Group
Physical Volume "/dev/dsk/c3t6d4" is not part of a Volume Group
Physical Volume "/dev/dsk/c3t6d5" is not part of a Volume Group
Physical Volume "/dev/dsk/c3t6d6" is not part of a Volume Group
The two entries that comes back with: contains no LVM informationome
are being used in the script... I think that I need to get rid of these entries... is the best way to do this to re-write that function using the output from vgscan instead of the current way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 09:32 AM
02-04-2003 09:32 AM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2003 11:40 AM
02-04-2003 11:40 AM
Re: script help please
Part of the problem might be that one of the earlier runs of the 'recreate_vg' script used a bogus .config file and created a volume group named /dev/build_vg. I'd suggest doing a vgexport on that build_vg volume group. I think if you can get your test system cleaned up from the earlier runs of the script you might be in business. Since it is your test box, you could just vgexport all the VGs except for vg00 if all you are doing is testing the 'recreate_vg' script on this box.
There is a command line option for the 'recreate_vg' script that allows you to pass a file with a list of PVs for it to use. The '-m' option will do this, and you give it a file name containing the list of PVs. I added that option so that you can build your own list of PVs to pass to the script. It expects the PVs to be in the form of '/dev/dsk/cXtYdZ'.
As for the candy, wow! You don't have to do that, but I have always been a firm believer that with enough refined sugar and caffeine in my blood anything is possible!
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2003 10:09 AM
02-05-2003 10:09 AM
Re: script help please
I'm not sure why it didn't do anything for the second file... i vi'd them both and checked them for correctness.
We ignited the server again after this to try fresh and see what happens... .unfortunately I'm in a global team meeting all day (what fun :) ) but I'll hopefully get to spend all day tomarrow working on it. As for the Candy I'd be more than happy to ship you a box stocked with some of our product...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 06:57 AM
02-11-2003 06:57 AM
Re: script help please
Hope to hear from you soon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 07:06 AM
02-11-2003 07:06 AM
Re: script help please
I finally got my test machine in and I had lots of fun with it. Crazy errors with the box that turned out to be bad RAM. I had to waste so much time chasing that problem that I didn't get a chance to use the script on it. There are more new boxes on the way here, so maybe I can get one for a bit to test the script.
Let me give you my e-mail address so you can reach me here. It is jpoff at familydollar dot com. You don't have to post your e-mail address. Just send me an e-mail and I'll get it that way. At least only one of us needs to worry about the spam! :)
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2003 07:29 AM
02-11-2003 07:29 AM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2003 10:29 AM
02-19-2003 10:29 AM
Re: script help please
Here's the solution -
use John's script - It works perfectly! :)
BUT BEFORE YOU DO - check to see you have enough EMC disk to recreate the volume groups correctly ...... the server i was recovering had more EMC than the server I was recovering to. I spent a week trying to get it to work on my server before I finially noticed this.
Much Thanks John! :)
- « Previous
-
- 1
- 2
- Next »