It turns out that Dell PowerEdge servers (like the T310) with PERC S100 do not support RAID on Ubuntu. Bummer. But here is how I got Ubunutu software RAID 1 to work with my Dell PowerEdge T310, PERC S100 and Ubuntu 10.04 LTS…

The main trick was to turn re-initialize the PERC Controller to use non-raid:

  • As the Dell T310 boots, you will see a brief prompt from the Perc Controller telling you to press CTRL-R to configure it. Press CTRL-R.
  • Choose “Initialize Physical Disks”
  • Choose “Initialize to non-raid”
  • Select both disks and continue
  • NOTE: I went through this twice, and I found that before I could complete the steps above, I had to first choose “Delete Virtual Disks.” Again, I chose both disks and continued, and then I was able to complete the steps above.

Now you should be all set to set up the Ubuntu built-in software RAID 1. Here is a good guide to walk you through that:

https://help.ubuntu.com/10.04/serverguide/C/advanced-installation.html

{ 0 comments }

Sometimes when coding or debugging in PHP, it’s helpful to see the entire contents of an array. An easy way to do this is with the print_r command. To make it more readable, wrap it in <pre> tags.

For example, to see the contents of associative array $FormData:

<pre><?= print_r($FormData) ?></pre>

You’ll see output like this:

 Array
(
    [CustomerId] => 2
    [Rating] => 5
    [DateOfBirth] => 01/01/1970
    [FirstName] => John
    [LastName] => Smith
    [Address1] => 1 Main St
    [Address2] =>
    [City] => Santa Monica
    [State] => CA
    [PostalCode] => 90201
    [PhoneNumber] =>
)
1

{ 1 comment }

Setup WordPress or WPMU to make an atomic version switch — AND allow you to revert

apache

I have a new WordPress MU (WPMU) install and I am ready for my first upgrade. I couldn’t get automatic upgrade to work, and all the forums said: do it by hand manually. This is fine, but I didn’t want my site to be in flux with some old an some new files [...]

Read the full article →

How to keep the existing file attributes (owner, timestamp, etc) when copying files or directories

command line

When copying files and especially directories, sometimes you want to keep the existing file attributes. For example, you may likely want to keep the same owner, group, timestamp, etc.
You can keep the attributes by using the preserve argument. preserve=all will keep everything:

sudo cp -r –preserve=all original_directory_name copied_directory_name

You can use the -p version of [...]

Read the full article →

How to Check the Ubuntu Version.

command line

How do you know which version of Ubuntu you are running?

more /etc/issue

This will return something like this:

Ubuntu 8.04.3 LTS \n \l

Read the full article →

Configuring Log Rotation of Apache2 and Other Logs

apache

I went to check out my apache2 logs

ls /var/log/apache2/

and I noticed that they were being automatically rotated (access.log, access.log.1, etc.) and compressed with gzip (access.log.2.gz, etc.). This seems to be the default Ubuntu configuration. I wanted to make find out more, and I found this helpful article about Ubuntu logs, including Apache2 Log [...]

Read the full article →

How to rename a file or directory

command line

There is no rename function in Ubuntu Linux.
Instead, you simply move the file, giving it a new name. If you don’t actually mv it to another directory, then you have effectively renamed it:

mv file_name_original file_name_new

If you are trying to rename a directory, you need to use the -r recursive flag:

mv -r original_dir_name new_dir_name

Read the full article →

How to move or copy a directory

command line

I was trying to copy a directory, and I kept getting a cryptic error:

cp: omitting directory `/var/log’

The copy (cp) command only works for files. To copy a directory, you need to use the -r recursive flag:

cp -r /var/log backup/log_dir_backup

In this case, I was trying to copy the log directory to make a quick and [...]

Read the full article →

How to change your password from the command line

command line

To change your own password from the command line:

passwd

To change the password for another user, you must use sudo:

sudo passwd

Read the full article →

What is the Apache directive order of precedence?

apache

I am trying to implement some mod_rewrite RewriteRules using WordpressMU. I tried putting them in the Virtural Host file, but they did not appear to work. Since WPMU has a set of mod_rewrite RewriteRules in a .htaccess file, I wondered if the order of precedence was the problem. It seems that was [...]

Read the full article →