Thursday, December 27, 2012

Introduction: Scripting your Brocade Fibre Channel switches

HOW-TO collect data from multiple brocade switches

Got tired as a SAN administrator after logging into all your Fibre Channel switches to perform just one configuration change? Well, I did and I decided to find a way to perform basic configuration tasks by script.
We all know how to remotely manage a Brocade fibre channel switch. If you have lots of time, you are using the WebTools. If you have only minutes left during a working day, you know almost all FabOS commands by heart, connecting to the switches using ssh.
On the top of my wishlist was the possibility to schedule an upload of the switch configuration. That’s why I started with this little project. At least the start was very easy. After spending several hours using ssh to connect to the switches the command to save the config was rapidly written down:
configupload -all -ftp 10.0.0.1,configupload,fcswitch01-today.txt
(For testing purposes the account configupload is configured without a password.)

That’s the beginning. Let’s now connect to the switch to execute this command. I choose to use Expect as a programming language. With this language it is very easy to respond on interactive commands, like snmpconfig. The idea is to build a framework, that can be used for all kinds of commands you can execute on a fibre channel switch. In Expect, you can connect to a Brocade switch using ssh with the command
spawn ssh -l admin fcswitch01
The nice part of Expect is in my opinion, you can describe what you will see. So what will happen, when setting up a ssh connection to fcswitch01 using the account admin? You will be asked to enter your password. So you can describe that as follows.
expect "*password: "
Now you can send your password within the script.
send "password\r"
The \r represents a hard return. If the password of the admin account is really “password”, you now will be logged on into the switch.
Again, you have to describe what the output of the ssh terminal, would be if you logged on by yourself. Afterwards, you can issue the command you want to execute. Finally you have to exit the session in a decent manner. This would be scripted as follows.
expect "*admin> "
send "configupload -all -ftp 10.0.0.1,configupload,fcswitch01-today.txt\r"
expect "*admin> "
send "exit\r"

At this point we have written a script that allows us to upload a switch configuration of a particular switch. Unfortunately a fibre channel SAN mostly consists of multiple switches. We don’t want to have one script per switch. We need to use some variables in the script and make the script more general. Besides that, I don’t think the presence of the account and the password in the script is a safe way.
To enhance the script, I usually use three text files. One is containing all the switches in the fabrics and the file is called switches.txt. For naming purposes I make sure name resolution is working for the switches. If customers don’t want to add them to DNS, I always edit the hosts file of the management server. A second file user.txt only contains the account used for login. In the third file password.txt the associated password is written.
The three files are opened read-only at the first three lines of the script:
set file [open ~/tools/switches.txt r]
set pass [open ~/tools/pass/password.txt r]
set account [open ~/tools/pass/user.txt r]

The user and password are put into a variable, so we can use that variable in the script. We use the command gets for it. gets reads one line of the text file.
gets $pass admpw
gets $account admin

Next to do, is to go to the file switches.txt and read one line after another and perform some actions to the switch. That is done in the following way.

while 1 {
if {[gets $file fcsw] == -1} break
commands
}
At the end I usually declare another variable in which the current date is set. I will use this date in the filename for the switch config.
set date [timestamp -format %Y%m%d]
When we combine al this programming, we will get the following script. I normally use this script every night to have a daily backup of all switch configurations.
set file [open ~/tools/switches.txt r]
set pass [open ~/tools/pass/password.txt r]
set account [open ~/tools/pass/user.txt r]
set date [timestamp -format %Y%m%d]
#--
gets $pass admpw
gets $account admin
#--
while 1 {
if {[gets $file fcsw] == -1} break
#--
spawn ssh -l $admin $fcsw
expect "*password: "
send "$admpw\r"
expect "*$admin> "
send "configupload -all -ftp 10.0.0.1,configupload,$fcsw-$date.txt\r"
expect "*$admin> "
send "exit\r"
}

The beauty of this script is maybe not the programming, but the reusability of it. Replace the command of the configupload with any other command you need to execute. This is a very fast way to make sure you have consistent configurations of all your switches. I will attach a script in which snmp settings are configured. You can also see how you can deal with interactive commands also with Expect.

Tuesday, December 11, 2012

HOW-TO: Qualcomm Gobi 2000 under linux


