Categories
Linux

FOG: Deleting all current active tasks

FOG is “a free computer cloning solution” found at http://www.fogproject.org/. If your a seasoned user you will no doubt have groups setup so you may run commands on multiple machine without loading each one individually. In my scenario we have 1000 machines that need to be imaged, easy, I just created a group with those particular machines (luckily most computers will have a common part of their MAC address so I could search for machines based on manufacturer). Once the group was created I then setup a task for that group to deploy an image.

OK, whoops, this is when you realise that the machines has the wrong image id assigned to them. Easy you think, you created the task as a group you can just as easily delete the active task as a group. No such luck here, what FOG will do to a group of computers is simply setup an individual task for each and every machine in the group. So your only option now is to click delete on each active task, now multiply this out to 1000 machines you have an annoying problem.

There is a simple solution, although a word of warning here “PLEASE MAKE SURE YOU HAVE A BACKUP”. All the tasks are contained within the “tasks” table within MySQL. So if you feel comfortable crack open a console connection and open up a console to MySQL.

root@fog:/# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or g.
Server version: 5.0.67-0ubuntu6.1 (Ubuntu)

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

mysql> use fog;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> delete from tasks where taskState = 0;
Query OK, 8 rows affected (0.23 sec)

mysql>

This will delete all the active tasks running on the fog server. However the command files will still exist in the TFTPROOT folder. Exit out from MySQL and change directory into your TFTPROOT folder. Once inside change into the pxelinux.cfg folder.

You will notice several files in this directory, these are the files that control what a machine will do once it is PXE booted. To delete the command files you ONLY have to delete the files starting with “01-“, this is import as the other files will tell the machines what to do when they don’t have any active tasks.

root@fog:/tftpboot/pxelinux.cfg# rm 01-*

This will have completely removed all the active tasks.

Categories
OpenSolaris Sys Admin

Updated snapadm.pl file for ZFS Snapshots

In my post OpenSolaris Backup Solution with Rsync and ZFS Snapshots I provided a link to a script from Sun – snapadm.pl. I found a bug where if you were using the recursive function then the old snapshots would never be destroyed as they were incorrectly named.

I have updated the snapadm.pl file contained in my post and have also provided a download link here.

Download:

Read on for more details:

Categories
OpenSolaris Sys Admin

OpenSolaris Backup Solution with Rsync and ZFS Snapshots

I have recently been forced to learn how to admin an OpenSolaris machine with ZFS filesystems. After doing some reading on ZFS, I realised how using snapshots with an rsync server would make an excellent backup solution.

Using several scripts to control rsync and the snapshots has allowed me to setup a system that has data retention periods applied and only uses the space on disk required to keep the changed files. Cloning a ZFS snapshot from a week ago (or even six months ago) allows you to create a synthetic full backup from the point in time the backup was taken.

Categories
Offtopic

EPIC FAIL – Winner of the Hottest 100 of 2009 leaked

And the winner of the Hottest 100 of 2009 is….. well you need to look at the picture if you really want to know.

I’m a little bit sad that I saw this. Australia day is always about listening all day to find out what hits number one (then being outraged when it isn’t a song you like, having said that I like this song)

BTW i take no credit for the image or finding the leak, I am just sharing it, original at http://i49.tinypic.com/ab2zrk.jpg

Categories
Exchange Sys Admin Windows

Exchange System Manager Tools on Windows 7 – The Easy Way

Since my migration to Windows 7 there have still been a few things missing that would be nice to have. One of those is the Exchange System Manager tools. There are ways and methods out there to getting this to work but most will involve uninstalling outlook and reinstalling after you have installed ESM tools.

I have been waiting for the ESM tools for Exchange 2010 to hopefully work with Exchange 2003 but that hasn’t happened either. Although I did find a really quick and easy solution this morning after reading the following posts on TechNet (Exchange System Manager for exchange 2003)

You will need to download the Exchange System Manager for Windows Vista then use something like WinRAR to extract the contents.

You will also need to make sure you already have the RSAT tools installed (Remote Server Admin Tools)

Finally open up a Command Prompt as Administrator. Browse to the directory that contains the ESMVISTA.MSI file. Run the following:

ESMVISTA.MSI /q

Once this is done you should be able to open the “Active Directory and Computers” and edit an Exchange User with all the required email tabs.