Archive

Archive for January, 2011

Cloning linux servers, try clonezilla

January 31, 2011 Leave a comment

What is Clonezilla?

You’re probably familiar with the popular proprietary commercial package Norton Ghost®. The problem with these kind of software packages is that it takes a lot of time to massively clone systems to many computers. You’ve probably also heard of Symantec’s solution to this problem, Symantec Ghost Corporate Edition® with multicasting. Well, now there is an OpenSource clone system (OCS) solution called Clonezilla with unicasting and multicasting!
Clonezilla, based on DRBL, Partclone and udpcast, allows you to do bare metal backup and recovery. Two types of Clonezilla are available, Clonezilla live and Clonezilla SE (server edition). Clonezilla live is suitable for single machine backup and restore. While Clonezilla SE is for massive deployment, it can clone many (40 plus!) computers simultaneously. Clonezilla saves and restores only used blocks in the harddisk. This increases the clone efficiency. At the NCHC’s Classroom C, Clonezilla SE was used to clone 41 computers simultaneously. It took only about 10 minutes to clone a 5.6 GBytes system image to all 41 computers via multicasting!

http://clonezilla.org/

Advertisements
Categories: Linux, Redhat

Type to one ssh session replicate to all xterms

January 31, 2011 Leave a comment

Useful utility to admins that work on more than one server, but have to execute the same steps/commands.

ClusterSSH controls a number of xterm windows via a single graphical console window to allow commands to be interactively run on multiple servers over an ssh connection.

http://sourceforge.net/projects/clusterssh/

Categories: Linux

Dynamically scan your LUNs for new hosts without reboot

January 29, 2011 1 comment

echo “- – -” > /sys/class/scsi_host/<host listings>/scan

 <host listings> refer to the scsi host instances (for the hbas). if you do a listing of the scsi_host directory, you will see something similar to the following:
[root@r08u6 scsi_host]# ll
total 0
drwxr-xr-x 2 root root 0 Aug 4 15:52 host0
drwxr-xr-x 2 root root 0 Aug 4 15:52 host1
drwxr-xr-x 2 root root 0 Aug 4 15:52 host2

as you can see, on this server it shows 3 instances of scsi host entries. by using the echo command above on each of these directory’s “scan” files it will force a re-read of the specific scsi bus.

This procedure has been tested on RHEL5 successfully without interruption to the system.

If you have PowerPath installed on the system, run “powermt config” to look for the new devices.

For RHEL 3:
echo “scsi scan-new-devices” > /proc/scsi/scsi

Categories: Linux, Redhat

To manually enable/disable automatic statistics collection

January 5, 2011 Leave a comment

Generally, it would not be a good idea to shut this function off, but if, for example, you are running tests and don’t want this process to interfere with performance, here’s how you would do it.

SQL> select client_name,status,consumer_group,mean_job_duration from dba_autotask_client;

CLIENT_NAME                                                      STATUS
—————————————————————- ——–
CONSUMER_GROUP
——————————
MEAN_JOB_DURATION
—————————————————————————
auto optimizer stats collection                                  DISABLED
ORA$AUTOTASK_STATS_GROUP
+000000000 00:01:24.582222222

auto space advisor                                               ENABLED
ORA$AUTOTASK_SPACE_GROUP
+000000000 00:00:28.309734513

CLIENT_NAME                                                      STATUS
—————————————————————- ——–
CONSUMER_GROUP
——————————
MEAN_JOB_DURATION
—————————————————————————

sql tuning advisor                                               ENABLED
ORA$AUTOTASK_SQL_GROUP
+000000000 00:00:48.896226415
3 rows selected.

To enable:
SQL> begin
  dbms_auto_task_admin.enable(client_name => ‘auto optimizer stats collection’,
  operation => NULL, window_name => NULL);
  END;
  /

To disable:
 begin
  dbms_auto_task_admin.disable(client_name => ‘auto optimizer stats collection’,
  operation => NULL, window_name => NULL);
  END;
  /

select client_name,status,consumer_group,mean_job_duration from dba_autotask_client;

Categories: Oracle

RHEL 5 bonding configuration

January 3, 2011 2 comments

To create interface bonding on a RHEL server, first pick the 2 or more interfaces you’d like to use.  For this example, I’ve chosen eth0 and eth1 an active/passive as the configuration.  Active/active is not recommended at this point, certain studies (which I can cite at the moment) have shown packets can come out of order and the assembly of them takes more time and processing than active/passive.

Create 3 files /etc/sysconfig/network-scripts/ifcfg-bond0:
DEVICE=bond0
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
BROADCAST=172.25.111.255
NETWORK=172.25.111.0
NETMASK=255.255.255.0
GATEWAY=172.25.111.254
IPADDR=172.25.111.33

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:21:9B:A4:49:65
USERCTL=no
ONBOOT=no
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=00:21:9B:A4:49:67
USERCTL=no
ONBOOT=no
BOOTPROTO=none
MASTER=bond0
SLAVE=yes

Add the following to /etc/modprobe.conf:
alias bond0 bonding
options bonding miimon=100 mode=active-backup

At this point, you can restart your network services or reboot.
#service network restart

To look at stats:
#ifconfig -a
#netstat -in
#cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:21:9b:a4:49:65

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:21:9b:a4:49:67

Categories: Linux, Redhat, Uncategorized