yum -y install gcc
cd /tmp
wget http://www.codon.org.uk/~mjg59/gobi_loader/download/gobi_loader-0.7.tar.gz
tar xvzf gobi_loader-0.7.tar.gz && cd gobi_loader-0.7
make && sudo make install
cp /lib/udev/rules.d/60-gobi.rules  /etc/udev/rules.d
/

Now you have to get the firmware images from the Lenovo website. This is a windows executable- get the latest and greatest directly from the Lenovo support page or here. You will have to extract the contents - either you have a Windows(R) machine running somewhere, or use wine for it...  yeah, I know...

The installer will extract the firmware files into %Program Files%\QUALCOMM\Images\Lenovo\.

Now you will see several directories named 0-12, and UMTS. According to the information found on this thinkwiki page, they break down as follows:

Dir Image Dir Image
0 Vodafone Image 1 Verizon Image
2 ATT Image 3 Sprint Image
4 T-Mobile Image 6 Generic UMTS Image
7 Telefonica Image 8 Telecom Italia Image
9 Orange Image 12 DoCoMo Image
UMTS Default Firmware

Now, use your imagination to get the best out of your WWAN - for me the UMTS ran fine on 5 not listed (south-, centralamerican and asian) operators, too - but that may vary. Obviously, should your operator be listed, choose the according directory and then substitute below's with your favourite directory "id" (e.g. 2 or 12 or UMTS or...):

http://www.thinkwiki.org/wiki/Qualcomm_Gobi_2000

how to activate GSM modem:

/lib/udev/gobi_loader -2000 /dev/ttyUSB0 /lib/firmware/gobi
 

Friday, November 9, 2012

Tuesday, October 2, 2012

How to mount remote windows partition (windows share) under Linux

Procedure to mount remote windows partition (NAS share)
1) Make sure you have following information:
==> Windows username and password to access share name
==> Sharename (such as //server/share) or IP address
==> root level access on Linux
2) Login to Linux as a root user (or use su command)
3) Create the required mount point:
# mkdir -p /mnt/ntserver
4) Use the mount command as follows:
# mount -t cifs //ntserver/download -o username=vivek,password=myPassword /mnt/ntserver
Use following command if you are using Old version such as RHEL <=4 or Debian <= 3:
# mount -t smbfs -o username=vivek,password=D1W4x9sw //ntserver/download /mnt/ntserver
5) Access Windows 2003/2000/NT share using cd and ls command:
# cd /mnt/ntserver; ls -l
Where,
  • -t smbfs : File system type to be mount (outdated, use cifs)
  • -t cifs : File system type to be mount
  • -o : are options passed to mount command, in this example I had passed two options. First argument is password (vivek) and second argument is password to connect remote windows box
  • //ntserver/download : Windows 2000/NT share name
  • /mnt/ntserver Linux mount point (to access share after mounting)

Monday, October 1, 2012

HOW-TO enable multipathing on RedHat Linux 5.x

In Red Hat Enterprise Linux 5, device-mapper-multipath is installed by default. This is a change from Red Hat Enterprise Linux 4. If a third party multipathing solution is in use, device-mapper-multipath should be disabled to avoid any conflict between the multiple multipathing technologies. But RedHat multipathing is NOT ACTIVATED by default and you must enable it.

To enable it, modify the setting in /etc/sysconfig/mkinitrd/multipath file by changing MULTIPATH from NO  to YES
        MULTIPATH=YES

By default, /etc/multipath.conf has all devices blacklisted. If this default configuration has been changed, the change should be reverted. Comment out following three lines:
        # Blacklist all devices by default. Remove this to enable multipathing
        # on the default devices.
        blacklist  {

               devnode "\*"       
        }
Then reboot. Enable the multipathd on boot and start it by
        chkconfig mutipathd on
        service multipathd start
At this time, you should be able to see multiple connections to the LUNs on the storage array if everything set correctly and you can verify it using   "fdisk -l". You should see  some newly enabled "dm-??" devices.  Also run "/sbin/multipath -ll" command and should see the path to each device. i.e. the path mpath2 for device dm-7 pointing to two devices sdj and sdx.   
     mpath2 (3600a0b80004879f0000004064a5b5d9f) dm-7 SUN,CSM200_R
     [size=50G][features=1 queue_if_no_path][hwhandler=1 rdac][rw]
    \\\\\\_ round-robin 0 [prio=200][active]
     \\\\\\_ 0:0:1:2 sdj  8:144  [active][ready]
     \\\\\\_ 1:0:1:2 sdx  65:112 [active][ready]
     \\\\\\_ round-robin 0 [prio=0][enabled]
     \\\\\\_ 0:0:0:2 sdc  8:32   [active][ghost]
     \\\\\\_ 1:0:0:2 sdq  65:0   [active][ghost]

You should see I/O activities on both sdj and sdx when  running dd test on dm-7.

Rescan the SCSI bus w/out rebooting

To add or remove a SCSI device explicitly, or to re-scan an entire SCSI bus without rebooting a running system:



Red Hat Enterprise Linux 4 or 5:

To rescan an entire SCSI bus and re-register all devices found:
When dealing with fibre attached storage, it is necessary to issue a LIP (loop initialization primitive) on the fabric:
shell> echo "1" > /sys/class/fc_host/host#/issue_lip

Replace the “#” with the number of the SCSI bus to be rescanned.

Note: Issueing a LIP (above) on Red Hat Enterprise Linux 5 is all that is needed to rescan fibre
attached storage. Once the LIP is issued, the bus scan may take a few seconds to complete.

To rescan all other SCSI attached storage, a rescan should be issued:
shell> echo "- - -" > /sys/class/scsi_host/host#/scan

Replace the “#” with the number of the SCSI bus to be rescanned.

In addition to re-scanning the entire bus, a specific device can be added or deleted for some versions or Red Hat Enterprise Linux as specified below.

Red Hat Enterprise Linux 4 or 5:

To remove a single existing device explicitly
shell> echo 1 > /sys/block//device/delete

Red Hat Enterprise Linux 3 or 4:

To add a single device explicitly:
shell> echo "scsi add-single-device    " > /proc/scsi/scsi
To remove a device explicitly:
shell> echo "scsi remove-single-device    " > /proc/scsi/scsi
Where are the host, bus, target, and LUN numbers for the device,as reported in /sys (2.6 kernels only) or /proc/scsi/scsi or dmesg. These numbers are sometimes refered to as “Host”, “Channel”, “Id”, and “Lun” in Linux tool output and documentation.

3Par Documentation, Best Practices, and Case Studies Repository

3Par related documents are pretty difficult to locate. I hope that this links can help you, then it will be good.  If any of you have other documents that are not listed please contact me via blog, and I will post it to this blog.

3PAR BROCHURES

HP 3PAR Utility Storage Product Brochure
HP Financial Services offers Low Rate Financing for HP 3PAR
3cV: virtual utility computing Solution Brief
HP 3PAR Storage Technologies for VMware Server Virtualization Solution Brief
HP advantage for hosting companies (US English)
HP 3PAR Utility Storage Product Brochure
HP 3PAR Utility Storage Cloud Solutions for Hosting Service Providers (US English)
Rapid Application Recovery with HP 3PAR Utility Storage Solution Brief
HP 3PAR Nearline for Online Solution Brief
HP 3PAR System Tuner Software Solution Brief
HP 3PAR Virtual Lock Software Solution Brief
HP 3PAR System Reporter Software Solution Brief
Technology Services and Support for HP 3PAR Storage Systems (US English)
HP Storage and Microsoft Exchange
HP 3PAR Secure Service Architecture
HP 3PAR Thin Guarantee Flyer
HP Storage and Microsoft Exchange 2010 with Microsoft Hyper-V
HP 3PAR Utility Storage: Persistent Cache
HP 3PAR Autonomic Groups Software
HP Storage: Discover the SAN Solutions with a Future and Simplify moving to Microsoft Exchange 2010
HP 3PAR Management Software for VMware Solution Brief
3PAR Recovery Manager for Oracle Solution Brief
3PAR Recovery Manager for Exchange Solution Brief
3PAR Recovery Manager Software for VMware vSphere Solution Brief

3PAR DATA SHEETS
HP 3PAR software family – Data sheet (US English)
HP 3PAR Storage System Installation and Startup Service data sheet – U.S. English
HP 3PAR F-Class and T-Class Storage Systems (US English)
HP P10000 3PAR Storage Systems Data Sheet (US English)
HP 3PAR Peer Motion Software (US English)
HP Cluster Extension Solution Implementation Service data sheet – US English
HP 3cV Virtual Utility Computing with HP 3PAR, HP BladeSystem and VMware vSphere (solution brief)
HP 3PAR Software Installation and Startup Service data sheet – US English
HP Storage Infrastructure Transformation from HP Storage Consulting (service brief)
HP 3PAR Hardware Storage Systems – Family data sheet (UK English)
HP 3PAR Storage Assessment Service – US English

3PAR WHITE PAPERS
HP 3PAR T800 Storage System 140,000 User Exchange Server 2010 Mailbox Resiliency Storage Solution
HP 3PAR Storage Systems Designed for Mission Critical High Availability
Converged Management with HP H-series Switches (US English)
HP 3PAR Remote Copy Software: Simple and Efficient Remote Replication
HP 3PAR Recovery Manager Software for Microsoft SQL Server and Microsoft Exchange
HP 3PAR Secure Service Architecture White Paper
Benchmark report for SAS Grid Manager on HP ProLiant BL460c G7 Blades and 3PAR T800 Storage System
HP 3PAR Utility Storage with VMware vSphere
HP 3PAR Utility Storage Systems tested configuration for Quantum StorNext 4.0
The HP 3PAR Architecture: Returning Simplicity to IT Infrastructures white paper
The Best Way to Build a Cloud – HP CloudSystem Matrix and HP 3PAR Utility Storage provide solid, flexible foundation
HP 3PAR Fast RAID: high performance without compromise
HP 3PAR System Reporter Software technical white paper
Utility Storage Benefits White Paper
HP 3PAR Storage Systems for Microsoft Exchange Server Technical white paper (US English)
Simplifying Storage Administration with 3PAR Autonomic Groups

3PAR ANALYST REPORTS
ESG: HP P10000 3PAR Storage: Extending Tier-1 Storage Choice Analyst Report
Evaluator Group – Analysis of HP Peer Motion with Storage Federation – Analyst Report (US English)
Taneja Group Analysis: 3PAR Storage: Tailor-Made for Virtual Infrastructures White Paper

3PAR TECHNICAL DOCS
3PAR Architecture Overview
3PAR VMWare Best Practices
3PAR Thin Provisioning Best Practices
3PAR Terminology
3PAR T-Series Quickspecs
3PAR T-Class Maintenance Manual
3PAR T-Class Installation Guide
3PAR Software Overview
3PAR P10000 Solution Brief
3PAR InForm OS 2.31 Concepts Guide
3PAR HP0_J49 Exam Prep
3PAR HP Array Controller Types
3PAR F-Series Quickspecs
3PAR F-Class Maintenance Manual
3PAR F-Class Installation Guide
3PAR CLI 2.3.1 Reference
3PAR 4.10 InForm Management Console Users Guide
3PAR 2.31 Remote Copy Users Guide
3PAR 2.31 Concepts Guide
3PAR 2.31 CLI Administrators Manual
3PAR 2.31 CLI Admin Guide
3PAR System_Reporter
3PAR System_Reporter Release_Notes
3PAR SP Manual

Thursday, September 27, 2012

HOW-TO check under Linux qlogic/emulex hba firmware version and model name type

Here’s a script to check linux hba model name, firmware version:
#!/bin/ksh
for SCSI in `ls -d /sys/class/scsi_host/host*`;
do
[ -e ${SCSI}/modelname ] && echo -n ‘Model Name ‘ && cat ${SCSI}/modelname;
[ -e ${SCSI}/model_name ] && echo -n ‘Model Name ‘ && cat ${SCSI}/model_name;
[ -e ${SCSI}/fwrev ] && echo -n ‘Firmware Version ‘ && cat ${SCSI}/fwrev;
[ -e ${SCSI}/fw_version ] && echo -n ‘Firmware Version ‘ && cat ${SCSI}/fw_version;
done
Also here’s a script for you if you’re checking bunches of servers:
#!/bin/ksh
USERNAME=”root
PASSWORD=”yourpassword”
for i in `cat /home/doxer/servers_list_linux`
do
echo “”>/root/.ssh/known_hosts
expect < spawn ssh -l${USERNAME} -p22 $i “echo -n ‘====’;hostname;cat /sys/class/scsi_host/host*/{modelname,model_name,fwrev,fw_version}”
set timeout 20
expect “*yes*”
send “yes\r”
expect “assword:”
send “${PASSWORD}\r”
expect eof
EOF
done

