Документ взят из кэша поисковой машины. Адрес оригинального документа : http://itpm.msu.su/LDP/LinuxAdministration/linux-admin-made-easy-11.html
Дата изменения: Sun Apr 18 13:35:41 1999
Дата индексирования: Mon Oct 1 21:59:41 2012
Кодировка:
Linux Administration Made Easy: Enterprise Computing with Linux Next Previous Contents

11. Enterprise Computing with Linux

As Linux has earned a solid reputation for its stability and reliability, it is being used for more mission critical applications in the corporate and scientific world.

This chapter will discuss issues which are most relevant to those using Linux in the enterprise, such as tuning your server for better performance under higher loads, keeping your data safe with RAID technologies, as well as discuss the general procedures to migrate across servers.

11.1 Performance Tuning

( Under construction. :-p )

11.2 High Availability with RAID

As storage needs increase, it sometimes becomes necessary to put additional drives with larger capacities online. Yet ironically, the law of probability dictates that as the number of storage devices increases, so too does the likelihood of a device failure. Therefore, a system with a single hard drive is only 25% as likely to suffer a hardware failure as a system with four drives. [ Well, theoretically speaking, anyway :-) ]

Fortunately, such failures can be handled gracefully, and more importantly without downtime, using a technique called "Redundant Array of Inexpensive Disks" (RAID) which uses one of several methods of distributing data over multiple disks. This redundancy allows for automatic recovery of data should a device fail.

This section will describe the installation, configuration, and setup of a RAID disk array using the Mylex AcceleRAID DAC960 controller. I have been very impressed with not only the performance and reliability of the controller itself, but also with the technical support I've gotten from Mylex -- they are very Linux-friendly! (However, there are a wide variety of hardware RAID solutions for Linux, and RAID can be implemented in software by the Linux kernel itself.) The type of RAID implementation that is most useful is probably RAID level 5.

The first step in getting the RAID controller usable under Linux is to build a custom kernel with driver support for the hardware. The driver for the Mylex DAC960 can be downloaded from the Dandelion Digital Linux page at http://www.dandelion.com/Linux/DAC960-2.0.tar.gz.

The final step in getting your RAID array usable under Linux is to use the ``fdisk'' utility to create valid partitions. This is done in exactly the same manner as you would use on an IDE or regular SCSI drive. See the "Partitioning Hard Drive(s)" for details on how to set up partition information. Note: The DAC960 driver supports a maximum of 7 partitions per logical drive. If you need to define more, you will need to define multiple logical drives in the RAID configuration utility (press <Alt>-<R> at system boot time to enter the setup utility).

Once you are able to see your RAID array, you should initialize any swap areas and file systems you wish to define. The following is an example of initializing a swap area on the third partition of the second drive, as well as an ext2-formatted file system on the first partition of the first drive:

/sbin/mkswap -c /dev/rd/c0d1p3
/sbin/swapon /dev/rd/c0d1p3
/sbin/mkfs.ext2 -c /dev/rd/c0d0p1

Note: The ``-c'' option in the above ``mkswap'' and ``mkfs.ext2'' commands enable bad-block checking as the appropriate swap/file systems are created. This adds substantially to the time it takes to complete the process, but it is probably a very good idea to perform such checks.

For any new swap areas you have defined, you should make an entry in the ``/etc/fstab'' file to ensure the swap area is actually used from subsequent bootups. As per the above example, the following line should be added:


/dev/rd/c0d1p3  swap       swap  defaults   0 0

Finally, once your file systems have been initialized, you can create mount points there and move your large file systems onto the array as you desire. It is probably a good idea to test the array for a few days before using it in a production environment.

For further information on the Mylex AcceleRAID controller, visit the Mylex web site at http://www.mylex.com/ as well as the Dandelion Digital DAC960 driver page at http://www.dandelion.com/Linux/DAC960.html. For further information on RAID in general (including both software- as well as hardware-based solutions), see the Linux High Availability web site at http://linas.org/linux/raid.html.

11.3 Server Migration and Scalability Issues

With support for a diverse selection of hardware, as well as proven speed and reliability, Linux is up to the challenge of scaling up to meet resource demands as they increase. This can include moving to an SMP (Symmetric Multi Processing) configuration for greater processing needs, RAID levels 0 through 5 (either in software or hardware driven modes), etc.

On occasion, you may feel that your Linux server has outgrown the hardware it is running on, perform a major Linux version upgrade, or perhaps move to a different distribution of Linux. There are, of course, two ways of doing this. Either you will be leaving your server on existing or upgraded hardware (in which case you need simply shut down services, back up your data, perform the required modifications, and then restore data if needed), or in the more radical case, migrate your server to new hardware.

This section will concentrate more on the latter situation, where you will be actually migrating your various services from the old server to a new one. There are, of course, several migration strategies, however this section will attempt to provide some rough guidelines which you can follow in order to ensure your migration effort succeeds with minimal disruption to your users.

Once you are done, make sure everything is working as expected! If not, you can always re-enable any services you disabled on the old server and restart them so that users can continue using it until you resolve the problems on the new one (bear in mind, however, that you'll need to repeat the above steps again if you choose to do that).


Next Previous Contents