upgrade

Upgrade PGSQL from 9.1 to 9.2

[root@srv02mil1 ~]# rpm -Uhv http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm
Retrieving http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm
Preparing...                ########################################### [100%]
1:pgdg-centos92          ########################################### [100%]
[root@srv02mil1 ~]# yum install postgresql92-server postgresql92-contrib postgresql92 postgresql92-libs

[root@srv02mil1 ~]# /etc/init.d/postgresql-9.1 stop
Stopping postgresql-9.1 service:                           [  OK  ]

[root@srv02mil1 ~]# su - postgres
[postgres@srv01mil1 ~]$ /usr/pgsql-9.2/bin/pg_upgrade -b /usr/pgsql-9.1/bin/ -B /usr/pgsql-9.2/bin/ -d /var/lib/pgsql/9.1/data/ -D /var/lib/pgsql/9.2/data/
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories                 ok
Checking cluster versions                                   ok
Checking database user is a superuser                       ok
Checking for prepared transactions                          ok
Checking for reg* system OID user data types                ok
Checking for contrib/isn with bigint-passing mismatch       ok
Creating catalog dump                                       ok
Checking for presence of required libraries                 ok
Checking database user is a superuser                       ok
Checking for prepared transactions                          ok

If pg_upgrade fails after this point, you must re-initdb the
new cluster before continuing.

Performing Upgrade
------------------
Analyzing all rows in the new cluster                       ok
Freezing all rows on the new cluster                        ok
Deleting files from new pg_clog                             ok
Copying old pg_clog to new server                           ok
Setting next transaction ID for new cluster                 ok
Resetting WAL archives                                      ok
Setting frozenxid counters in new cluster                   ok
Creating databases in the new cluster                       ok
Adding support functions to new cluster                     ok
Restoring database schema to new cluster                    ok
Removing support functions from new cluster                 ok
Copying user relation files
ok
Setting next OID for new cluster                            ok
Creating script to analyze new cluster                      ok
Creating script to delete old cluster                       ok

Upgrade Complete
----------------
Optimizer statistics are not transferred by pg_upgrade so,
once you start the new server, consider running:
analyze_new_cluster.sh

Running this script will delete the old cluster's data files:
delete_old_cluster.sh
[postgres@srv01mil1 ~]$
[postgres@srv01mil1 ~]$ exit
logout
[root@srv02mil1 ~]# /etc/init.d/postgresql-9.2 start
Starting postgresql-9.2 service:                           [  OK  ]

JunOS – Update with low space CF

dmesg tail:

umass0: SanDisk Cruzer Micro, rev 2.00/2.00, addr 2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <SanDisk Cruzer Micro 6.51> Removable Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: 988MB (2025471 512 byte sectors: 64H 32S/T 988C)

root@amnesyac% dd if=/dev/zero of=/dev/da0 bs=128k