Tuesday, September 25, 2012

HP resources for VMware

General resources

VMware on ProLiant

HP Storage

VDI

vCloud Director

Blog posts

This section includes posts from several bloggers about VMware and HP.

Storage Best Practices from different vendors on VMware vSphere

Here is a collection of storage Best Practices from different vendors on VMware vSphere.

HP

HP Enterprise Virtual Array (EVA) family with VMware vSphere 4.0, 4.1 and 5.0 Configuration Best practices
Download
Running VMware vSphere 4 on HP LeftHand P4000 SAN Solutions
Download
Best Practices for deploying VMware and vSphere 4 with VMware High Availability and Fault Tolerance on HP P4500 Multi-Site SAN cluster
Download
HP P4000 LeftHand Solutions with VMware vSphere Best Practices (incl. vSphere 5)
Download
3PAR Utility Storage with VMware vSphere
Download
HP P2000 Software  Plug-in for VMware VAAI
Download
HP 3PAR Storage and VMware vSphere 5 best practices
Download

NetApp

NetApp Storage Best Practices for VMware vSphere TR-3749
Version 3.0, last updated: December 2011
Download
NetApp Deploying VMware vCenter Site Recovery Manager 5 with NetApp FAS/V-Series Storage Systems
Version May 2012
Download

EMC

Using EMC VNX Storage with VMware vSphere
Version 1.0
Download
Using VMware vSphere with EMC Symmetrix Storage
Download
EMC Powerpath/VE for VMware vSphere Best Practices planning
Download

Dell


Configuring iSCSI Connectivity with VMware vSphere 5 and Dell EqualLogic PS Series Storage TR1075
V1.0 November 2011
Download

Disaster Recovery with Dell EqualLogic PS Series SAN and VMware vSphere Site Recovery Manager 5 TR1073
V1.0 September 2011
Download
Sizing and Best Practices for Deploying VMware View 4.5 on VMware vSphere 4.1 with Dell EqualLogic Storage
Download
Configure VMware vSphere Software ISCSI with Dell EqualLogic PS Series Storage
Download
Sizing and Best Practices for Microsoft Exchange 2010 on VMware vSphere and EqualLogic storage
Download
Dell EqualLogic iSCSI Volume Connection Count Maximum Characterization
Download

Hitachi

Optimizing the Hitachi Virtual Storage Platform in vSphere Environments
Download

IBM

IBM Storage N series and VMware vSphere Storage Best Practices
Download

IBM StorWize V7000 Unified: A feature-rich environment for VMware vSphere 5.0
Download

Monday, September 17, 2012

HP Custom image VMWare ESXi 5.1.0

Dear VMWare engineers (and others that uses wonderfull VMWare products), new version of VMWare HP Custom build images is available on following link:

https://my.vmware.com/web/vmware/details?downloadGroup=HP-ESXI-5.1.0-GA-10SEP2012&productId=285

1. VMware-ESXi-5.1.0-799733-HP-5.30.28.iso
MD5SUM:fa2763c0001252c7cff8324739855a9d SHA1SUM:8fc18964f2f35b37c1c35d3a1a8c112d62aa38ef

2.  VMware-ESXi-5.1.0-799733-HP-5.30.28.zip
MD5SUM:35934890d23bd6cea20732778964edf8 SHA1SUM:0a9d5f8fd45f03a51131ada29d61c0de63187627

To be able to use this version, keep in mind that it is needed to have up2date firmware on HP servers.
HP / VMWare cookbook is available on location: http://vibsdepot.hp.com/hpq/recipes/September2012VMwareRecipe2.0.pdf


New HP VMWare images have following bundles included:

SW Depot Product Base OS Image VIBs added to HP's images URLs for the bundles that contain the VIBs

