Tuesday, March 29, 2011

urls

http://datadisk.co.uk/

Interesting Open Source:
corosync
openfiler
Linux Cluster Management Console:

http://architects.dzone.com/articles/who-follow-open-source-cloud

http://blog.programmableweb.com/

secure http
http://arstechnica.com/business/news/2011/03/https-is-great-here-is-why-everyone-needs-to-use-it-so-ars-can-too.ars

VeriSign ssl
https://knowledge.verisign.com/support/ssl-certificates-support/index?page=content&actp=CROSSLINK&id=AR198

U Wisc IT help desk
http://kb.wisc.edu/helpdesk/

Apache Wiki
http://wiki.apache.org/httpd/FrontPage
http://www.w3schools.com/

iOS SDK 开发
http://blog.sina.com.cn/iphonesdk

Pocket Guide
http://users.cis.fiu.edu/~tho01/psg/


nodejs
MongoDB
http://jetty.codehaus.org/


Dropbox Startup experience
http://techcrunch.com/2011/10/19/dropbox-minimal-viable-product/

NetApp
https://systems.nic.uoregon.edu/wiki/Netapp_Filers
http://www.netapp.com/us/support/university/learning.html
http://communities.netapp.com/community/netapp-blogs/shadeofblue/blog/2008/10/20/really-thin-provisioning
http://unixfoo.blogspot.com/2009/07/pocket-guide-for-netapp-commands.html

NetBackup
http://www.netbackupcommands.com/
http://www.linuxtopia.org/online_books/linux_lvm_guide/index.html

Xen
http://www.virtuatopia.com/index.php/Building_a_Xen_Virtual_Guest_Filesystem_using_Logical_Volume_Management_%28LVM%29
http://wiki.kartbuilding.net/index.php/LVM_on_XEN_%28dom0%29
http://greg.porter.name/
Backup XenServer VM script http://nchrissos.wordpress.com/2013/09/05/free-backup-for-citrix-xenserver-live-virtual-machines/

PV vs HVM
http://stackoverflow.com/questions/8103314/whats-the-difference-between-paravirtual-and-hvm-in-xen
HVM to PV
http://itproctology.blogspot.com/2009/06/pv-enable-hvm-on-xenserver.html#!/2009/06/pv-enable-hvm-on-xenserver.html

Cisco Aironet stopped working in Ubuntu Hardy


https://bugs.launchpad.net/ubuntu/+source/linux/+bug/189398

Oracle
http://www.oracle-base.com/index.php
http://psoug.org/

Interactive Programming Tutorial http://www.ctothoughts.com/2012/07/interactive-programming-tutorials-net.html
Topic
Interactive Tutorial
REDIS key-value store
MongoDB NOSQL database
SQL
Python
Python
Ruby
Haskell
Scala
Python, Ruby, Javascript
.NET
UNIX
Fun social platform for collaborating
Regular Expressions

Wednesday, March 16, 2011

configure snapvault

http://indiawebsearch.com/content/how-to-configure-snapvault-using-network-appliance-data-ontap-on-a-fas3050-filer

Before we get started, the prerequisites are to have a "Primary" Filer and a "Seondary Filer" . A "Primary System QTree" and a "Secondary System QTree" . In case you did not remember what a QTree is, QTree in Data ONTAP terms from Network Appliance is simply referred to as a folder on a volume, QTrees are just like traditional or flex volumes, with minor differences such as they can not be cloned. A Qtree is just used to group similar data together, apply quotas etc

A Primary Filer is generally referred to as your "onsite" storage system, whose data you want to back up using Data ONTAP Snapvault (eg; source FAS3050 Filer)

A Secondary Filer is your offsite or another storage system where you want your data backed up to (eg; destination FAS3050 filer)

You will normally be performing the Snapvault data backup from the Primary Qtree to the Secondary Qtree. In a disaster recovery scenario, you will be restoring data from your destination FAS2050 filer's qtree to your source or Primary filer.

To configure Snapvault , we need to perform five simple commands. I will show you the Data ONTAP commands, that will configure SnapVault as your backup on FAS3050 filers. In our example, we will call our Primary Filer as Filer1 and our secondary filer as filer2.

Step 1:

- Configure the Primary Filer for Snapvault, add the Snapvault license by using the following command on a terminal session:

license add sv_primary_license

Step 2:

- Enable snapvault on primary by using the following command

options snapvault.enable on

Step 3:

- Specify the name of the secondary storage system on the primary by using the command

options snapvault.access host=NameOfTheSecondaryFilerHere

Note that you can also use the following command to all all hosts as destination filers

options snapvault.access host=all

Step 4:

