- 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
01-28-2003 11:32 AM
01-28-2003 11:32 AM
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x5f235bd3782dd711abdc0090277a778c,00.html
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2003 12:32 PM
01-28-2003 12:32 PM
SolutionI've done something similar to what you are trying. I wrote a script 'build_vg_conf' that will write a simple configuration file which describes a volume group and the logical volumes in it. These config files are used by a second script, 'recreate_vg', which will create the volume groups and logical volumes. The 'recreate_vg' script can go search for your EMC disks, or you can pass it a list of PVs in a file. We've used this script a couple of times in disaster recovery drills and it seems to work. Feel free to take it and hack it up for your needs, or just copy the useful parts of it as needed. It does many of the same things you are trying to do in your script, such as finding a valid list of EMC disks, figuring out the next available minor number to use for creating VGs, etc.
Have fun!
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2003 12:36 PM
01-28-2003 12:36 PM
Re: script help please
Here is a sample config file:
PESIZE 4
TOTALPE 6471
LV /dev/vg_app/lvol1 /u01/app/oracle 2000
LV /dev/vg_app/lvol2 /u01/app/applmgr 4000
See, I figured out that all I really needed to recreate a volume group was the name, the PE size, and the number of PEs. The number of PVs in the old VG doesn't really matter because you might not have the same size PVs on the new system, and as long as the PE size is the same it doesn't really matter. The 'recreate_vg' script will look at this config file, figure out how big the VG needs to be in PEs, and start pvcreating PVs and throwing them into the new VG until it has enough PEs. Then it is a simple matter to create the LVs based on the LV entries in the config file.
Fun stuff!
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2003 12:38 PM
01-28-2003 12:38 PM
Re: script help please
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2003 12:47 PM
01-28-2003 12:47 PM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:14 AM
01-30-2003 11:14 AM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:33 AM
01-30-2003 11:33 AM
Re: script help please
Which script gave you the errors, and what errors did you get? If it is the 'recreate_vg' script, I'm not surprised as I usually just run it [and refine it] while we are doing a disaster recovery drill, which means it only gets worked on when I am very sleep deprived and full of caffeine. [Not too far from my normal condition!].
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 11:53 AM
01-30-2003 11:53 AM
Re: script help please
/usr/sbin/vgcreate -p 128 -s $VG
Usage: vgcreate
[-f]
[-A Autobackup]
[-x Extensibility]
[-e MaxPhysicalExtents]
etc.....
I can probably send you the entire file with all the output if you really want. I saved it to a file but it's too big to attach here.
I know what you mean about sleep deprived... our DR tests are the same way. Fortunately I work for Mars Inc (M&M candies) so I usually have a sugar rush going for me... plus one of our companies makes coffee so We bring a brewer with us to the test site. Still .... If I can get this working then it'll cut the build time down to almost nothing... and then we can go to out and have some fun :)
....and thanks for the quick response too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 12:04 PM
01-30-2003 12:04 PM
Re: script help please
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 12:06 PM
01-30-2003 12:06 PM
Re: script help please
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 12:50 PM
01-30-2003 12:50 PM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 12:51 PM
01-30-2003 12:51 PM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 01:17 PM
01-30-2003 01:17 PM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 01:17 PM
01-30-2003 01:17 PM
Re: script help please
Go ahead and post your output as an attachment. I'd like to take a look at it. Also, if you can post the two .config files I'd like to see them as well.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 01:24 PM
01-30-2003 01:24 PM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 01:30 PM
01-30-2003 01:30 PM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 01:47 PM
01-30-2003 01:47 PM
Re: script help please
Also, it looks like the 'recreate_vg' may have picked up a bogus .config file. The 'build_vg.config' file looks like it might be the culprit.
The vgcreate commands for the vg043bin and vg043data VGs choked with a 'file too large' error. I'm not sure what that is all about. Probably the author of the script should have put in more error checking!
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2003 02:05 PM
01-30-2003 02:05 PM
Re: script help please
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000065011234
When I last used this script, we had a huge VG with just over a hundred PVs in it. The 'vgcreate' line in the 'recreate_vg' script is hard coded to set the Max PVs for 128. I think that is causing problems for vgcreate. Try lowering the '-p 128' option to something more reasonable, like '-p 32' and give it another go. You'll also need to get rid of the bogus .config file and make sure there are mountpoint entries in the vg043bin.config file.
Time for more caffeine!
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 04:21 AM
01-31-2003 04:21 AM
Re: script help please
as for the max extents... i'll take a look at that too. I know that some of our servers have terabytes of diskspace.... will the hardcoded 128 effect this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 05:37 AM
01-31-2003 05:37 AM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 06:15 AM
01-31-2003 06:15 AM
Re: script help please
and it seemed to get through more this time.... then it had some pvcreate errors... it basically looked like it was doing a:
"pvcreate -f "
with no disk specified at the end of the statement. also i noticed an error about the vg not being activated. I did a vgchange -y a $vgname
and I was able to do a vgdisplay which showed all the PV names associated with each VG - nothing is mounted and the script never specified any temporary fstab file at the end. any ideas where to go from here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 06:18 AM
01-31-2003 06:18 AM
Re: script help please
just thought i'd mention it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 07:47 AM
01-31-2003 07:47 AM
Re: script help please
The pvcreate errors sound like another bug. It looks like it ran out of PVs? Let me take a look at the script.
The script won't activate the volume groups. I could add that in if you think it would be helpful. As for mounting the filesystems, the script doesn't mess with it. Our method of using the script was that we recovered the system using Ignite, and then ran this script. Since we had Ignited the box, we had a copy of our old /etc/fstab out there and after the script was done we just did a 'mount -a' to get all the filesystems mounted. I added the option to create a new /etc/fstab later to cover the case where we might not have Ignited the system and were just creating the VGs and LVs on a clean system from just the .config files. I'm not sure the fstab creation works; I'll take a look at that also.
The MC/SG environment shouldn't matter. We use it here also and the script seems perfectly capable of blowing up with or without MC/SG. :)
I'll look at the script and post a revised version later today. Thanks for your interest and your patience.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2003 07:56 AM
01-31-2003 07:56 AM
Re: script help please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2003 09:10 AM
02-03-2003 09:10 AM
Re: script help please
/usr/sbin/lvcreate -l $LVSIZE -n $(basename $LVNAME) $VGNAME
I can't find any other reference to "basename" anywhere else in your script. I ran through this morning and everything worked except actually creating the lvol names withing the /dev/vgname. I think if/when I get this last piece fixed the script will work beautifully. Did you find anything the other day?