![]() |
James Thornton |
| Internet Business Consultant |
| Home | Blog | Bio | Projects | Contact | Latest Blog (new site): How to Get to Genius |
|---|
|
Creating an ext3 File SystemIf you are adding a new disk drive to a Red Hat Linux system and want to utilize the ext3 file system, you must first partition the hard disk with a program such as fdisk and then format the file system. Partitioning with fdiskTo use fdisk, open a shell prompt and log in as the root user. The fdisk command requires you to specify the device you are partitioning as an argument to the command. In the following examples, the device will be /dev/hdb, which corresponds to the second device on the primary IDE channel. To begin, type:
The following table provides the most common fdisk commands. Table 5-1. fdisk commands
Now that you are in the fdisk program, type n to create a new partition. The program will ask you to choose a partition type, choose e for an extended and p for a primary partition. Before choosing the partition type, be aware that Red Hat Linux only allows up to four primary partitions per disk. If you wish to create more than that, one (and only one) of the four primary partitions may be an extended partition, which acts as a container for one or more logical partitions. Since it acts as a container, the extended partition must be at least as large as the total size of all the logical partitions it is to contain. For more information on disk partitions, see the Appendix called An Introduction to Disk Partitions in the Official Red Hat Linux Installation Guide. After choosing the partition type and the number for that partition,
choose which cylinder head you would like the partition to start
on. You can type Next, specify the size. The easiest way to do this is to type
+sizeM, where
size is the size of the partition in
megabytes. If you press Repeat this process until you have created your desired partitioning scheme.
Next, you will need to specify what type of file system you intend to put on the disk because fdisk creates partitions of type unknown by default. To do this, type t followed by a partition number. Next enter the hex value for the file system type you intend to install on the partition. For Linux swap partitions. the hex value is 82. For Linux ext2 or ext3 partitions, the hex value is 83. For other partition types, use the l command to see a list of file system types and their hex values. Repeat this for each partition you created. When you are finished making partitions, type w to save your changes and quit.
Formating ext3 File Systems with mkfsOnce you have created partitions on the disk drive using a partitioning program such as fdisk, you should use mkfs to create an ext3 file system on each partition. To do this, log in as root and type:
In the above command, replace hdb with the drive letter and X with the partition number.
Assigning a Label with e2labelOnce you have created and formated a partition, you should assign it a label using the e2label command. This allows you to add the partition to /etc/fstab using a label instead of using a device path, thereby making the system more robust. [1] To add a label to a partition, type the following command as root:
Where hdb is the drive letter, X is the partition number, and /mount/point is the mount point you intend to use for the partition. Once you have assigned each partition a label, add the partitions to /etc/fstab. To do this, log in as root and type:
Then add a line to /etc/fstab for each labeled partition similar to this:
In the above entry in /etc/fstab, replace each occurrence of /mount/point with the mount point you intend to use for the partition. If you need more information on the various options available to you in /etc/fstab, type man fstab. If there are partitions whose label you are unsure of, type the following command:
In the above command, replace hdb with the drive letter and X with the partition number. This will return something similar to the output below:
In this output, /mount/point is the volume label. After completing the above steps, you will have successfully added a new ext3 disk to the system. The next section demonstrates how to convert an ext2 disk partition to an ext3 partition. Notes
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||
James Thornton, jamesthornton.com>Services: Search Engine Optimization Placement |
Electric Speed: Search Engine Optimization Information |