- Perform steps 1 and 2 on the secondary filer as well

Step 5:

- Enable the compliance clock on the secondary filer by using the command:

date -c initialize

Step 6:

- You can also optionally create a "log volume" for snapvault logs, but we will by pass it here

Step 7:

- Finally on the secondary filer for each qtree you need to backup on the primary, create a initial baseline transfer

For example, if you want the qtree called /vol/wandata/windowsdata on the primary to be backed up to a qtree on secondary called /vol/sv_wandata/windowsdata , you will give the following command:

snapvault start -S filer1:/vol/wandata/windowsdata /vol/sv_wandata/windowsdata

Note that it is a good practiceto name your volumes with sv_ (indicating snapvault volume).

This initialization can take some time to complete., to check the progress, you can give the command:

snapvault status

That is it. The final step is to create a Snapvault schedule on Primary and secondary. Here are the steps

Step 8:

- Create a schedule on Primary by using the following command:

snapvault snap sched -x vol snap_name count [@day_list][@hour_list]

so for example, it will be:

snapvault snap sched -x filer1:/vol/wandata/windowsdata sv_nightly 150@mon-sat 0

meaning, snapvault will create backups with prefix sv_nightly for the primary qtree /vol/wandata/windowsdata at midnight monday to saturday and will retain 150 copies (one for every night)

Step 9:

Similar to step 8 configure the secondary, I will just demonstrate the command for the secondary

snapvault snap sched -x filer2:/vol/sv_wandata/windowsdata sv_nightly 150@mon-sat 0

NetApp firmware upgrade

Contents:
  • NetApp firmwares
  • upgrade NetApp disk and shelf firmware
  • What triggers an update to Disk, Shelf, or ACP firmware in Data ONTAP 8 7-Mode
  • Data ONTAP and Disk Qualification Package (DQP)


NetApp firmwares:
https://library.netapp.com/ecmdocs/ECMP1196990/html/GUID-B376C9C6-44F0-4D36-A6C1-0383CF4338C3.html
  • Motherboard/BIOS/System firmware
    Begining Data Ontap 8.0, minimum BIOS release required enables automatic BIOS updates. Therefore, no need worry about upgrading BIOS from 8.x. After minimum version is running, subsequent updates take place automatically during the boot sequence whenever Data ONTAP detects a version resident on the boot device is more recent than the running version.
    filer> sysconfig -a
    filer> version -b
  • Shelf Firmware
  • Disk Firmware
  • ACP (Alternate Control Path) Firmware
  • SP (Service Processor) Firmware
    ssh to SP IP, login with "naroot" with root password
    SP filer> system console
  • DQP (Disk Qualification Package)



-----
upgrade NetApp disk and shelf firmware
http://indiawebsearch.com/content/how-to-upgrade-disk-shelf-firmware-on-a-netapp-filer

This article provides step by step instructions on how to upgrade the Shelf Firmware on a NetApp Filer running Data OnTap version 7.2. The Filer has four storage shelves which need their firmware to be upgraded.

We would be using CIFS to map a drive to the C$ of the Filer from a Windows machine. You can do the same using NFS by mounting the root volume of the Filer on a Unix client

In our case, we would use Filer1 as the name of the filer on which we need to upgrade the Disk Shelf Firmware.
  • Download the latest Shelf Firmware as a zip file from NetApps NOW site
  • Unzip the contents to a temporary folder e.g.; C:\temp\FilerShelfFirmware
  • Map a drive to the C$ share of Filer1 e.g. X:\
  • Copy the contents of C:\temp\FilerShelfFirmware to X:\etc\shelf_fw
  • Logon to the consoles of Filer1 using Putty
  • Give the command “Priv set advanced” to enter advanced mode
  • Check the current shelf firmware version by typing “sysconfig –v” in the output look for following lines, it shows the firmware version to be 35
    Shelf 1: AT-FCX Firmware rev. AT-FCX A: 35 AT-FCX B: 35
    Shelf 2: AT-FCX Firmware rev. AT-FCX A: 35 AT-FCX B: 35
    Shelf 3: AT-FCX Firmware rev. AT-FCX A: 35 AT-FCX B: 35
    Shelf 4: AT-FCX Firmware rev. AT-FCX A: 35 AT-FCX B: 35
  • Type “storage download shelf” to update firmware on both filers
  • Wait until you get the following output, it could take 70 seconds per shelf x 4 shelves so close to about 5 minutes:
    Tue Dec 30 12:17:42 PST [sfu.downloadSuccess:info]: [storage download shelf]: Firmware file AT-FCX.3700.SFW downloaded on 0b.shelf4.
    Tue Dec 30 12:17:42 PST [sfu.downloadSuccess:info]: [storage download shelf]: Firmware file AT-FCX.3700.SFW downloaded on 0b.shelf3.
    Tue Dec 30 12:17:42 PST [sfu.downloadSuccess:info]: [storage download shelf]: Firmware file AT-FCX.3700.SFW downloaded on 0b.shelf2.
    Tue Dec 30 12:17:42 PST [sfu.downloadSuccess:info]: [storage download shelf]: Firmware file AT-FCX.3700.SFW downloaded on 0b.shelf1.
    Tue Dec 30 12:17:42 PST [sfu.downloadSummary:info]: Shelf firmware updated on 4 shelves
  • Check the new shelf firmware version by typing “sysconfig –v” it should now say 37 instead of 35


