Tech4Him – Technology with Integrity

A Christian technology chaos wrangler and his thoughts

Archive for the ‘General’ Category

Ubuntu 6.06 Server LTS – Adding support for SMP

Posted by admin On January - 8 - 2008

Now that we have had our server working well following our previous instructions, it is now time to tweak some more. Actually, many folks probably thinks this is more thank a tweak and really a necessity. I’d agree with that. Why? Well you just purchased a dual, quad core Xeon server to be fast. Fast is alot of things but certainly processing power is one of those key pieces.

Go to the shell prompt on your server and run the following command:

cat /proc/cpuinfo | grep ‘^processor’ | wc -l

Now, what number did you get back. Was it 1? Well the number you get back from that command is the number or processors the system currently sees. Yes, that’s right. In our example here, our server was only seeing a single core out of a possibility of 8 (dual, quad core, xeon processors). So you’re telling me that we are wasting 7/8 of our processing power? Essentially, YES!

Well don’t fear. There is a relatively simple way to fix this. Now, there are a few caveats but we’ll show you how we did it.

NOTE: If you compiled any source for any applications since your initial installation of Ubuntu, be prepared to re-compile. We are about to change the kernel and therefore your going to need to recompile against that new kernel.

From a shell prompt we need to be sure our repository information is up to date so…:

sudo apt-get update

Next, let’s get the 686 package which will allow our system to see more than the single processor as it does in the 386 version.

sudo apt-get install linux-686

Great! That was easy. You may have noticed that the installation made changes to the /boot/grub/menu.lst file. If you recalled from our previous article, this is the file that defines how grub will boot your system. With Ubuntu 6.06Server LTS and the PERC5/i controller in our box we had to make some modifications to that menu.lst file before. Well, unfortunately our work was just overwritten by the installation of the linux-686 package.

No problem, we’ll just update it again.

sudo vi /boot/grub/menu.lst

Now in this file towards the bottom are the boot menu options just like before. Change to "root" entries from something like hd(4,0) to hd(0,0). You are just changing that 4 to a 0 in each of the 4-6 menu option entries.

Next, the 686 kernel seems to correct the issue of how the raid array is detected and therefore named. Still in the menu.lst file, find the "kernel" entries for each menu option. Notice that there is something like root=/dev/sde1 in the line. Well, now the array is seen as sda not sde. So change all the sde1 pieces to sda1.

/boot/vmlinuz-2.6.15-29-686 root=/dev/sde1 ro quiet splash

is changed to

/boot/vmlinuz-2.6.15-29-686 root=/dev/sda1 ro quiet splash

Be sure you make those changes to all the entrie and then save your work.

Now all you have to do is reboot the server, but, be sure to do it form the console because you won’t have network connectivity when you reboot if you are on a Dell Poweredge 2950 like we are.

sudo shutdown -r now

Okay, after the reboot, log into your server at the console.

sudo /etc/init.d/networking restart

This should get your networking going again. There is an issue with the bnx2 / Broadcom driver in the 686 kernel that is odd but a simple restart of networking resolves the issue. This is how we came up with this temporary workaround until we find the real solution.

sudo vi /etc/init.d/rc

Now in this rc file, near the end add the following line which will force the networking restart after reboot.

# temporary resolution to networking issue under 686 kernel
/etc/init.d/networking restart

Then save your file.

That’s it. Now try that processor count again. Hmmmm…. we actually see 8 processors now. Now we are being good stewards of what has been provided.

Popularity: 5% [?]

Force a Frontpage Node in Drupal

Posted by admin On December - 28 - 2007

This tip is handy if you have a need to specify a new frontpage node on your Drupal site and cannot get into the admin pages to change it. You can specify a number of configuration items in the settings.php file for your site.

In this case your are going to set the frontpage configuration. Near the bottom of your settings.php file is a section that is commented our by default for overriding configuration settings. Just add the following code below and change ‘node/1′ to whatever node you want for your new frontpage.

$conf = array ( ’site_frontpage’ => ‘node/1′,);


One big thing not to forget is the comma after the last setting statement.

We ran into this the other day helping somone on #drupal-support irc who had a multisite Drupal setup with subdirectories. He had removed the panels module and the site went belly up.

Blessings

Popularity: 7% [?]

By default, the Ubuntu installer has configured our system to get
its IP address and other network settings via DHCP. This is not what we
want so we have to change the server to have a static IP address. Edit /etc/network/interfaces and adjust it per your requirements. For this example we are using an IP address of 192.168.167.210 for this server.


Now,
there are a myriad of examples on the web and I am including a few
links to them for convenience sake in case they explain this better.
(they probably do) ;o)

vi /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto lo

