In this movie, Sandra shows how to create and delete partitions on your new installation of Red Hat Enterprise Linux.
- [Narrator] In this video, we'll take a look at partitioning. A disk can be used either as a simple entity or broken up into one or more partitions. A partition table is a structure that shows the partition organization. Some operating systems install everything onto one partition, but there are advantages to having several partitions. In Red Hat Enterprise Linux version seven, there are two partition schemes you can use. Either MBR or GPT. Let's start by examining MBR, or master boot record.
MBR partitions are managed by the F disk command. These days, physical disks grow in size pretty quickly, so MBR has certain limitations that can be a problem. The two main issues are that MBR can't create more than four primary partitions from one disk. Even though you can extend the partitions up to 15. Even more important than that, is that you can't partition the disk with more than two terabytes. Now let's look at the other partition scheme option, GPT, which stands for GUID partitioning table.
The GPT is part of the unified extensible firmware interface, or UEFI specification. Using GPT eliminates the limitations on number of partitions and it also ensures support for larger partitions, all the way up to nine zetabytes. Which you can imagine is pretty valuable in an enterprise environment. Unlike MBR, it's a list of partitions with no boot loader logic. We're gonna use the parted utility to manipulate hard disk partitions. Let's go over to the command line.
Go ahead and type parted, parted, into the command line to start the partage utility. You'll notice that your command prompt has changed, now you're at the parted prompt. You're gonna wanna use the print command to view all the available partitions in the selected hard disk. The print command also displays hard disk properties. One of the properties you can see in the print results is the partition table. This device is set up with a GPT partition table. It's a good idea, before creating the partition, to execute a print command to view the current layout.
This will help you set partition boundaries that don't overlap. Now, if you wanna see a list of all disks and partitions, you type print all. To start working on a disk, you need to select that disk. You can type select and the disk name. We're gonna use /dev/sda. Now, let's issue another print command. Make part, or mkpart, is a command used to create partitions with a start and end disk location. Let's go ahead and add a partition to this disk.
We'll start with the make part command. Type mkprt into the parted prompt and hit enter. It's gonna ask us for a partition name, we'll call this swap. Now it wants to know the file system type. We're gonna use the default for Red Hat Enterprise Linux seven, which is ext4. Now it wants to know your start location. I'm gonna go ahead and start at the number one. Finally, it wants to know the end point. For this example, I'm gonna select 99 and hit enter.
Now, to see the new partition we've created, let's run the print command again. In the results, line item one is our new partition. Now let me show you how to remove the partition. In order to remove the partition, you need to know the partition number. This is where it's useful to run a print command first. You can see the partition we just created is listed as number one. To remove this partition, type rm in the parted command, followed by a space and the partition number. Then hit enter.
Now let's run the print command again. You can see the partition we created named swap, has now been removed. To exit the parted prompt, type quit and hit enter. This will take you back to the command line. In the next video, we'll review system administration of the Red Hat Enterprise Linux file system.
- Learning the RHEL environment
- Planning and installing the network
- Examining the RHEL operating system
- Executing basic commands
- Editing files
- Creating and managing user accounts
- Configuring file systems and local storage
- Managing logs, software, and other systems
- Implementing local RHEL security