- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shutdown script spanning more than one server
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
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
04-12-2006 05:16 AM
04-12-2006 05:16 AM
Then when the DB backup is complete, start the database, exit back to the application server and start the applications.
Does anyone have an example script of how to accomplish this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 05:22 AM
04-12-2006 05:22 AM
Re: Shutdown script spanning more than one server
If you use ssh, you should configure public key authentication without password, then just create a script:
stopapp
ssh databasehost stopdb
ssh databasehost startdb
startapp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 05:31 AM
04-12-2006 05:31 AM
Re: Shutdown script spanning more than one server
I am uncertain what ssh is. I did a "man ssh" and nothing came back. You provide a little more info?
Thank you very much in advance for you reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 05:32 AM
04-12-2006 05:32 AM
SolutionI described this process along with the synchronization tools needed in this
article: http://www.samag.com/documents/s=7898/sam0304a/0304a.htm
The perl semaphore server and client tools are also available at that website.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 05:37 AM
04-12-2006 05:37 AM
Re: Shutdown script spanning more than one server
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA
Essentially, it's the encrypted version of remsh and ftp in that the data sent over the network are encrypted. You may or may not need that level of security within your own network but in any event the scripting will be much easier using remsh or ssh than with telnet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 05:40 AM
04-12-2006 05:40 AM
Re: Shutdown script spanning more than one server
I am reading your article right now. I was originally leaning toward "remsh".
We have and HP SAN and have yet to implement snapshots but would LOVE to. Would you happen to have an example of your "createsnapshot.sh" script?
I am reading on .....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 05:42 AM
04-12-2006 05:42 AM
Re: Shutdown script spanning more than one server
# swlist -l product |grep -i secure
Secure_Shell A.03.10.007 HP-UX Secure Shell
You can download it from the hp software download page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 06:49 AM
04-12-2006 06:49 AM
Re: Shutdown script spanning more than one server
My convention is that snapshot mountpoints are prefixed via "snap" so if your original filesystem is "/PrdOra/oradata1" then your snapshot mount point will be "/PrdOra/snaporadata1". Now for those mounts using a snapshot buffer, /dev/vg03/lvol7 the commands are:
mkdir /PrdOra/snaporadata1
mount -F vxfs -o snapof=/PrdOra/oradata1 /dev/vg03/lvol7 /PrdOra/snaporadata1
Now you backup /PrdOra/snaporadata1
and when finished:
umount /PrdOra/snaporadata1
rmdir /PrdOra/snaporadata1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 07:31 AM
04-12-2006 07:31 AM
Re: Shutdown script spanning more than one server
We have our SAN but evidently are missing some software.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 07:35 AM
04-12-2006 07:35 AM
Re: Shutdown script spanning more than one server
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B3929CA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 08:06 AM
04-12-2006 08:06 AM
Re: Shutdown script spanning more than one server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 09:06 AM
04-12-2006 09:06 AM
Re: Shutdown script spanning more than one server
I think that the only thing I'm missing is how to create the snapshot buffer.
Here's my syntax and error:
atlas03:/s01# mount -F vxfs -o snapof=/s01/oradata /dev/vgs01/slvol1 /s01/snaporadata
mount: /dev/vgs01/slvol1 is already mounted on /s01/snaporadata
atlas03:/s01# bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vgs01/slvol1 153600000 68066672 84865120 45% /s01
atlas03:/s01#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 09:23 AM
04-12-2006 09:23 AM
Re: Shutdown script spanning more than one server
For example, if you are using LVM, you would lvcreate a new LVOL but not install a filesystem on it (or make an entry in /etc/fstab for it). Any raw block device
can be used -- just make sure that this device is not used for anything else. Every snapof mount will need its own snapshot buffer raw block device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 12:26 PM
04-12-2006 12:26 PM
Re: Shutdown script spanning more than one server
Let me gain a little better understanding of "snapof". As you indicated, a great use of this is for cold back-up. However, would you not want to keep the DB down until the tape backup is completed? Otherwise, won't the /snaporadata buffer be updated as transactions continue to flow with the DB up and a tape backup going simultaneously?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 01:04 PM
04-12-2006 01:04 PM
Re: Shutdown script spanning more than one server
It should be obvious that most of the read()'s for the backup occur in the original filesystem. That's why the snapshot buffer need only be about .15X the size of the original filesystem.
It is essential that all the filesystems associated with the database be snapshoted before restarting the database so that you have a valid "cold" backup. You really have all the "warm, fuzzy" of a cold backup for almost all the uptime of a "hot" backup.
One "gotcha" I should warn you about is that the snapshot buffer should be mirrored or otherwise highly available (e.g. an array LUN) because if for some reason the snapshot buffer device fails, the original filesystem can hang. Of course, if a disk in the original filesystem fails the same thing can occur. I'm just pointing out that
just as the original filesystem should be mirrored (or otherwise highly available) so should the snapshot buffer device.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2006 01:10 PM
04-12-2006 01:10 PM
Re: Shutdown script spanning more than one server
filesystem was at point in time it was snapped and the second will be a snapshot at the point in time that it was snapped. I've only used that feature a few times but it has great "coolness".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 05:18 AM
04-13-2006 05:18 AM
Re: Shutdown script spanning more than one server
Anyway, I'm going to review your article related to scripting using semaphores and I'll get back to you with questions.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 05:35 AM
04-13-2006 05:35 AM
Re: Shutdown script spanning more than one server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 09:50 AM
04-13-2006 09:50 AM
Re: Shutdown script spanning more than one server
I downloaded both server.pl and client.pl to one of my servers just to, as you put it, get a feel for how they work.
By the way the version of Perl on the Unix server is:
atlas03:/usr/contrib/bin# swlist | grep perl
perl B.5.6.1.C Perl Programming Language
atlas03:/usr/contrib/bin#
When I try running server.pl -P 7777 #, it just returns the following:
atlas03:/usr/contrib/bin# server.pl -P 7777
server.pl[4]: require: not found.
server.pl[10]: use: not found.
server.pl[11]: use: not found.
server.pl[12]: use: not found.
server.pl[13]: use: not found.
server.pl[14]: use: not found.
server.pl[15]: use: not found.
server.pl[16]: use: not found.
server.pl[18]: Syntax error at line 19 : `newline or ;' is not expected.
atlas03:/usr/contrib/bin#
Now, I admit that I'm very GREEN with Perl and it looks as if this will be my launching pad into the language but must I comment these lines out before the script will work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 09:57 AM
04-13-2006 09:57 AM
Re: Shutdown script spanning more than one server
Probably the best fix is to create a symbolic link in /usr/bin for the "good" version of Perl.
cd /usr/bin
ln -s /opt/perl/bin/perl perl
That should fix you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 10:04 AM
04-13-2006 10:04 AM
Re: Shutdown script spanning more than one server
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 10:06 AM
04-13-2006 10:06 AM
Re: Shutdown script spanning more than one server
e.g. chmod 755 Server.pl Client.pl
Also make sure that the "shebang", /usr/bin/perl -w, is the VERY FIRST line of the script. Perhaps when you downloaded the files, a leading blank line was inserted.
In any event, between setting the symbolic link, setting the execute bit on the file, cleaning up the shebang line, and possibly making sure that the current working directory ("./") is in your path or that you prefix Server.pl with the absolute path, you should be good to go.
The opther option is
perl Server.pl xxx yyy zzz.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 11:11 AM
04-13-2006 11:11 AM
Re: Shutdown script spanning more than one server
titan03:/usr/contrib/bin# client.pl -P 7777 atlas03 -P 7777 Resource_1 INC 1
Invalid Tag atlas03 at /usr/contrib/bin/client.pl line 282.
titan03:/usr/contrib/bin#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 12:15 PM
04-13-2006 12:15 PM
Re: Shutdown script spanning more than one server
RIGHT: client.pl -P 7777 -h atlas03 -P 7777 Resource_1 INC 1
NOTE: You can both server.pl and client.pl with a "-u" argument for full usage instructions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2006 12:20 PM
04-13-2006 12:20 PM
Re: Shutdown script spanning more than one server
Thanks again!