5.1 Sept 2012 vSphere 5.1
Build 799733
char-hpcru 5.0.2.21-1OEM.500.0.0.434156 HP ESXi Offline Bundle for VMware ESXi 5.0 version 1.3
char-hpilo 500.9.0.0.9-1OEM.500.0.0.434156
hp-smx-provider 500.03.01.00.5-434156
hp-ams-esx-500.9.2.0-11.434156
hp-nmi - Version 500.2.0.11-434156 HP NMI Sourcing Driver for VMware ESXi 5.0 version 2.1
hpacucli-9.20.9.0.vib HP ESXi Utilities Offline Bundle for VMware ESXi 5.0 Version 1.3
hpbootcfg-01-01.02.vib
hponcfg-04-00.10.vib
char-hpilo-500.9.0.0.9-1OEM.500.0.0.434156.x86_64.vib
hp_vaaip_p2000 - Version 2.1.0-2 HP hpvaaip p2000
net-bnx2 - Version - 2.2.1l.v50.1-1 Broadcom NX2 package
net-bnx2x - Version - 1.72.54.v50.2-1
misc-cnic-register - Version - 1.72.1.v50.1-1
net-cnic - Version - 1.72.50.v50.1-1
scsi-bnx2fc - Version - 1.72.51.v50.1-1
scsi-bnx2i - Version - 2.72.10.v50.2-1
net-tg3 - Version 3.123b.v50.1-1 Broadcom tg3 Driver
net-mlx - Version – 1.6.1.2-1 Mellanox ConnectX Driver
net-qlcnic - Version 5.0.741-14 Qlogic qlcnic Driver
net-nx-nic - Version 5.0.614-3 Qlogic nx_nic Driver
net-igb - Version 3.2.10-1 Intel igb Driver
scsi-hpsa - Version 5.0.0-28 HP hpsa Driver
scsi-hpvsa - Version 5.0.0-36 HP hpvsa Driver
mpt2sas - Version 13.10.02.00.1 LSI mpt2sas Driver
scsi-qla2xxx - Version 911.k1.1-26 Qlogic qla2xxx Driver
scsi-qla4xxx - Version 624.01.43-1 Qlogic qla4xxx Driver Set
ima-qla4xxx - Version 500.2.01.31-1
bfa - Version 3.0.0.0-1 Brocade bfa Driver

Sunday, September 16, 2012

HP 8540w + LinuxMint 13 + un2420 Mobile Broadband Module

My HP EliteBook 8540w comes with un2420 Qualcomm Mobile Broadband Module which requires Gobi 2000 firmware and drivers. Next image shows how does it look like in Windows 7 Device Manager:

 In Windows/Linux dual boot environment if one starts Windows first (with installed drivers for un2420), Windows will preload firmware into un2420 module and it will work fine under Windows. Restarting machine (not truning it off), and starting Ubuntu afterwards will enable Ubunutu to see un2420 module in functional state since the firmware will survive restart and stay loaded inside module.

The problem is when Ubuntu is started first (after machine was turned off), then firmware is not preloaded in un2420 and linux cannot see module ready for communication.

Before loading Gobi firmware into un2420 module LinuxMint 13 Mate recognizes un2420 as (VEN=03f0,DEV=241d):

$lsusb
...
Bus 001 Device 003: ID 03f0:241d Hewlett-Packard Gobi 2000 Wireless Modem (QDL mode)
...


un2420 module LinuxMint setup



First of all one has to copy Gobi 2000 firmware binaries from Windows to LinuxMint. Gobi 2000 dirvers are three binary files;

C:\Program Files\QUALCOMM\Images\HP\0\uqcn.mbn
C:\Program Files\QUALCOMM\Images\HP\UMTS\amss.mbn
C:\Program Files\QUALCOMM\Images\HP\UMTS\apps.mbn


In Ubuntu create /lib/firmware/gobi/ folder and copy firmware files in it.

Then install gobi_loader;

$ sudo apt-get install gobi_loader


Now when you have Gobi 2000 firmware binaries and gobi loader tool installed you can manually load firmware into un2420 device with the following command:

$ sudo /lib/udev/gobi_loader -2000 /dev/ttyUSB0 /lib/firmware/gobi


Now after loading firmware into un2420 module Ubuntu recognizes it as (VEN=03f0,DEV=251d):
:

