Eventually, you will need to expand your system's storage capacity. Your users will demand more space for their files or the latest applications will require more space than you've allocated. One way to satisfy this demand is to install additional hard drives.
(You could purchase an entirely new machine, but that might be overkill as well as outside your budget.)
- Purchasing a new hard drive
When purchasing a new hard drive, you must consider drive interface, performance, capacity, and price. In addition, your new hard drive must match your system's interface support. If you have an IDE interface, then you must purchase an IDE drive. The same is true for SCSI. If you have both types of interface, then the choice is yours. Choose reputable vendors, adequate capacity, disks with a high transfer rate, and price within your budget.
About the only time the average computer user is not concerned with running out of storage space is the first day a PC is in use.
After you start installing programs, copying over gigabytes of backup archives, and filling folders with photos,
music, and videos, and those initially large gigabytes appear to offer less storage than originally thought.
It may take a month, it may take a year, or it may take two, but no matter how much free storage you start out with,
you are eventually going to need more. About the only time the average computer user is not concerned with running out of storage space is the first day a PC is in use. Start installing programs, copying over tons of backup archives, and filling folders with photos, music, and videos, and all those initially voluminous gigabytes can melt away before your eyes. It may take a month, it may take a year, or it may take two, but no matter how much free storage you start out with, you're eventually going to need more. Remember the old axiom: Data always expands to fill available space.
There are several steps involved in installing a new hard drive into your Linux machine. The following table outlines the installment steps::
1. |
Physically install your hard drive. |
You will need to turn off your Linux system to do this, so you should notify your users of the expected down time. |
2. |
Prepare the drive according to the manufacturer's guidelines. |
For a SCSI drive, this might involve low-level formatting of the drive from the SCSI controller's BIOS. |
3. |
Create the hard drive's partition table using the fdisk or cfdisk programs. |
As you create partitions, you will add both Linux ext2 and swap partitions. |
4. |
Initialize the new ext2 partitions with the mke2fs command. |
This command places filesystem information onto the partition so that you can store data there. The syntax of this command is mke2fs <partition> ; for example, mke2fs /dev/hdb1 .
|
5. |
Initialize the new swap partitions with the mkswap command. |
This command prepares the swap space for Linux's use. The syntax of this command is mkswap <partition> ; for example, mkswap /dev/hdb2 . |
6. |
Edit /etc/fstab , adding new entries for the partitions. |
For example, to add an automounting floppy drive you would add the line /dev/fd0 /mnt/floppy ext2 noauto,owner 0 0 to the /etc/fstab file. |
7. |
Make the directories for each of the mount points you specified in /etc/fstab . |
To make a directory, use the command mkdir <directory name> . |
8. |
To gain immediate access to your new filesystems, mount them with the mount command. |
The syntax of this command is mount <partition> ; for example, mount /dev/hdb1 .
|
9. |
Enable the new swap partitions using swapon -a . |
The option -a enables all swap found in the /etc/fstab file. |
The commands fdisk, cfdisk, and mke2fs are destructive. fdisk and cfdisk update the disk's partition table. If you mistakenly type the wrong
device name, you will lose access to all existing data on modified partitions! mke2fs places a new, formatted filesystem onto the partition.
If you mistakenly type the wrong partition name, then you will overwrite all existing data!
The Simulation below walks you through adding a 3.2GB IDE hard drive to an existing Linux system.
Add IDE Drive
Before moving on to the next lesson, click the Exercise link below to check your knowledge of installing a new hard drive.
- Intall harddrive in Redhat
- Physically install your hard drive.
- Prepare the drive according to the manufacturer's guidelines.
- Create the hard drive's partition table using the
fdisk
or cfdisk programs
.
- Initialize the new ext2 partitions with the
mke2fs
command.
- Initialize the new
swap
partitions with the mkswap
command.
- Edit
/etc/fstab
, adding new entries for the partitions.
- Make the directories for each of the mount points you specified in
/etc/fstab
.
- To gain immediate access to your new filesystems, mount them with the
mount
command.
- Enable the new
swap
partitions using swapon -a
.
The next lesson concludes this module.