Thursday, January 24, 2013

Brief Notes on Veritas Netbackup



This document is to troubleshoot netback failure

How to check client and media server communication?

Below command will check client and media server communication.

ClientServer# /usr/openv/netbackup/bin/bpclntcmd -pn
expecting response from server MediaServer
MediaServer ClientServer 10.0.0.91 12345
In the above example:
  • The master server is MediaServer
  • The connection name is ClientServer
  • The NetBackup client name is ClientServer
  • The IP address of ClentServer is 10.0.0.91
  • The port used to connect is 12345

How to list backup jobs of a client?

Find list of already completed jobs based on Client name and Policy Name. Take note of JobID of backup job you are investigating.
 
MediaServer# /usr/openv/netbackup/bin/admincmd/bpdbjobs |grep ClientServer |grep ClientServer-Policy |more

Why a backup failed?

See start and end time of job. Last few lines will show final status of job and EXIT STATUS.

MediaServer# /usr/openv/netbackup/bin/admincmd/bperror -jobid 62175 -U -hoursago 500

What is meaning of different EXIT STATUS ?


MeiaServer # /usr/openv/netbackup/bin/admincmd/bperror -statuscode 71

What are the filesystem included in a Policy?

 
MediaServer# /usr/openv/netbackup/bin/admincmd/bppllist ClientServer-Policy

Tuesday, January 22, 2013

Running Linux VM under VirtualBox on your Windows Laptop

First I thought to title this page - How do I run Linux on my personal laptop ?  -:)

What I use ?

I run Fedora on Oracle VirtulBox . Oracle sates - "VirtualBox is the only professional virtualization solution that is freely available as Open Source Software". 


What You Need to Download ?
  1. VirtualBox                                       : https://www.virtualbox.org/wiki/Downloads
  2. Oracle VM VirtualBox Extention Pack   : Available on above url
  3. Latest Fedora VirtualBox image          : http://virtualboxes.org/images
  4. Fedora ISO image                             : http://mirrors.163.com/fedora/releases/
Installation of software and VM Creation
  • Install VirtualBox  & Oracle VM VirtualBox Extention Pack - just follow on screen instruction
  • Uncompress Fedora Virtualbox VM image using 7-Zip
  • Open VirtualBox . Click Machine->Add - select uncompress Fedora Virtualbox VM image
  • VM will be added
Configuring Virtual Machin

Configure vCPU
  • Check your laptop processor - how many core it has ? For example my laptop have intel Core i5-2410M  CPU . It is Dual Core CPU. 
  • Click on system on Fedora VM and change number of core to 2. Matching VM core with your laptop processor core is recommended to get most of CPU benefit at VM.
Configure VM RAM
  • Set your CM RAM 2048 MB
Configure VM Network (vNIC)
  • Select Bridged Adapter under Network Adapter 1
Now, Power on your VM. You will get GUI login prompt within a minute ! Try Fedora VM Credential  - (username/password): root/reverse and/or fedora/reverse

Other Issues

Keyboard

If keyboard mapping is not correct, change KEYTABLE and LAYOUT to "us" in below files and recreate grub.cfg

# vi /etc/sysconfig/keyboard
# vi /etc/sysconfig/grub
grub2-mkconfig -o /boot/grub2/grub.cfg


Hostname

Change hostname of your system in /etc/sysconfig/network


Mount ISO image

Go to Devices-> Choose a virtual CD/DVD disk file And select Fedora-17-i686-Live-Desktop.iso image.

Network

If you router is configured for DHCP, dhcp will be configured for vNIC in /etc/sysconfig/network-scripts/ifcfg-p2p1. Run below command to check if IP is assigned, default route is pingable and your laptop IP is pingable.
# ifconfig -a
# netstat -nr (to find default route IP)
# ping <default route IP>
# ping <your laptop IP>
# ping google.com

Update Installed Packages

Since your Linux VM is already internet enabled, you will be able to access yum repository available  on internet. To check - upgrade bash package to latest release.
# yum clean all && yum upgrade bash

Stop Daemons You don't need

Stop Linux daemon you do not need for your day to day work to lower system resource usages.
# yum -y install system-config-services && system-config-services 

If all works fine, your are good to open your gmail in your Fedora Linux VM ! 

Reference

https://www.virtualbox.org/wiki/Documentation
http://www.virtualbox.org/manual/ch01.html

Credit

My friend Sanjay Kumar for waking up my mind



Wednesday, January 9, 2013

What's SSH Tunneling

This will explain how to configure ssh tunnel

I am running Veritas Operations Manager (VOM) on RemoteServer001 running Linux  RHEL5.8. VoM is listening on tcp port 14161.

RemoteServer001# netstat -nlp |grep  java
tcp        0      0 :::14161                    :::*                        LISTEN      23340/java

I tried to access VOM thru my browser (http://RemoteServer001:14161 ) and it failed with message – page cannot be displayed.

My local desktop LocalDesktop001 is running Linux Fedora17. On furthere checking, I found that I am able to do ssh (port 22) from LocalDesktop001 to RemoteServer001 . But firewall do not allow to connect on port 14161 on RemoteServer001 from LocalDesktop001.

It means below command is unsuccessful.
LocalDesktop001# telnet      RemoteServer001    14161        [Fails]

In Short:


LocalDesktop001 ==> RemoteServer001:22                          [Works]
LocalDesktop001 ==> RemoteServer001:14161                    [Fails because of failrewal]


In this situation, we can redirect all the traffic of port 14161 via allowed port 22 on LocalDesktop001 and send it to RemoteServer001 as ssh traffic. This traffic  will be handled by RemoteServer001 ssh server and it will send to port 14161 of RemoteServer001.

This is what know as SSH Uunneling !

On LocalDesktop001 Linux system, run below command  to tunnel localhost:14161 via port localhost:22 to RemoteServer001:14161.


LocalDesktop001# ssh     -f      -L    14161:localhost:14161     root@RemoteServer001

   -f   :  Requests ssh to go to background just before command execution
   -N :  Do not execute a remote command on remote server

Verify it on local system:

LocalDesktop001# netstat -nlp|grep 14161
tcp        0      0 127.0.0.1:14161         0.0.0.0:*               LISTEN      3907/ssh

Now, instead of http://RemoteServer001:14161 ,  use http://localhost:14161 (or http://127.0.0.1:14161 ) url on LocalDesktop001 browser. Web traffic will be tunneled to RemoteServer001 on port number 14161 via allowed tcp port 22 !!

References:
http://www.revsys.com/writings/quicktips/ssh-tunnel.html

Thursday, January 3, 2013

Creating Media Centre using Raspberry Pi - KODI(XBMC)


This page will describe how to make a XBMC Media Centre Box using Rapberry Pi to make your normal TV internet enabled. Once it is ready to use there will be only 3 cables attached - HDMI, NIC and Power cable.

Raspberry Pi

Size of this box is  - size of your credit card.
Height of this box is - almost size of a cigarette packet.

You may not be saving a lot while doing this yourself instead of buying a ready-made box for same purpose, but a lot of fun and creativity is guaranteed !

Pre-Requisite

A little creativity, a pinch of Linux knowledge, a spoon of time, few dollars bills, permission from your spouse to take control of your TV for few hours and skill to be happy like child !!

Bill Of Materials

Raspberry Pi Model-B - Credit Card size Arm PC board ( ~USD 50)
Case to house Raspberry Card ( ~USD 8)
A SD Card - Not a microSD ( 2 to 32 GB )
A HDMI cable
A mini usb power supply ( You can use your Blackberry or Samsung Galaxy power supply)
A RJ45 cable
A USB Keyboard and Mouse ( Used for initial setup )
MPEG-2 and/or VC-1 license key Read this and this
Time - 2 Hours
Internet - ( I am using 2Mbps)

Where To Buy Raspberry Pi?

Raspberry Pi box has just card. No cable. Check : element14.com or rs-online.com . Talk to vendor support to check availability and delivery time before placing online order.
In Singapore, I have purchased my Rapberry Pi with case for SGD 70 (inclusive GST) from Sim Lim Tower http://www.federalcomponent.com/


XBMC Images

You can download one of below Debian Linux based media centre distro images  and copy it on SD card. See more detail here . Download OS image. Write image on SD card using win32diskimager, dd, SDFormatte or any similar software.

OpenELEC : See Readme.txt
Xbian
Raspbmc

Add The Bricks  Together

- Connect all cables (Power, Network, HDMI, Mouse, keyboard)
- Insert SD card
- Power on TV and power on Raspberry Pi
- If you see XBMC screen on TV, treat yourself with a cope of coffee !

Remote

Soft Remote

You can use your smart phone to use as remote for your Media Centre. I have tested 'Official XBMC
Remote' - KORE on Android . It worked fantastic - 10/10!

  • you can send text from phone to xbmc e.g. a search text in your youtube
  • it emulate a physical remote - so common sense work quite well
  • there is back button to trace last operation, there is menu button to go home screen, there is info button to get information of a track/movie/file/youtube videa.

iOS and Android app can be downloaded from http://kodi.wiki/view/Official_XBMC_Remote

- 'Play to Kodi' Chrome browser plugin also work as remote and can send youtube video link to Kodi to play it independently

Note: Make sure you are entering correct IP of your XBMC box and Port of web server running on it. Default port displayed on soft remote is 8080 but Webserver default port running on XBMC/KODI is 80. So replace 8080 with 80 while configuring your remote.

Physical Remote

[1] My LG TV Remote worked fine with Xbian. It was working fine without any additional configuration. It used HDMI cable to pass control to Xbion.
[2] Also refer these articles : Article-1, Article-2,
[3] I am using wired mouse to instruct my media centre !

XBMC Add-On

http://wiki.xbmc.org/index.php?title=Unofficial_add-on_repositories
http://wiki.xbmc.org/index.php?title=Category:All_add-ons

 For Indian/Pakistani channels

 Others

  • It can recognize your NAS/SAS Drive having movies/videos as media source.
  • Stable Android OS is still not available for Raspberry Pi

Web Browser

I heard Opera is working on these 3 XBMC distro. Though I have not tested yet.

Credit

Thanks to Gaurav Swarup Sharma and his friend Sangeet Bhambri for pulling me in this work and sharing related information.

References

http://mymediaexperience.com/raspberry-pi-xbmc-with-raspbmc/
http://wiki.xbmc.org/index.php?title=Raspberry_Pi


Wednesday, January 2, 2013

Single Board Computers



Product
OS Price(USD) Company Pro Cons
Raspberry Pi Linux
Rasbarian
OpenELEC
XBMC distro
30 Raspberry Pi Foundation, UK
Credit Card Size
Popular
Credit Size
512MB RAM, No Flash, 2 USB, NIC, HDMI,SD slot
Availability,
Without Case
Via Android PC (APC) System Android 50 VIA Technologies, Taiwan 512M RAM +2GB Flash, 4 USB, HDMI, VGA, microSD, NIC Availability,
Without Case
FXI Cotton Candy Android
Ubuntu
200 FXI Technologie
Norway
USB Stick
HDMI, 2USB, Wifi No NIC
Cost
MK802 Android 75 Rikomagic, China HDMI, microSD, 4GB Flash, 2 USB,Wifi Need HDMI
No NIC
Mele A1000 Ubuntu
Linux Distro
90 Mele, China HDMI,VGA, USB, NIC, External SATA With Case
TV Box
Beagle Board
OMAP3530 
Linux 150 Texas Instruments (TI)s' OMAP3530 technology, Pocket size Low Power Slightly bigger
Ref : http://www.efytimes.com/e1/creativenews.asp?edid=84368