Create a LVM Snapshot partition

I’m modifing my Groupwise backup script to make use of LVM snapshot so the downtime off my Groupwise system is reduced. Like many other, I prefer a off-line backup of my Groupwise system.

The scripts is very simple:

  • Groupwise is shutdown
  • TAR makes a backup of my Groupwise directory including all Groupwise config files. The filename of the TAR file is extended with a date of the backup.
  • Groupwise is started
  • Backup file is moved to a NFS share on a different server and checked for errors
  • Backupfile older than 14 day’s are removed

The disadvantages off this script is that the bigger the Groupwise database gets, the longer it’s down!

So by making use of LVM snapshots I hope to reduce the down time.

So how to create a LVM snapshot? First we’re going to create the LVM volume for Groupwise.
First we have to create a LVM partition. I’m going to use fdisk for this:

# fdisk /dev/sdb
Press n for a new partition
Press P for a Primary partition
Press 1 for the first partition
Give the first block and the last block for the partition
Press t in the main menu to change the partition’ system id.
Give 8e for LVM
Press w to write the partition table to disk

Ok,  now we have a empty LVM partition. Now where going to create a LVM Physical Volume.

# pvcreate /dev/sdb1
Physical volume “/dev/sdb1” successfully created

Create a LVM Volume Group called Groupwise.

# vgcreate VG_Groupwise /dev/sdb1
Volume Group “VG_Groupwise” succesfully created

You can check with vgdisplay to verify the volume group

Next where going to create a Logical Volume of 10G called LV_Groupwise

# lvcreate -L10G -nLV_Groupwise VG_Groupwise
Logical volume “LV_Groupwise” created

And final add a filesystem to the Logical Volume. I’m using EXT3 for Groupwise.

# mkfs.ext3 /dev/VG_Groupwise/LV_Groupwise

I will spare you the detail of the output.
If the filesytem is created you can mount the Logical Volume on a mount point. I’m using /grpwise.

# mount -t ext3 /dev/VG_Groupwise/LV_Groupwise /grpwise

To make sure that the LVM volume is mounted a boot time, make sure you add the line to /etc/fstab

Ok, now we have a working LVM volume. So how are we going to create a snapshot of this volume?
Make sure that the LVM Volume Group has some free space to keep track of the changes made to the original Volume Group will the snapshot is active. How much? This depends on the amount of changes to you Groupwise system.
The snapshot will be mounted on /gwbackup.

# lvcreate -L1G -s -n GWBackup /dev/VG_Groupwise/LV_Groupwise
Logical volume “GWBackup” created

# mount /dev/VG_Groupwise/GWBackup /gwbackup

Now, we can make a backup of the Groupwise database.
After the backup unmount the volume and remove the snaphot.

# umount /gwbackup

# lvremove /dev/VG_Groupwise/GWBackup
Logical Volume “GWBackup” removed

What really is nice that while the snapshot is active, you can use this snapshot for a Restore Area for your Groupwise system. Nice!

VMware View and Novell ZENworks Configuration Management presentation

Tomorrow I’m going to give a Novell ZENworks configuration Management 10 presentation voor de Training Center I often work for.
It’s a introduction session about the working of ZCM10 but it pretty much covers the whole architecture including some demo’s because I’m a piratical guy.

Then Thursday, it’s VMware View Time. This is a very exciting product from VMware.
This is also a introduction session about the working of VMware View.

If anyone want to have the presentation I made, leave a reply and I will send them to you. Note: They are in Dutch….. 😉 If there is enough intressed I will translate them to English.

VMware View Material

Maybey some of you noticed that the last weeks I haven’t posted as many blog as normal. This is because I’m evaluating VMware View. And this takes a lot of my time. You can find the material by clicking on the top on “VMware View” or on this link.

I’m evaluating VMware View to develop a presentation and a course for a Customer of mine.

So if you live in the Netherlands. Next week the presentation is in Eindhoven and in may it’s in Amsterdam.

Please provide me with comment so I can fine tune the material. Thanks!

Create a Database and DSN for Linked Clone Desktops

In this example where going to create a database instance and DSN for VMware View Composer on the standard database who is created during the installation of vCenter.

Add a linked clone desktop database instance to SQL Server 2005

Download and install SQL Server Management Studio Expres from Microsoft.

  1. On the vCenter host: Start | All Programs | Mircosoft SQL Server 2005 | SQL Server Management Studio Express and connect to the existing SQL Server instance.
  2. In the Object explorer pane, right-click the Database entry and select New Database.. The New Database dialog appears.
  3. Enter a name (Example: VMwareView) in the Database name field and click Ok.
  4. Exit

Add an ODBC datasource

  1. Select Start | Administrative Tools | Data Source (ODBC).
  2. Select the System DSN tab
  3. Click Add and select SQL Native Client from the list.
  4. Enter a name (Example: Vmware View Link Clones) and a brief description of the database. In the server field select your server (hostnamedatabasename) and click Next.
  5. Make sure the Connect to SQL Server to obtain default settings for the additional configuration options is selected.
  6. Select the authentication method:
    • With intergrated Windows authentication: Works only if the database is on the vCenter host)
    • With SQL Server authentication usering a login ID and password entered by the user: Use this option if you dabase is on a seperate server
  7. Enable the Change the default database to checkbox and select the database your earlier created and click Next.
  8. Click Finish and Ok.
  9. Close the ODBC Data Source Administrator.

Installing View Composer on vCenter

First some Theory!!

With the View Compsor on vCenter your able to create and deploy linked clone desktops.

A linked clone desktop are multiple dekstops create from one Baes VM, called the parent. The link is indirect because the first time one or more desktop clones are created, a uniquely identified copy of the parent VM (called a Replica) is created. All desktop clones are anchored directly to the replica and not to the parent VM.

The parent can be updated or replaced withoud directly affecting the linked clone desktops. You the parent can be Viewed a standonle VM.

Here a illistration of the relationships taken of the View Manager Administartion Guide.

PLAATJE!!!!

Because all linked clone desktops are connected to the one base image, you can centrilize your management on this desktop while maintaining a seamless user experience.
You can perform the following task:

  • resetting a system to default
  • balancing storage
  • install software
  • applying service packs

View Manager administrators can simultaneously update (or change) the operating systems of al linked clone desktops, install or update client applications, or modify the desktop hardare settings byr carrying out the activities on the Parent VM and then anchoring the linked clones to a new snapshot of this configuration. This action is called Desktop Recompositon.
A Desktop Refresh is returning the operating system data of each linked clone to its original state.

The initial disk usage of a linked clone virtual machine is far lower than that of a full clone because the operating system and client applications are derived from a Parent VM. This is accomplished through the use of delta disks and thin provisioning.

Every new desktop created in a standard (non-linked clone) automated pool is a duplicate of a base template. Therefore each clone uses as must disk space as its base template.

View Composer gratly reduces the physical storage overhead of linked clone desktop pools through use of delta disks. The disks growth deplends on factors such as workload, power-off policy pool type etc.
In the delta disk data is stored of the difference between its own operating system and the operating system of the Parent VM.

And now the installation of vCenter

  1. Run the View Composer service installation program, where is xxx is the build number of the executable file: VMware-viewcomposer-xxx.exe
    Note: If not detected Microsoft .NET 3.0 will be installed
  2. Accept the file agreement and click Next.
  3. Accept or change the destination folder path and click Next.
  4. Enter the name of the ODBC Data Source you have create and the username and password for this database.
  5. Accept the default SOAP port and click Next.
  6. Click install

Next where going to prepare a Parent VM. XXXXXXXXXXXXXXXXXXXX