The following procedure describes how to upgrade the disk firmware on a NetApp Filer running Data OnTap version 7.2

The first step before upgrading the firmware is to check if the correct disk qualification packages are present on the filer. This determined by checking the datecode on the qual_devices_v3 file. Do the following to check the datecode


  • Log on to Filer Console using Putty
  • Give the following command: “rdfile /etc/qual_devices_v3”
The command would have outputted a lot of information, what we are interested in is the header, you might have to enable buffer logging in Putty to look at the buffer output or scroll back in Putty. We are looking for the datecode output in the header which looks like:
#########
# This file is auto generated by the script file.
# Copyright (c) 2000 Network Appliance, Inc.
# All rights reserved. #
# Datecode: 20080807
Then we need to install the “Disk Qualification Package” else skip to section for Downloading and installing Disk Firmware Instructions for downloading and installing the Disk Qualification Package
  • Download the Disk Qualification Package as a zip file from: http://now.netapp.com/NOW/download/tools/diskqual/ and copy it to a temporary location on your C: drive e.g. C:\temp\FilerDiskFirmware\DiskQualificationPackage
  • Map a drive to the C$ share of Filer e.g. Q:\
  • Extract the files from the zip archive to the \etc directory on the Filer, e.g. Q:\etc
  • Wait 5 minutes for the system to process the newly installed Disk Qualification Packages.
Instructions for Downloading and Installing Disk Firmware
  • Go to http://now.netapp.com/NOW/download/tools/diskfw/ and click on the link that says “Download All Current Disk Firmware”
  • On the next page, click on the “Download Zip” button and save the zip file to a temporary location on your C: drive, e.g. C:\Temp\FilerDiskFirmware\all.zip
  • Extract the contents of the zip file to the /etc/disk_fw directory of the FILER e.g Q:\etc\disk_fw
  • Check that the following option is enabled on the filer by giving the command:
    “options raid.background_disk_fw_update.enable” it should return options raid.background_disk_fw_update.enable on . If its not on, turn it on
  • The filer should automatically detect that there is new disk firmware and do the upgrade, no reboot is necessary.
---
What triggers an update to Disk, Shelf, or ACP firmware in Data ONTAP 8 7-Mode
https://kb.netapp.com/support/index?page=content&actp=LIST&id=3013267
Disk Firmware:
Disk Firmware will be updated in one of the following three ways: 
In the Background:
This occurs when the following conditions are met:
  • options raid.background_disk_fw_update.enable is on
    -or-
    options raid.disk.background_fw_update.raid4.enable is on (where applicable)
  • Newer firmware for the disks present is placed in the /etc/disk_fw directory.
     
When manually triggered:
This occurs when the following conditions are met:
  • options raid.background_disk_fw_update.enable is off
    -or-
    options raid.disk.background_fw_update.raid4.enable is off (where applicable)
  • Newer firmware for the disks present is placed in the /etc/disk_fw directory
  • The disk_fw_update command is issued.

Upon next reboot:

This occurs when the following conditions are met:
  • options raid.background_disk_fw_update.enable is off
    -or-
    options raid.disk.background_fw_update.raid4.enable is off (where applicable)
  • Newer firmware for disks present is placed in the /etc/disk_fw directory
  • The system is rebooted.
     
Shelf Firmware:
Shelf Firmware is updated in one of the following three ways:
Note: There are some concerns specific to the AT-FCX modules which is addressed on each shelf FW download page.
When manually triggered:
This occurs when the following conditions are met:
  • Newer firmware for the shelf modules present is placed in the /etc/shelf_fw directory.
-and-
  • The following commands are issued:
    • priv set advanced
    • storage download shelf
       -or-
      storage download shelf adapter_name
    • priv set

Upon the next reboot:

This occurs when both the following conditions are met:
  • Newer firmware for the shelf modules present is placed in the /etc/shelf_fw directory.
  • The controller is rebooted.