iface lo net loopback

# The primary network interface

auto eth0

iface eth0 net static

address 192.168.167.210

netmask 255.255.255.0

network 192.168.167.0

broadcast 192.168.167.255

gateway 192.168.167.1

Now, restart your network:

/etc/init.d/networking restart

Then edit /etc/hosts.
We are telling the server what names it is going to answer to and to
which IP addresses those names belong. This is somewhat analogous to
the Windows hosts file if you are familiar with Windows:

vi /etc/hosts

127.0.0.1 localhost.localdomain localhost

192.168.0.100 server1.example.com server1

# The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

ff02::3 ip6-allhosts

Now execute the following commands.

hostname
hostname -f

The results from both commands should show server1.example.com. If they do not, reboot the system:

shutdown -r now

Log back into your server and try the hostname commands again.

hostname
hostname -f

They should show server1.example.com.

Now for those links I promised:

Link 1 on cyberciti.biz
Link 2 on howtogeek.com
Link 3 on howtoforge.com

Blessings

Popularity: 5% [?]

Well, victory is ours….sort of. See our previous post.

The
long and short of it is that we ended up just removing that Promise
FastTrak TX2 controller card and placed the two drive on the built-in
motherboard controllers. Since we have some other devices we
piggybacked both drives from the same controller which is not going to
be as performance minded as put each drive on a different controller
but for this application it is fine.

I thought that I would post
some articles describing in more detail our steps and experiences in
case it may be of use to others. So here we go.

Ubuntu 6.06 Server LTS Installation with Software RAID Support

  1. Boot from the Ubuntu 6.06 LTS Bootable CD (available from here)
  2. Choose the Start Server Install Option
  3. Follow and answer the standard prompts and entries until you get to the partitioning section
  4. This
    is where we did some research and manually created 4 partitions, 2 on
    each drive in order to create two RAID 1 arrays. The best explanation
    of this that we have found thus far is here.
    We deviated a bit from this article however. Our primary difference was
    in the changing of the partition sizes with the largest being the root
    filesystem and the smaller being the swap space.

    1. So
      here is our new physical partition view. (Be sure the root "/" mount
      points are set to "bootable" or you won’t be able to boot into your
      newly install Ubuntu Server.)

      Drive Partition Type Mounted on Size
      Drive0 /dev/hda1 Primary / 70GB
      /dev/hda2 Primary (swap area) 10 GB
      Drive1 /dev/hdb1 Primary / 70 GB
      /dev/hdb2 Primary (swap area) 10 GB
    2. We then used the above physical partitions to create these two Multidisk devices (arrays).
      RAID device Type Mounted on Size Members
      /dev/md0 RAID1
      mirror
      / 70 GB /dev/hda1
      /dev/hdb1
      /dev/md1 RAID1
      mirror
      (swap) 10 GB /dev/hda2
      /dev/hdb2
    3. Once
      you have the partition looking like the above, choose that you are
      finished and choose "yes" to the warning about writing these changes to
      the disks.
  5. Continue finishing out standard server installation prompts
  6. If
    you want to be sure you can boot from either of the two drives in the
    array (like if one goes out which is why you went to all this trouble
    to begin with) then you need to follow the step to get the grub loader
    install on the second disk. This is in the same article under the "Make
    Every Drive Bootable Section".

    1. Essentially boot the server CD again and choose "Rescue a broken system"
    2. Follow the system prompts until you see the "Device to use as root filesystem" prompt. STOP!
    3. Press
      Alt-F2 to go to the second console (TTY2) and hit enter. Here you are
      going to enter the follow command to mount the second drive

      mount /dev/md0 /mnt
      chroot /mnt
      grub
      device (hd0) /dev/sda
      root (hd0,0)
      setup (hd0)
      device (hd1) /dev/sdb
      root (hd1,0)
      setup (hd1)
      quit

    4. Now
      reboot your server. Don’t know how??? "shutdown -r now" (This tells the
      system shutdown. The "-r" says restart after the shutdown and the "now"
      means do it now instead of in 10 minutes or whatever else you might
      want to include there.)
  7. Login as administrator or whatever you choose for the username and password in the installation sequence.
  8. Perform
    "sudo apt-get update" to have apt-get update the list of packages and
    the "sudo apt-get upgrade" to ensure latest versions of all packages
    are applied.
  9. Finally I always like
    to install an SSH server right away so I can finish the system
    configuration form the comfort of my desk, a couch or some other comfy
    place. So run the "sudo apt-get install openssh-server" command.

A big thanks to the Ubuntu community and especially to Derrick Webber whose post was the basis for our successful installation.

