Tuesday, May 13, 2008

Legato NEtworker nsrjb command example

nsrjb
Note: The nsrjb command is performed on a NetWorker server
with a jukebox attached.

nsrjb

A plain "nsrjb" command shows the volumes present in the
jukebox slots and in the jukebox drives.

nsrjb -d -P1 -S26

Deposit a tape cartridge from access port slot 1 (-P1)
to jukebox slot 26 (-S26).

nsrjb -w -S236 -P5

Withdraw a tape cartridge from jukebox slot 236 to
access port slot 5.

nsrjb -l -f /dev/rmt/0cbn B00341

Load volume B00341 into jukebox device /dev/rmt/0cbn.

nsrjb -l -f /dev/rmt/6cbn -S 26

Load a tape cartridge from jukebox slot 26 into jukebox
device /dev/rmt/6cbn.

nsrjb -u -f /dev/rmt/6cbn

Unload the tape cartridge in jukebox device /dev/rmt/6cbn
back to the jukebox slot it came from.

nsrjb -L -f /dev/rmt/2cbn -S 177 -b FULL

Load the tape cartridge in jukebox slot 177 into jukebox
device /dev/rmt/2cbn and write a label on it indicating
that it is in the FULL pool. This example assumes that
the jukebox has a barcode reader, that the tape cartridge
has a barcode attached, and NetWorker is configured to
automatically use barcodes for logical labels. This also
updates the media index database.

nsrjb -HE

Unload all jukebox drives and reset them.

nsrjb -IE -S307 -f /dev/rmt/4cbn

Inventory the contents of slot 307 using jukebox device
/dev/rmt/4cbn.

Legato networker check jukebox content

# nsrjb -IS 1-3 -j jb3
/dev/rmt1.1: verified label of Cdeck:042.
/dev/rmt0.1: verified label of Cdeck:048.
/dev/rmt1.1: verified label of Cdeck:049.
# nsrjb -v
setting verbosity level to `1'
No jukebox selected.
1: jb3
2: jb2
Please select a jukebox to use:? [1] 1

Jukebox jb3:
slot volume used pool volume id recyclable
1: Cdeck:042 36% Cdeck 20d8bb27-00000005-a9813304-44813304-00580000-92c20898 no
2: Cdeck:048 0% Cdeck d5b67332-00000005-ff99375b-4499375b-00020000-92c20898 no
3: Cdeck:049 0% Cdeck 59776074-00000005-fe993926-44993926-00030000-92c20898 no
4: Cdeck:045 0% Cdeck 0c3a10f9-00000005-7d926e6a-44926e6a-02840000-92c20898 no
5: Cdeck:046 0% Cdeck faa4a428-00000005-be87fe23-4487fe23-01430000-92c20898 no
6: Cdeck:047 0% Cdeck b03a3bd3-00000005-00993515-44993515-00010000-92c20898 no
7: Cdeck:048 0% Cdeck d5b67332-00000005-ff99375b-4499375b-00020000-92c20898 no
8: Cdeck:049 0% Cdeck 59776074-00000005-fe993926-44993926-00030000-92c20898 no
9: Cdeck:050 0% Cdeck d0a975b1-00000005-fd993ac7-44993ac7-00040000-92c20898 no
10: Cleaning Tape (4 uses left) -
11:
12:
13:
14:
15:
*not registered in the NetWorker media data base

9 registered volume(s), 9 less than 80% full.
315 GB estimated capacity, 302 GB remaining (4% full)
Default slot range(s) are 1-9, 11-15

drive 1 (/dev/rmt0.1) slot :
drive 2 (/dev/rmt1.1) slot :
You have mail in /usr/spool/mail/root
#

Legato networker volumes not registered

When networker marks volumes as not registered in the NetWorkwe media data base indicated with a * next to the volume name in the output from nsrjb, you can use scanner to rebuild both the media and online file indexes for the effected volume(s).

load the volume in a drive:

$: nsrjb | grep volume_name

$: 39: volume_name
|
slot number in jb

$: nsrjb -ln -S 39 -f /path/to/device (/dev/rmt/0cbn 1cbn 2cbn ...)
(/path/to/device should be for the device which is known by NetWorker)

rewind the tape

$: mt -f /path/to/device rewind
(if you used /dev/rmt/0cbn above use /dev/rmt/0 here)

scan the volume with the -i (india) option

$: scanner -i /path/to/device (/dev/rmt/0cbn 1cbn 2cbn ...)
(/path/to/device should be for the device which is known by NetWorker)

you can check the media data bank with mminfo to determine if the voulme entries were recovered.

mminfo -r 'client,savetime' -q volume=volume_name

eject the volume and return it to the jb

nsrjb -u -f /path/to/device (/dev/rmt/0cbn 1cbn 2cbn ...)
(/path/to/device should be for the device which is known by NetWorker)

HPUX move print jobs

lpshut
lpmove brl0p006 brl0p004
lpstart
/usr/sbin/accept brl0p006
/usr/bin/enable brl0p006

AIX alternative split mirror copy for backup

The AIX alternative to split a mirror copy uses either the splitlvcopy or chfs command. The splitlvcopy is used for raw partitions, and the chfs command is used for filesystems. To illustrate, the following example assumes we want to make a split mirror copy of the "datalv". The copy will be located on hdisk2, with a LV name of "lv_copy"


1. Define a mirror copy of "datalv" on "hdisk2"

mklvcopy datalv 2 hdisk2

2. Synchronize (copy) the data to the mirror

syncvg -l -P6 datalv

3. Verify copy is complete (ie no "stale" partitions)

lslv datalv

5. Stop application/database

6 Split off the hdisk2 mirror copy.

For raw partitions: splitlvcopy -y lv_copy datalv 1 hdisk2
For JFS filesystems: chfs -a splitcopy=/data_copy -a copy=2 /data

Note: to use "chfs," the JFSLOG must be mirrored. If not, you'll see the error:
"jfs_syscall: A system call received a parameter that is not valid "

7. Restart application/database

8. Backup data

The downtime associated with the split mirror copy is in Steps 5-7. Depending on the size of the data, the typical downtime is 5-30 minutes. All other steps can done while running production.

Friday, May 9, 2008

AIX enable jumbo frames

chdev -P -l ent2 -a media_speed=Auto_Negotiation
ifconfig en2 down detach
chdev -l ent2 -a jumbo_frames=yes
chdev -l en2 -a mtu=9000
chdev -l en2 -a state=up

Solaris enable jumbo frames

Solaris 9 with a "ce" NIC
1. # ifconfig -a
lo0: flags=1000849 mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

ce0: flags=1000843 mtu 1500 index 2

inet 128.200.197.161 netmask ffffff80 broadcast 128.200.197.255
ether 0:3:ba:d2:f6:d3

ce1: flags=1000843 mtu 1500 index 3

inet 192.168.2.101 netmask ffffff00 broadcast 192.168.2.255
ether 0:3:ba:d2:f6:d3

2. # ifconfig ce1 down unplumb

3. # ndd -set /dev/ce instance 1

4. # ndd -set /dev/ce accept-jumbo 1

5. #) ifconfig ce1 plumb 192.168.2.101 up

UNIX: How to print column nicely using printf

[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...