$lsusb
...
Bus 001 Device 005: ID 03f0:251d Hewlett-Packard Gobi 2000 Wireless Modem
...


Loading of firmware into un2420 will take few seconds and after that the dialog to insert SIM card PIN will pop up.

un2420 SIM unlock dialog

Now you can setup your WWAN device in Network Manager:

un2420 in Network Manager

Friday, September 14, 2012

CentOS 6 / SL 6 / RHEL 6 How to change wireless standard

1.create a file called /etc/modprobe.d/iwlwifi.conf with a single line like this:

options iwlwifi 11n_disable=1

2. Reboot (or "modprobe -r iwlwifi ; modprobe iwlwifi" as root).
This can help in case of problem with iwlwifi driver / card.
 
Found on:  https://bugzilla.redhat.com/show_bug.cgi?id=785239

Wednesday, September 12, 2012

CentOS 6.3 VMware ESXi 5 network interface problem

I’ve been running CentOS on VMware ESXi 5 hosts for quite some time without any problems. However, after updating CentOS 6.2 to CentOS 6.3 (using the trusty-old ‘yum update’) I found myself presented with the following problem after guest OS reboot:
Bringing up interface eth0: eth0: vmxnet_init_ring alloc_page failed.
RTNETLINK answers: cannot allocate memory
This error is typical for driver issues, so I quickly knew where to look.

Original text can be found on location:
http://www.syn-ack.org/vmware/centos-6-3-vmware-esxi-5-network-interface-problem/

Monday, September 10, 2012

RPMFORGE and EPEL Repos on CentOS 6.3 64bit

RPMFORGE:

rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
 
rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

EPEL:

rpm --import https://fedoraproject.org/static/0608B895.txt
 
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
 
rpm -ivh epel-release-6-7.noarch.rpm

Wednesday, August 29, 2012

Using rsync to Mirror Directories

The rsync utility can be used to mirror a directory locally or over a network. As the name implies, rsync synchronizes two directories. Key benefits of the utility include:
  • After the first copy, only differences in files are copied, not the entire file. This saves time and bandwidth.
  • rsync works with ssh so it can copy files securely over a network.
Command Basics and the slash

To copy a directory from one directory to another, they command line would be:
rsync -options --otherOptions sourceDir targetDir

Example 1: rsync -vaz ~/bk/ ~/test

This example copies the contents of the ~/bk directory to the test test directory.

Example 2: rsync -vaz ~/bk ~/test

This example creates a bk directory under the ~/test directory and recursively copies the contents of the ~/bk into this new directory. This is slighly different from the first example.

Command Line Options

A few command line options are listed in the previous example. Each of these options is described below.
Key rsync Options
Option Description
-v Turn on verbose mode
-a This turns on archive mode. Bascially this causes rsync to recurse the directory copying all the files and directories and perserving things like case, permissions, and ownership on the target. (Note: Ownership may not be preserved if you are not logged in as the root user.)
-z Turns on compression during the transfer. This option compresses the data as it is copied over the network.
 
Copying over ssh

To use ssh to copy the files over the network, just add the --rsh option to the command line. Simply specify the ssh command line as shown in the example. Also, to specify another machine as a target, precede the directory target with a host name and a colon.

Example 3: rsync -vaz --rsh="ssh -l username" ~/bk targetHost:~/test
After typing the command line, you will be prompted for your password. After entering the password, the command executes and your files are copied. You can also set the ssh command using the RSYNC_RSH environment variable. You can also avoid entering the ssh password if you use ssh keys.
 
The --exclude Option

This option allows you to exclude certain files and directories from the copy process. You can exclude by specific names or by using wildcards.
Example 4: rsync -vaz --exclude=log/ --exclude=*.xml ~/bk targetHost:~/test
In this example, the log directory is excluded from the copy as well as any file with a .xml extension.

The --delete Option

This option deletes any files that exist in your target directories but that do not exist in the source directory struction. Using this option truly keeps your files synchronized. However, use this option with caution. It can delete a lot of stuff on the target machine if you aren't careful.

How to use DiskSpd to simulate Veeam Backup & Replication disk actions

This HOW-TO contains information on how to use Microsoft© DiskSpd to simulate Veeam Backup & Replication disk actions to measure disk pe...