Now
in our future new production hardware we will further distribute the
"/" root, "/var" and "/usr" mount points to individual partitions.

Blessings

Popularity: 10% [?]

Whew….this is a bit of an enigma right now. I know I read about some potential issues with this controller card but it is what we have to use. I thought those issue were primarily around driver support and bit write issues. What I did not expect was the difficulty in installing Ubuntu 6.06 LTS onto a mirror array created with the controller. Perhaps this is a symptom of the “poor driver support” issue?



Others seem to have similar issues. This one with no response as of today. This one without the expertise to resolve. A hopeful possibility is this one which I will try next if need be.



When the installer gets to the partitioner section instead of seeing a single array to install on as I would expect, it see’s the two physical drives. Of course that isn’t really going to work now is it. (or….maybe I am missing something fundamental with Linux and hardware raid controllers?)



So, now I am starting from scratch since this is a temporary production rebuild. As I write this I deleted the old array, created a new mirror RAID 1 array from the two disks, select one as the primary image and the controller is copying the image. Once that finishes, I will attempt to do one more installation of Ubuntu Server 6.06 LTS and see what happens.



If anyone has any ideas or thoughts, I welcome them.



UPDATE:



Finally realized that this discontinued controller is the cause of the issue and since we have to use the hardware available for this project, decided to go with software raid. Really not much performance difference since the controller wasn’t offloading the array needs anyhow.



Found this post describing how to perform the manually partitioning for the installation although I disagree with a 10 GB root volume and a 100+ GB swap volume. So I flipped them around as we are going to be using this machine as a VMWare Server host. (Small installation).



Worked like a charm and I’m ready to start updating the system and getting the VMWare server installation cooking. We’ve already done this numerous times in our test environment. Too bad we didn’t have this controller card in the test environment to had spotted this issue sooner. No harm, no foul. Time to move on.



Blessings!

Popularity: 30% [?]

VMWare Server 2.0 Beta

Posted by admin On November - 14 - 2007

Funny enough, I got an email from VMWare inviting us to participate in the VMWare Server 2.0 Beta.
This was great news to me that they are continuing to do development on
the free VMWare Server product. I really expected them to push more of
us to VM Infrastructure lines. Looks like there is an early 2008
release goal to production of 2.0.

Kudos to VMWare for this as
it is a great way to help folks like my organization to get started
with virtualization at low cost (free) for the Software and as we grow
we can grow in to the additional features of VM Infrastructure.

Straight from the site, some of the new features include:

  • Web-based management interface:
    A new Web-based user interface provides a simple, flexible, intuitive
    and productive way for you to manage your virtual machines.
  • Expanded operating system support:
    VMware Server now supports Windows Vista Business Edition and Ultimate
    Edition (guest only), Windows Server 2008 (Longhorn Server Beta 3), Red
    Hat Enterprise Linux 5 and Ubuntu 7.1, among others.
  • Greater scalability:
    Take full advantage of high-end hardware with support for up to 8GB of
    RAM per virtual machine, up to two virtual SMP (vSMP) processors and up
    to 64 virtual machines per host.
  • 64-bit guest operating system support:
    Run high-performance operating systems in virtual machines with support
    for Intel EM64T VT-enabled processors and AMD64 processors with
    segmentation support.
  • Support for VIX API 1.2: This feature provides a programming interface for automating virtual machine and guest operations.
  • Support for Virtual Machine Interface (VMI):
    This feature enables transparent paravirtualization, in which a single
    binary version of the operating system can run either on native
    hardware or in paravirtualized mode.
  • Support for USB 2.0 devices: Transfer data at faster data rates from USB 2.0 devices.

Exciting stuff….

Popularity: 4% [?]

Adventures in Virtualization

Posted by admin On August - 9 - 2007

Whew, have things been busy. But how great it is to be busy doing God’s work!

Well, working with a non-profit, we are always looking for ways to effectively use
the resources were are given. Those resources come as assets,
partnerships, financial investments and personnel. Since we want to
make the best use of the resources, we get the opportunity to look at
things from a different persective. Now that does not always mean
finding free or "cheap", despite what anyone thinks. When it comes to
technology, nothing, I repeat, nothing is free!

So, one of the
projects we are working on involves making a decision for the
organization on a reporting and eventually, an ETL platform.(More on
the details of that project in another post) As such, we really are
going to need to have another server for development/testing and for
production use. Interestingly, one of the existing servers, a Dell
Poweredge 6600, has room for another processor and lots more memory.
Hmmmm….that got us thinking. What about virtualization.

Now, I
have used virtualization technology in test environments a bit over the
last few years but have not kept up with developments in the
marketplace. Well, I was certainly pleased with what I found.

