mercoledì 19 settembre 2007

martedì 4 settembre 2007

Modificar il valore Queue depth nelle Qlogic 2342

In caso di problemi di performance sulle hba della qlogic vmware consiglia di aumentare il valore delle hba a 64. Per fare ciò bisonga appendere una configurazione per il caricamento del modulo qla2300_707.

1. Mettere in maintende mode il server
2. Da COS lanciare i seguenti comandi
# esxcfg-module -s ql2xmaxqdepth=64 qla2300_707
# esxcfg-boot -b
3. Verificare che nel file /etc/vmware/esx.conf ci siano le seguenti righe
/vmkmodule[0005]/enabled = "true"
/vmkmodule[0005]/module = "qla2300_707.o"
/vmkmodule[0005]/options = "ql2xmaxqdepth=64"
/vmkmodule[0005]/type = "fc"

4. reboot del server

Dopo il riavvio in /proc/vmware/scsi/vmhbaX/0:0 verificare il valore Queue Depth: 64. Inoltre in /var/log/vmkernel dovreste trovare delle entries
[root@esx02 root]# grep "Queue" /var/log/vmkernel
Sep 4 14:07:25 esx02 vmkernel: 0:00:00:24.462 cpu3:1033)LinSCSI: 689: Queue depth for device vmhba1:0:0 is 64
Sep 4 14:07:26 esx02 vmkernel: 0:00:00:24.464 cpu3:1033)LinSCSI: 689: Queue depth for device vmhba1:0:1 is 64

sabato 1 settembre 2007

Script powershell per vcb

Di seguito uno script per l'esportazione delle vm via san.
Questo script e' stato testato con esx 3.0.1 + vc 2.0.1 + CX 300. Lo script aggiunge e rimuove il server di backup (vcb proxy) dallo storage group dei server esx.

$myfqdn = "vcb-proxy.mydomain.com"
$VMsBck = "vm01", "vm02", "vm03"
$dirbkp = "E:\vcbackup"

$vc_server = "virtualcenter.mydomain.com"
$vc_user = "vcbackup"
$vc_passwd = "password"


# Emc Clariion conf
$emc_gname = "VMWare_Storage"
$SP_IP = "10.0.100.2"


$cmdbkp = "C:\Program Files\VMware\VMware Consolidated Backup Framework\vcbMounter.exe"

$cmdnavi= "C:\Program Files\EMC\Navisphere CLI\NaviCLI.exe"



$Date = get-date -Uformat %d-%m-%y

$SmtpServer = "mail.mydomain.com"
$From = "vcb@mydomain.com"
$To = "alert@mydomain.com"


&$cmdnavi -h $SP_IP storagegroup -connecthost -host $myfqdn -gname $emc_gname -o
if ($LASTEXITCODE -eq 0) {
$VMsBck | % {
get-date |out-file $dirbkp\$_-$Date.log
&$cmdbkp -h $vc_server -a name:$_ -r $dirbkp\$_-$Date -u $vc_user -p $vc_passwd -t fullvm -m san -L 6 | out-file $dirbkp\$_-$Date.log
if ($LASTEXITCODE -eq 1) {
$msg = new-object Net.Mail.MailMessage
$att = new-object Net.Mail.Attachment("$dirbkp\$_-$Date.log")
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = $From
$msg.To.Add($To)
$msg.Subject = "Error VM backup -- $_"
$msg.Body = gc $dirbkp\$_-$Date.log | findstr error
$msg.Attachments.Add($att)
$smtp.Send($msg)
}
else {
echo "Backup VM $_ OK" >> $dirbkp\$_-$Date.log
}
}
}
else {
$msg = new-object Net.Mail.MailMessage
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = $From
$msg.To.Add($To)
$msg.Subject = "Problem assign $myfqdn in storage group $emc_gname"
$msg.Body = "Problem assign $myfqdn in storage group $emc_gname"
$smtp.Send($msg)
}


&$cmdnavi -h $SP_IP storagegroup -disconnecthost -host $myfqdn -gname $emc_gname -o
if ($LASTEXITCODE -eq 0) {
echo OK | out-null
}
else {
$msg = new-object Net.Mail.MailMessage
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = $From
$msg.To.Add($To)
$msg.Subject = "Problem removing $myfqdn from storage group $emc_gname"
$msg.Body = "Problem removing $myfqdn from storage group $emc_gname"
$smtp.Send($msg)
}