Archive for April, 2010

How to find the scsi id of any device on linux

#scsi_id -g -u -s /block/sdx

If it’s a vm
#cat /proc/scsi/scsi

if it’s a /dev/cciss device(HP SAS) then use

#cciss_id /dev/cciss/cXdX

-bb

Enabling Round Robin and MPIO on vSphere4

The purpose of this article is explain how to enable round robin and multipathing on an ESXi4 cluster.

Our environment consists of:

  • 48 HP BL460cG1 servers running ESXi4 embedded with qlogic fc mezzanine cards(2 hba’s/host)
  • 3 C7000 Chassis with VC-Enet modules and Cisco MDS9124 switches
  • SAN fabric connected to an HP EVA 8400

These instructions are primarily from HP and are SPECIFICALLY FOR THE EVA!  Check with your SAN vendor for their recommendations.  The shared storage in our environment is all fibre channel, so these instructions will most likely not work on iSCSI or shared storage over other protocols.  This article assumes you have two hba’s per host as well.  Also make sure that your SAN or LUN’s are setup for an active/active configuration otherwise you’ll have problems with LUN trespassing.  Most newer SAN’s are active/active by default, but some SAN’s such as some of the older EMC CX series are setup for active/passive and you have to use powerpath or a vendor specific product in order to setup true multi-pathing on a host.  Perform these steps at your own risk! If you’re not comfortable with any part of this then do some research, reference the sources at the bottom of the page, or call VMWare support before you go ahead with this. Now that we’ve got the disclaimers out of the way, let’s get down to the good stuff.  The whole process consists of approximately 3 steps: enabling round robin on all LUN’s on all hosts in the cluster, setting each host to use both preferred and non-preferred paths, and finally telling each host how many iops before it switches paths, utilzing both paths more effectively and helping to spread the load across both controllers on your SAN.

Enabling Round Robin
Set multi-path policy to Round Robin on all LUN’s on all hosts in a cluster using PowerCLI:

Get-VMHost -Location <Clustername>|Get-ScsiLun -LunType "disk"|where {$_.MultipathPolicy –ne "RoundRobin"}|Set-ScsiLun -MultipathPolicy "RoundRobin"

Check to see if it took:

Get-VMHost -Location <Clustername>|Get-ScsiLun

The following steps are run in the “unsupported console”.  Google to see how to enable ssh on each host.

Set the default Path Selection Policy(PSP) to Round Robin and SATP to VMW_SATP_ALUA on each host

esxcli nmp satp setdefaultpsp --satp VMW_SATP_ALUA --psp VMW_PSP_RR

Set the LUN’s to use preferred and non-preferred paths
Login to each host and type in the following command:

for i in `ls /vmfs/devices/disks/ | grep naa.600` ; do esxcli nmp roundrobin setconfig --useANO 1 --device $i ;done

You might get some errors, but run this command to see if it took:

esxcli nmp device list |grep ANO=

Set amount of iops before it switches paths

for i in `ls /vmfs/devices/disks/ | grep naa.600` ; do esxcli nmp roundrobin setconfig --type "iops" --iops=1 --device $i ;done

By default this is set to 1000, and you’ll have to write a script that runs on startup as the setting doesn’t keep over a reboot. In fact it seems that if you touch the iops= setting, then after a reboot it’s replaced with a random number.
Check the sources below for more detailed information, especially the top link which is the HP “Official” best practices document for this scenario.

-bb

Sources:

Installing The Latest Deluge in Ubuntu 9.10 (Karmic Koala)

Torrent clients on Linux just don’t seem to stack up to uTorrent.  I’ve tried all of them  and deluge seems to be the most configurable and feature rich that I’ve found.  Yes I’ve tried transmission, ktorrent, rtorrent and several others I don’t care to recall.  My primary computer at home is a Linux Mint Helena 64-bit, which is basically just Karmic all gussied up.  Here’s how I installed the latest and greatest version of deluge (1.2.3).  Some of the trackers I use have banned the use of deluge releases prior to 1.2.1.  Deluge 1.1.9 is what is in Karmic’s repo’s by default so this was a problem.  I gleaned these instructions from https://launchpad.net/~deluge-team/+archive/ppa.  Commands are in italics.

Pretty simple really, just open a terminal and type in:

$sudo add-apt-repository ppa:deluge-team/ppa

adds the deluge ppa to your systems software sources

$sudo apt-get update

checks the repo’s for the latest versions of the software

$sudo apt-get install deluge

installs the latest deluge on to your computer (1.2.3 as of this post).

That’s it!  Happy Sharing!

-bb


Welcome!

Welcome to inbaudwetrust.com  This will be my technical blog where I document the trials and tribulations of my job as a Linux Systems Administrator for a large healthcare technology corporation.  I’ll use this as a personal blog as well, so really anything goes.

Topics will include but not be limited to:

RHEL, OEL, Oracle, VMWare, HP Blade Infrastructure Management, Ubuntu, Debian, Politics, Economics, Music and generally whatever else I feel like spouting off about.