Tuesday, 12 November 2013

Handy TSM queries

#query act log for media errors
q act begind=-1 search="media error"

#note the vol with error and query it to get its status
q libv cir-g-lib f=d

#check the volume out
checkout libv checkl=no rem=bulk

#query configured schedules
query sched f=d

#Removing a node from backup
q node f=d
q filespace
del filespace  *           (this removes all backup data for node1)
del filespace   nametype=fsid            (fsid is an integer for filesystem id)
remove node

#Renaming a node
rename node node2 node3 (this renames the node, but it keeps all the data)
(you'll need to logon to node2/3 and edit the dsm.opt/dsm.sys file etc and restart the scheduler to rename it on that side too).

#List filespaces that have not been backed up in the last 10 days for node
SELECT node_name,filespace_name, filespace_type,DATE(backup_end) as DATE FROM filespaces WHERE -node_name='' and DAYS(current_date)-DAYS(backup_end)>10

#show backups for the last 7 days
q event * * begind=-7 begint=12:00 endd=today node=

#show last backup completion date/time
q file  f=d

#show last successful backup end times for node
select END_TIME from summary where activity='BACKUP' and SUCCESSFUL='YES' and ENTITY=''

Wednesday, 7 August 2013

Simple straightforward upgrading of firmware on Dell servers

This has been testsed on Dell PowerEdge R720 running 64bit Centos 6.4

###Upgrade BIOS and firmware
###need to install 32bit libraries as the upgrade program itself is 32bit
yum install glibc.i686 libstdc++.i686 zlib.i686 libxml2.i686 compat-libstdc++.i686

wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash
yum install dell_ft_install
yum install $(bootstrap_firmware)
inventory_firmware
update_firmware
update_firmware –-yes