Sponsored Content
Operating Systems AIX is it ok to run AIX mksysb script on vio servers? Post 302223109 by kah00na on Friday 8th of August 2008 11:09:42 AM
Old 08-08-2008
We create mksysbs to our NIM server for our vio servers automatically by NFS mounting a directory on our NIM server and sending the backups there. Here is the script we use. Perhaps you can modify it to meet your needs. This runs out of root's crontab and is generic so it can be copied to all your VIO servers and run without having to be modified. We save all our mksysbs into nimserver:/export/mksysb:

Code:
exec 2>&1
exec 1>${0}.out

# Mount NIM server
/usr/sbin/mount nimserver:/export/mksysb /mnt

echo "backupios started at `date`"

# su to padmin and execute the backup to the NFS on nimrod
su - padmin -c '
        ioscli backupios -file /mnt/`ioscli hostname` -mksysb
'

# If the file exists, then we are good
if [ -f /mnt/`hostname` ]; then
        if [ $? -gt 0 ]; then
                echo "Copy to nimserver failed"
        else
                echo "backupios (mksysb) completed at `date`"
        fi
else
        echo "backup file not found."
fi

# Unmount nimserver
/usr/sbin/umount /mnt

 

10 More Discussions You Might Find Interesting

1. AIX

Restoring mksysb to vio lpar?

I have a standard template I deploy for each of my AIX servers. It's in a mksysb format which I pulled via the nim server after I originally set it up. I'm trying to restore this mksysb over the wire to a remote system. The remote system is an lpar running under vio (no HMC attached). The disk... (1 Reply)
Discussion started by: scottsl
1 Replies

2. Shell Programming and Scripting

script to automate mksysb via nim in AIX 5.3

#!/bin/ksh # # nim_mksysb # get mksysb from each client machine specified with -m. If no # machines specified, get mksysb from ALL machines. -r flag says # remove oldest existing mksysb for the machines being backed up. # use -n no_make flag with -r to remove a generation of mksysb, #... (0 Replies)
Discussion started by: barkath
0 Replies

3. Shell Programming and Scripting

How to run same script on multiples servers

Hi All, I have some script that run some commands and send results to my email. I want to run same script on mulitiple servers. How can I do that. I know there is an option "ssh". But I'm not quite sure how to use it in the script. And also. scripts has some parameters like following, if :... (10 Replies)
Discussion started by: s_linux
10 Replies

4. Shell Programming and Scripting

Need a script to run on multiple mail servers..

Hello, I am a Unix newbie and I need a script in which I can run a command on multiple servers at work. The command is to start a storage process and I am sick of doing it manually on all servers.. Here's the command: /opt/bss/bin/snmptable -CB -v2c -c P67LzuBm hostname hrStorageTable... (4 Replies)
Discussion started by: kinyyy
4 Replies

5. Shell Programming and Scripting

Run a script in parts on 2 servers

Hi all, I have a task for which I need to run some commands on one server1 and then jump from the server1 (using ssh and asking user to enter login credentials manually for server2 server) to server2 and run some commands there and exit. I know the script I need here but problem is when I... (5 Replies)
Discussion started by: pat_pramod
5 Replies

6. UNIX for Dummies Questions & Answers

Script to run in vio server

I want to grab all the luns in vscsi disks from vio that are assigned to client lpars. They are not powerpath disks. Now when I do lspv as root in vio server I see 956 disks..the problem right now is that each disks lun are in hex so when I do lscfg vpl from vio..the FRU number is on hex. Can... (3 Replies)
Discussion started by: pregmi
3 Replies

7. AIX

Mksysb for vio servers

Dears i have a total of 6 VIO servers i was trying to take a mksysb to the VIOs through NIM server but i can not process with it (6 Replies)
Discussion started by: thecobra151
6 Replies

8. AIX

How to write a script to run without password on a batch of servers?

I need run a command such as ps -ef |grep xxx on a batch of servers, how to write a script to run it without password? don't need go in each server to check? Thanks (7 Replies)
Discussion started by: rainbow_bean
7 Replies

9. Shell Programming and Scripting

Run a script on multiple servers

I need to run a script on a bunch of remote servers. how can this be done without ssh into each individual server and run it its under /sbin/script.sh on each server (1 Reply)
Discussion started by: tdubb123
1 Replies

10. Shell Programming and Scripting

Run a shell script on all 15 servers at the same time?

We have 15 servers. Hostnames for these 15 servers are stored in a text files and loop through each server to connect to the remote server and run a command, but this loop process runs the command one after another. However, the requirement is to run the same command on all 15 servers at the same... (10 Replies)
Discussion started by: laknar
10 Replies
PIVOT_ROOT(8)						       System Administration						     PIVOT_ROOT(8)

NAME
pivot_root - change the root filesystem SYNOPSIS
pivot_root new_root put_old DESCRIPTION
pivot_root moves the root file system of the current process to the directory put_old and makes new_root the new root file system. Since pivot_root(8) simply calls pivot_root(2), we refer to the man page of the latter for further details. Note that, depending on the implementation of pivot_root, root and cwd of the caller may or may not change. The following is a sequence for invoking pivot_root that works in either case, assuming that pivot_root and chroot are in the current PATH: cd new_root pivot_root . put_old exec chroot . command Note that chroot must be available under the old root and under the new root, because pivot_root may or may not have implicitly changed the root directory of the shell. Note that exec chroot changes the running executable, which is necessary if the old root directory should be unmounted afterwards. Also note that standard input, output, and error may still point to a device on the old root file system, keeping it busy. They can easily be changed when invoking chroot (see below; note the absence of leading slashes to make it work whether pivot_root has changed the shell's root or not). OPTIONS
-V, --version Display version information and exit. -h, --help Display help text and exit. EXAMPLES
Change the root file system to /dev/hda1 from an interactive shell: mount /dev/hda1 /new-root cd /new-root pivot_root . old-root exec chroot . sh <dev/console >dev/console 2>&1 umount /old-root Mount the new root file system over NFS from 10.0.0.1:/my_root and run init: ifconfig lo 127.0.0.1 up # for portmap # configure Ethernet or such portmap # for lockd (implicitly started by mount) mount -o ro 10.0.0.1:/my_root /mnt killall portmap # portmap keeps old root busy cd /mnt pivot_root . old_root exec chroot . sh -c 'umount /old_root; exec /sbin/init' <dev/console >dev/console 2>&1 SEE ALSO
chroot(1), pivot_root(2), mount(8), switch_root(8), umount(8) AVAILABILITY
The pivot_root command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/. util-linux August 2011 PIVOT_ROOT(8)
All times are GMT -4. The time now is 06:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy