SQUASH

Tom Phillips   -   An Independent Computer Consultant

Solving problems with computers since 1972

A short introductory story to Linux and some learned “tricks”.

I was a “never ever been there” to Unix/Linux, and our on-board employee had limited experience, so we hired some experts to help us through our Red Hat and Universe installs.

The first sign of trouble was watching these Linux people copy files - giving them names like “fstab.bak” and “config.sav”.   When I asked what they were doing, I was answered as though I was an idiot for not wanting “backups”.   Deferring to the experts, I let the first day pass.   I did not know what software configuration management planet they were from, but... they had the experience.

The next morning I asked our in-house person to create two primary directories on one of our external shared devices.

As we were working on server ... (we can call it “d”), we created

       dori30 – for “d”, ori for original and 30 for release 3.0 of Linux

and dmod30 – for “d”, mod for modifications and 30 for ......

You get the idea.

Now if we were going to modify /etc/fstab, then the first thing that we did was:

     cd /mnt/dori30

     mkdir etc

     chmod 777 etc

     cd /mnt/dmod30

     mkdir etc

     chmod 777 etc

     cd /etc

     cp fstab /mnt/dori30/etc/

     ... modify fstab

     cp fstab /mnt/dmod30/etc/

As you can see, by creating a dual directory structure to house the before and latest modification, we have a complete record of all changes to our system.   If we ever need to perform a complete rebuild – well – piece of cake.   In addition using some very good compare software we have a detailed record of the exact changes that were made.

I need to back up the story to where we created the external directories.   We were going to need to put dori30 and dmod30 mounts in fstab, and create like named directories in /mnt

As Carl Reinhart (our in-house person and the best “find it” guy I ever encountered) was creating the directories in /mnt he did something very noteworthy:

    cd /mnt

    mkdir dmod30

    cd dmod30

    touch not_here_if_mounted

Wow!

Now I had a file on the primary mount point that I could test to determine if in fact the external devices were available and things were ok.   If I ever got a successful open on “not_here_if_mounted”, then I could politely let the application software know that certain functions were not available, and more importantly, why they weren’t.

Now as we started over, (yes - the first day was a total washout), we used this new external backup directory structure to save the originals and modifications.   Obviously the directory structure has been vastly expanded from my example above.   I cannot count the number of times where having the original file and our changes in a common place has helped to answer all sort of queries, as well as to help build other machines.   Locating them in the exact directory spot where they reside on a production server is self documenting.

Oh yes - we use "beyond compare" - a Windows program for illustrating the changes made.   http://www.scootersoftware.com/

Maybe this isn't the best configuration management solution, but without a "big brother" software system monitoring all changes to system files and directories, it’s a world much better then "fstab.bak".

 

          Page last updated:   February 14, 2008                   

Carl Reinhart and "the author"