Thursday, May 24, 2007

Backing up 2: TSM

TSM is IBM's backup solution. It is a really nice setup when you have a large mixed network whose workstations and server you want to backup. As in many backup packages, we have two parts: server and client. All the important configuration details -- when to backup and what -- is stored in the server; the client does not know much about besides how to authenticate and such stuff. The best way to have it working is when the server contacts each client at the scheduled time and start pulling the files out. This way the server can keep a grip on the load while there is not much work to be done in the client.

In this installment we will talk about the client, which in TSMese is known as a node.

Client setup and install

First thing we need to do is to install the TSM client in the machine we want to backup. The client is freely available at the IBM website. You probably want to get the latest version. Also do notice they have clients for OSX, Linux, Windows, and Solaris, just to name a few operating systems. Installation varies with the client OS. In the case of Linux, you would download and install a few rpms, so you may want to make sure you know how to install an rpm. The proper thing to do is to read up on it, say, its manpage. The quick-and dirty way is to try something like this:

# rpm -i package.rpm

and hope it will work. YMMV. The ones you really really need to install are the ones for the TSM B/A client and the API. During install they may ask for a library they depend on; just go and get it and make it happy. If you install it in a Linux or Solaris box, the packages will be placed in /opt/tivoli/tsm/client/.

Once you have the packages installed, you need to configure the client. Before we continue, we are assuming that we are back in our favorite kitcar company, Cannelloni LLC, and want to backup the fileserver, obelix. The TSM server is So, we should by now have told the TSM server that obelix is a new node and associated a schedule with this node. The client configuration file is called dsm.sys and is usually found in /opt/tivoli/tsm/client/ba/bin. A typical dsm.sys file looks like something like this:

* IBM Tivoli Storage Manager                                           *
*                                                                      *
* Sample Client System Options file for UNIX (dsm.sys.smp)             *

*  This file contains the minimum options required to get started
*  using ITSM.  Copy dsm.sys.smp to dsm.sys.  In the dsm.sys file,
*  enter the appropriate values for each option listed below and
*  remove the leading asterisk (*) for each one.

*  If your client node communicates with multiple ITSM servers, be
*  sure to add a stanza, beginning with the SERVERNAME option, for
*  each additional server.


SErvername  tsm
   COMMmethod         TCPip
   TCPPort            1609
   passwordaccess     generate
   nodename           obelix
   managedservices    schedule
   memoryefficientbackup yes


  • SErvername Name of the TSM server
  • TCPServeraddress FQDN (or IP) for the TSM server. We would think that is a bit important so the client knows where to find the TSM server (and probably to know which servers it should accept commands from).
  • nodename The name of this node as defined in the TSM server. You can call it anything you want. It can be the FQDN of this machine or some silly name. TSM does not care while you use the right one. That also means you can backup to one machine and restore to another machine and TSM will not be any wiser; it only cares about authentication. Note: In this example, the true name of this machine is is a CNAME we created to make it easier to find it. Also, it sounds very official and functional.
  • COMMmethod Which protocols we will use to talk to the TSM server.
  • TCPPort This is the port the TSM client will open in obelix so the server can connect and talk to it. We may have to be sure the firewall in obelix has that port open (per COMMmethod, for tcp traffic only, not udp).
  • managedservices

    can be used to tell the client which tasks it should run. If you leave it blank, it will run a webserver that will allow others to connect to this machine to run the TSM client. By saying schedule we tell it only to run the scheduler.

Running the client

If this is the first time the tsm client is run in this machine, obelix, we need to do a full backup. That is done by issuing the command

# dsmc incr

and waiting for a while. A long while depending on how much stuff you have. To give you an idea, backing up some 300GB took about 8h in a connection that was supposed to be gigabit all the way between TSM client and server. So, either run this in the background and go dome something fun in the outside or use the time to read up on stuff you have been avoiding.

Once that is finished and there are no errors or funny business, we then start the normal incremental backup, which is done by typing

# dsmc sched &

Of course the next step would be to write a startup script to run that command whenever the node boots up.


Bare Metal Restore

Tuesday, May 01, 2007

Installing OSX 10.4 without DVD player

Ok, so have here a 12" ibook that did not come with a DVD player. To its left I have the OSX 10.4 DVDs. I have to install 10.4 in the iBook. How to make them play together? Good question. Well, Apple does have a tradeup program in which you send out your 10.4 DVDs, proof of purchase, and a check of $9.95 or thereabouts and, in a few weeks, you get a 10.4 CD set. Kinda nice but this is not what we are going to do. I do not want to have to wait for a few weeks to get this taken care of. I want it now!

How to do that? Well, let's go over the different steps I tried and figure out, hopefully, why they went boink.

Boot from the built-in CD drive

Well, that one did not work out. We knew that because that is the entire reason I am writing this. This ibook has a built-in CD player, not a DVD player. If this was a desktop, chances are you could easily swap the drives. That is what I did before with a B&W Powermac G3.

Boot from an external USB DVD drive

I have an external USB dual layer DVD burner; why not use it? Well, possibly the reason is that it does not work. At least it did not work for me. I tried it and it cheerfully ignored the drive. I tried booting and holding the key sequences to boot from the cd -- I think it thought I wanted to boot from its built-in drive -- and to ignore its internal drive. Either way it did not; it kept cheerfully trying to boot from the internal hard drive.

Boot the ibook at a firewire device attached to my other ibook.

Now we are getting fancy here. From experience, I know I can make my Cube and my 14" iBook G4 to, at boot, become external hard drives that can be then connected to another machine through the firewire port. Ok, the Cube books in FW mode but right now I am having a few problems seeing its hard drive, but that is another story and I am digressing here.

External firewire drive.

Since the 12" ibook does not want to be a firewire device, what if we give it a firewire device, say, another hard drive? Well, I happen to have a USB2/Firewire case and a 10GB ATA (IDE for you old school crowd) doing nothing. So, I put the drive in the case and connect it to my 14" ibook, not to the 12" ibook just yet. There is reason behind my madness, believe it or not. So, I then boot the 14" ibook from the OSX dvd (remember this machine has a dvd player) and tell it to install tiger on the 10GB HD. After that is done, I then connect the drive to the 12" ibook and boot it. As the internal drive had no OS (I deleted it some time ago) installed, it went and found the external drive and booted from it! It seems I am on the right track.

Now let's make life more interesting. Once again I booted my 14" ibook and then connected the external drive and inserted the osx dvd. I then unmounted but not removed the firewire drive. That is an important step. I made a point to write down the firewire drive was being seen as /dev/disk2s10 and the dvd player is /dev/disk3s3. Now, there is probably a clever more Mac-like way to do this next step. But I do not know how to do it. So, I did it the unix way: I started a terminal session and entered the following command:

Mireille:~ dalek$ dd if=/dev/disk3s3 of=/dev/disk2s10
11712744+0 records in
11712744+0 records out
5996924928 bytes transferred in 11166.592623 secs (537042 bytes/sec)
Mireille:~ dalek$

I then connected the drive to the 12" ibook and rebooted. It thought the external firewire hard drive was the OSX dvd disc 1 and started the installation process! What about the disc 2? Well, I just put it in the external DVD burner and connected it to an available usb port in the 12" ibook. It happily continued installing from it.

Problem solved!

One day, when I am really bored I will try to put a dvd player in the firewire case and see if it can boot like that. In the mean time, I finished getting that 12" ibook running tiger and that is all I wanted to do for now. Next time perhaps I will have a quiet talk with a certain cube...