Upon certain events being encountered:

This occurs when the following conditions are met:
  • Newer firmware for the shelf modules present is placed in the /etc/shelf_fw directory.
-and-
  • One of the following events occur:
    • The cf giveback command is issued
    • New disk drives are inserted
    • New shelf modules are inserted
    • A-SAS shelf is hot-added
       
ACP Firmware:
ACP Firmware is updated in one of the following two ways:

In the background:
This occurs when the following condition is met:

Newer firmware for the ACP is placed in the /etc/acpp_fw directory.
Note: No other action is required - Data ONTAP polls this directory periodically.
When manually triggered:
This occurs when the following conditions are met:
  • Newer firmware for the ACP is placed in the /etc/acpp_fw directory.
  • The following commands are issued:
    • priv set advanced
    • storage download acp
    • priv set
For complete information on all the firmware updates, see the Upgrade Guide for the version of Data ONTAP being used.
---
Data ONTAP and Disk Qualification Package (DQP)
Data ONTAP does not recognize a drive correctly.
Data ONTAP recognizes a 15k RPM drive as 10K RPM (default).
  1. Where does one install the DQP package?
    Data ONTAP looks for the qual_devices* file in the /etc directory of the root volume.
     
  2. Should one copy a specific version of the qual_devices file out of the archive or should one copy the contents of the entire DQP archive in the /etc folder? The minimum requirement is to install the version specific to the current Data ONTAP running on the storage system. The DQP file should be placed in the /etc folder in the root volume (/vol/vol0) on the filer.

    However, it is recommended to place all qual_devices* files (in the Disk Qualification Package) in the /etc folder to ensure smooth Data ONTAP upgrades in future.
     
  3. How does Data ONTAP determine if the DQP file has changed? And, how frequently does it check for changes in the installed DQP file? Data ONTAP reads the modification time of the DQP file to determine if it has changed or not. If the file modification time is different from the last time it checked, it processes it.
    Data ONTAP checks approximately every 5-10 minutes to see if the file modification time has changed.
     
  4. Does one have to reinstall DQP every time one adds a new drive or shelf?
    No, one does not have to install a new DQP every time one adds a new drive or shelf.
    Nonetheless, it is good practice to install the latest DQP, disk firmware, shelf firmware before the new hardware is added. The best time to do this is close to (before) adding new hardware.
     
  5. Does Data ONTAP load DQP after a reboot?
    Yes, it loads DQP as a part of the boot up process if it finds unqualified disks that are unknown to the kernel. This may take place a few minutes after the initial boot up and therefore a little delay is expected.
     
  6. Does Data ONTAP understand all versions of qual_device or does it understand only specific version depending upon the Data ONTAP revision?  
    Yes, specific revisions of Data ONTAP look for a particular revision of the /etc/qual_devices file as shown below. However, you still need to install/copy allqual_devices* files to the filer, regardless of what version you are on.

    qual_devices     For releases prior to 7.2.1
    qual_devices_v2  For releases 7.2.1, 7.2.2 and 7.2.3
    qual_devices_v2.copy Backup copy of v2 file
    qual_devices_v3  For releases 7.2.4 and later
    qual_devices_v3.copy Backup copy of v3 fi
    le

    Note: If the Data ONTAP version is 7.2.4 and later, then refer the latest version of 7.3. For reference, see:
    Burt 270735
    Burt 234290
  7. How do I force Data ONTAP to re-read the Disk Qualification File?
    One can reboot the filer to have Data ONTAP re-read the qual_devices* files
CautionDO NOT edit the qual_devices* files or save the changes - any changes in the Qual Devices file will render the file meaningless and prevent Data ONTAP to read it successfully.
The latest qual_devices file is located at http://mysupport.netapp.com/NOW/download/tools/diskqual/
---

Wednesday, March 2, 2011

nagios notification

Object Inheritance http://nagios.sourceforge.net/docs/3_0/objectinheritance.html

define host {
 name              windows
 contact_groups    +windows
 ...
}
define host {
    name              citrix
    contact_groups    +citrix
    ...
}

For the citrix Windows VM, we want it inherit all the Windows properties, but not the contact group. This would not work.

define contact {
     contact_name      joe
     contact_groups    +windows, !citrix
     ...
}

Work around:

define host {
     use              windows, citrix
     contact_group    citrix
     ...
}


There seems to be a bug that host and service contact_groups overwrite each other. Similiar to bug http://tracker.nagios.org/view.php?id=166
define host {
     use              windows, citrix
     contact_group    citrix
     ...
}

would overwrite

define host {
    contact_group    +windows
    ...
}

end up with only critical group receive alert.