2435+0 records in
2434+0 records out
319029248 bytes transferred in 352.314078 secs (905525 bytes/sec)
root@amnesyac% disklabel -R -w da0 auto
root@amnesyac% newfs -U /dev/da0
/dev/da0: 989.0MB (2025468 sectors) block size 16384, fragment size 2048
using 6 cylinder groups of 183.69MB, 11756 blks, 23552 inodes.
with soft updates
super-block backups (for fsck -b #) at:
32, 376224, 752416, 1128608, 1504800, 1880992
root@amnesyac% mkdir /var/tmp/usb
root@amnesyac% mount /dev/da0 /var/tmp/usb
root@amnesyac% mv junos-jsr-12.1R5.5-export.tgz /cf/var/tmp/usb/
root@amnesyac% cli
root@amnesyac> file list detail /var/tmp/usb

/var/tmp/usb:
total 406474
drwxrwxr-x  2 root  operator       512 Feb 28 04:52 .snap/
-rw-r--r--  1 root  wheel  208012563 Feb 27 19:33 junos-jsr-12.1R5.5-export.tgz

root@amnesyac> request system software add junos-jsr-12.1R5.5-export.tgz
ERROR: Missing package: /cf/root/junos-jsr-12.1R5.5-export.tgz

root@amnesyac> request system software add /var/tmp/usb/junos-jsr-12.1R5.5-export.tgz
NOTICE: Validating configuration against junos-jsr-12.1R5.5-export.tgz.
NOTICE: Use the 'no-validate' option to skip this if desired.
Checking compatibility with configuration
Initializing...
Verified manifest signed by PackageProduction_9_6_0
Using /var/tmp/usb/junos-jsr-12.1R5.5-export.tgz
Checking junos requirements on /
Available space: 80793 require: 4688
Saving boot file package in /var/sw/pkg/junos-boot-jsr-12.1R5.5.tgz
Verified manifest signed by PackageProduction_12_1_0
Hardware Database regeneration succeeded
Validating against /config/juniper.conf.gz
cp: /cf/var/validate/chroot/var/etc/resolv.conf and /etc/resolv.conf are identical (not copied).
cp: /cf/var/validate/chroot/var/etc/hosts and /etc/hosts are identical (not copied).
[edit system services ssh]
'ssh'
warning: daemon binary /usr/sbin/sshd not found
mgd: commit complete
Validation succeeded
Installing package '/var/tmp/usb/junos-jsr-12.1R5.5-export.tgz' ...
Verified junos-boot-jsr-12.1R5.5.tgz signed by PackageProduction_12_1_0
Verified junos-jsr-12.1R5.5-export signed by PackageProduction_12_1_0
Available space: 81388 require: 4688
WARNING: JUNOS edition export != domestic, need to regenerate ssh host keys
Saving boot file package in /var/sw/pkg/junos-boot-jsr-12.1R5.5.tgz
JUNOS 12.1R5.5 will become active at next reboot
WARNING: A reboot is required to load this software correctly
WARNING:     Use the 'request system reboot' command
WARNING:         when software installation is complete
Saving package file in /var/sw/pkg/junos-12.1R5.5.tgz ...
cp: /var/sw/pkg/junos-12.1R5.5.tgz: No space left on device
Saving state for rollback ...

root@amnesyac> request system reboot
Reboot the system ? [yes,no] (no) yes

Shutdown NOW!
[pid 1988]

root@amnesyac>
*** FINAL System shutdown message from root@amnesyac ***
System going down IMMEDIATELY

Timeout, server not responding.

pSeries Firmware Upgrade

root@localhost:/home/root/code#rpm -Uhv --ignoreos 01SF240_418_382.rpm
user fspbld does not exist - using root
group fspbld does not exist - using root
01SF240_418_382             ##################################################
root@localhost:/home/root/code#/usr/lpp/diagnostics/bin/update_flash -f /tmp/fwupdate/01SF240_418_382
The image is valid and would update the temporary image to SF240_418.
The new firmware level for the permanent image would be SF235_214.

The current permanent system firmware image is SF235_214.
The current temporary system firmware image is SF235_214.

***** WARNING: Continuing will reboot the system! *****

Do you wish to continue?
Enter 1=Yes or 2=No
1

SHUTDOWN PROGRAM
Fri Feb  8 10:16:44 CST 2013
0513-044 The sshd Subsystem was requested to stop.
root@localhost:/home/root#/usr/lpp/diagnostics/bin/update_flash -c
The commit operation is in progress. Please stand by.

The commit operation was successful.

Juniper – Netscreen upgrade via TFTP

fw01-> save software from tftp 10.255.4.210 ns50ns25.5.4.0r21.0 to flash
Load software from TFTP 10.255.4.210 (file: ns50ns25.5.4.0r21.0).
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
tftp received octets = 5994268
tftp success!

TFTP Succeeded
Save to flash. It may take a few minutes ...platform = 14, cpu = 10, version = 18
update new flash image (01e97ddc,5994268)
platform = 14, cpu = 10, version = 18
offset = 20, address = 3060000, size = 5994189
date = 4062f3e0, sw_version = 4062f3e4, cksum = f7522c46
Program flash (5994268 bytes) ...
sec_size :131072 align_support 1 , mode 96028
++++++++++++++++++++++++++++++++++++++++++++++done
Done
fw01-> reset
System reset, are you sure? y/[n] y
In reset ...

Cisco Catalyst – IOS Upgrade

Comandi base per aggionare un Catalyst 29xx partendo da un’immagine IOS compresssa in tar, ovviamente e’ indispensabile avere a disposizione un server TFTP con gia’ caricata nella root l’immagine.

Fase 1 – Eliminare l’immagine e eventuali web-interface con questi due comandi:

Switch#delete flash:c0000-versioneios.bin
Switch#delete flash:html/*

Fase 2 – Copiare scompattare e caricare l’immagine dall’TFTP

Switch#archive tar /xtract tftp://10.10.10.1/c0000-versioneios.bin flash:

Fase 3 – Verificare l’immagine

Switch#verify flash:c0000-versioneios.bin

Memo:

Le immagini con questa notazione “i6k2l2q4” hanno le seguenti feature:
EI AND SI IOS CRYPTO

Le immagini con questa notazione “i6q4l2” hanno le seguenti feature:
EI AND SI IOS