I
spent the last 9 years in a Microsoft shop and that was after a
VAX/VMS, HP-UX, AIX shop. So, I am not the biggest fan of the Microsoft
Server platform but also not a big opponent either. I think the
different O/Ses have their places. However, I can’t help but go back to
a Unix or Linux base as a workhorse. I was pleased as punch to learn
that the VMWare Server is now offered as a free virtualization platform.

So, I’ll spare you the gory details on not using Microsoft Virtual Server 2005
and move on to where we are at. Being a small IT shop, we don’t have a
data center chock full of servers that would need to be centrally
managed so the free VMWare Server product is fine. If you need this
kind of data center management for virtual environments, take a look at
the not-so-free Virtualization management platform from VMWare.

As part of my testing, er… playing, I loaded VMware Server on my Dell D520 Laptop
with 1GB RAM. My base O/S on the laptop is usually Windows XP Pro SP 2.
Install was a snap of the server. I quickly created a new virtual
machine for a test Windows XP Pro SP2 machine since I am constantly
messing my base O/S up by loading and testing lots of software. After
the first reboot of the VM, I logged into the machine and installed the
VMWare Tools. This is an important steps as it significantly improves
display and mouse performance as well as other under the hood
improvements. (Don’t forget this step.)

I typically use a bridged
network setup as it allows the VM direct network access via the host’s
NIC. Quick, easy and maintainable. Really, everything works the same in
the VM. The only quickly noticed difference is that instead of the
three finger salute to login (Ctl-Alt-Del) you use Ctl-Alt-Ins. Now, I
wanted to have a way to always get back to this clean install of the VM
operating system for new tests. That is where the snapshot feature
shines.

First thing to remember is that before you take the
snapshot of the guest O/S, you MUST defragment the guest O/S virtual
drive. You can do this either with the defrag tools in the guest O/S or
from the VMWare Server console. You do this by shutting down the guest
O/S. Then edit the VM setting and choose the Defragment option under
the hard disk options.

Once done with the defragmentation, take your
snapshot. This snapshot can be used to move the VM back to the exact
state it was in at the time of the snapshot. According to the
documentation, if you take the snapshot without defragmenting the
virtual disk first, you lose the ability to effectively defragment the
virtual drive. Keep in mind that the virtual disk is actually just a
file or files on the host operating system. Therefore, you will also
want to ensure the host operating system keeps it’s physical drives
free from excessive fragmentation.

Now, I certainly could not stop at Windows XP Pro. Hehe…. So, next on the list was a virtual Ubuntu Server 6.06 LTS and an installation of Ubuntu Ultimate.
Again, no problems. Worked like a champ. By the way, I loaded the
Ubuntu Ultimate by telling the virtual machine definition that the
virtual CD-Rom drive should actually point to and .ISO image. Again,
worked a treat.

Fair enough, but since Windows operating system can
be a bit tempermental and subject to security issues, what about using
a Linux operating system as the host to then run the Windows servers as
virtual machines. So, that’s what we tried. We loaded Ubuntu Server
6.06 LTS onto an older Dell desktop. So, we had a nice Linux server
running which we quickly loaded the VMWare Server onto. I chose not to
install web base MUI and instead to use the existing VMWare Server
Console on my laptop to remotely connect and manage the VMWare Server
on the Ubuntu server.

Sure enough, I slapped a Windows 2003
Server R2 installation CD into the drive on the Ubuntu server and went
back to my office. I fired up the VMWare Server console and create the
VM definition. Then I booted the VM and the CD-ROM on the Ubuntu server
came to life runing the Windows 2003 Server setup. Less than an hour
later, I have a fully functioning Windows server running as a VM on a
machine with Ubuntu server as the host operating system. Sweeeeet!

Now
I am testing the Linux client for Reptrospect which is what we use for
backups. I need to get comfortable with disaster recovery functionality
for the host and most importantly, the VM’s. One of the nice things
about the VM’s is that if I have all the files for each VM, I can move
then to another server, even with a different host O/S and start them
up. They’ll keep chuggin along. Nice!

Popularity: 4% [?]

Okay, first, don’t ask why I would want to load Gnome Desktop onto a server installation. I just did. ;o)

If you wanted to do this it is really pretty simple. Just know that it adds quite a bit to your "server" installation.

sudo apt-get install ubuntu-desktop
sudo apt-get install gdm
sudo /etc/init.d/gdm start
sudo dpkg-reconfigure xserver-xorg

Just a reminder that ubuntu-desktop is really an alias for a number of packages.

Voila. Have fun.

P.S. Want a slimmed down gnome desktop? This should get you started: http://doc.gwos.org/index.php/LightweightGnome

Popularity: 3% [?]