July 20, 2010

RAID primer for servers

By The Computer Doctor:

Now that the Doctor has his own server hardware to use, one of the first things in the installation of either Server 2003 or Ubuntu 10.04 LTS was the use of RAID array drives. For those of you that have never built a RAID array or have heard of them in reference to an existing server but are not sure what they are, let me take some time to explain.

RAID is an acronym that stands for "redundant array of independent disks" or "redundant array of inexpensive disks". Even when the disks are not redundant they may be considered RAID if they work in conjunction to each other in an array.

I will illustrate the most common RAID array and give a brief explanation of each.

RAID 0: Block Level Striping Without Parity Or Mirroring

This provides improved performance and additional storage but no redundancy or fault tolerance. Any disk failure destroys the array, and the likelihood of failure increases with more disks in the array. A single disk failure destroys the entire array because when data is written to a RAID 0 volume, the data is broken into fragments called blocks. The number of blocks is dictated by the stripe size, which is a configuration parameter of the array. The blocks are written to their respective disks simultaneously on the same sector. This allows smaller sections of the entire chunk of data to be read off the drive in parallel, increasing bandwidth. RAID 0 does not implement error checking, so any error is uncorrectable. Additional disks in the array means higher bandwidth, but greater risk of data loss. Remember with Raid 0, "if you loose a disk you get zero data back"


RAID 1: Mirroring Without Parity Or Striping

Data is written identically to multiple disks (a "mirrored set"). Although many implementations create sets of 2 disks, sets may contain 3 or more disks. Array provides fault tolerance from disk errors or failures and continues to operate as long as at least one drive in the mirrored set is functioning. Increased read performance occurs when using a multi-threaded operating system that supports split seeks, as well as a very small performance reduction when writing. Using RAID 1 with a separate controller for each disk is sometimes called duplexing. Remember with RAID 1, "One always sees himself in the mirror"




RAID 2: Bit-Level Striping With Dedicated Hamming-Code Parity

All disk spindle rotation is synchronized, and data is striped such that each sequential bit is on a different disk. Hamming-code parity is calculated across corresponding bits on disks and stored on one or more parity disks. Extremely high data transfer rates are possible.














RAID 3: Byte Level Striping With Dedicated Parity

All disk spindle rotation is synchronized, and data is striped such that each sequential byte is on a different disk. Parity is calculated across corresponding bytes on disks and stored on a dedicated parity disk. Very high data transfer rates are possible.





RAID 4: Block Level Striping With Dedicated Parity

Identical to RAID 5, but confines all parity data to a single disk, which can create a performance bottleneck. In this setup, files can be distributed between multiple disks. Each disk operates independently which allows I/O requests to be performed in parallel, though data transfer speeds can suffer due to the type of parity. The error detection is achieved through dedicated parity and is stored in a separate, single disk unit.



RAID 5: Block Level Striping With Distributed Parity

Distributed parity requires all drives but one to be present to operate. Drive failure requires replacement, but the array is not destroyed by a single drive failure. Upon drive failure, any subsequent reads can be calculated from the distributed parity such that the drive failure is masked from the end user. The array will have data loss in the event of a second drive failure and is as vulnerable as a RAID 0 array until the data that was on the failed drive is rebuilt onto a replacement drive. A single drive failure in the set will result in reduced performance of the entire set until the failed drive has been replaced and rebuilt.


RAID 6: Block Level Striping With Double Distributed Parity

Provides fault tolerance from two drive failures. The array will continue to operate with up to two failed drives. This makes larger RAID groups more practical, especially for high-availability systems. This becomes increasingly important as large-capacity drives lengthen the time needed to recover from the failure of a single drive. Single-parity RAID levels are as vulnerable to data loss as a RAID 0 array until the failed drive is replaced and its data rebuilt; the larger the drive, the longer the rebuild will take. Double parity gives time to rebuild the array without the data being at risk if a single additional drive fails before the rebuild is complete.














Enhanced by Zemanta

July 15, 2010

Adding Missing Menu Items To Grub2

GNU GRUBImage via Wikipedia

By The Computer Doctor:

As a follow up to my previous article Ubuntu 10.04 hit by major bug on release day, I have an addendum*.

In order to manually place a missing item in Grub2 you will need some basic information first.

  1. the hard disk number
  2. the partition number
The easiest graphical way to find these can be found in the disc utility program in administration.

When you open the disc utility you will see a screen like the one pictured below.To find your hard drive number count from the top down with the first one being 0 "zero".
To find your partition number count from the left to the right with the first one being 1 "one".

Now for the new editing in Grub2. For experienced grub legacy users that remember editing the menu.lst file... those days are long gone. The new grub.cfg file is not like the menu.lst very much at all with very few items that can be edited manually and none of the menu items being editable.
To add new menu items you need to open an editor in root privileged mode and I will use gedit for my example.

In terminal mode you need to enter sudo gedit and then enter your root password.
Next you will navigate to and open /etc/grub.d/40_custom

See the next illustration for an example of the items I added to my menu.

If you can follow the syntax of the second menu item, the Windows Vista Recovery Partition" and change the label to match your menu item along with the Hard Drive number in the set root line and the partition number in the drivemap line you should be able to add your own menu items.

To finish up the procedure just save the 40_custom file and close gedit.

Now back in the terminal you want to type the following code sudo update-grub
Once this is done running reboot your computer to see and test your new menu items.


*although hard to believe, the Computer Doctor may make a mistake, but is totally willing to add a microscopic apology near the bottom of a future article.

Enhanced by Zemanta

Hex Converter

Hex To ASCII Converter

Hex:
Ascii:

 

Integer to Byte converter


This is a tool to practice converting between decimal and binary representations. After you have practiced for a while and feel that you know how to do the conversions, take the quiz.
Decimal number to convert:
Binary representation:


Binary number to convert:
Decimal representation: