Configuring and Managing Storage

Topics Covered:

·  Understanding Partitions and Logical Volumes

·  Creating Partitions

INTRO:

·  In this session, you will learn how to configure storage on your server

·  You will learn about the command-line tools that are available to configure storage on a server that already has been installed

·  1st, you'll learn how to create partitions and logical volumes on your server, which allows you to create file systems on these volumes later

·  You'll learn how to configure "/etc/fstab" to mount these file systems automatically

·  You will also learn how to grow and shrink logical volumes and how to work with snapshots

UNDERSTANDING PARTITIONS AND LOGICAL VOLUMES:

·  Partitions offer a rather static way to configure storage on a server

·  logical volumes offer a much more dynamic way to configure storage

·  All Red Hat servers have at least one partition that is used to boot the server, because the boot loader GRUB can't read data from logical volumes

·  If you need basic storage features, you'll use partitions on the storage devices. .In all other cases, it is better to use logical volumes

·  The Logical Volume Manager(LVM) offers many benefits:

o  LVM makes resizing of volumes possible

o  In LVM, you can work with snapshots, which are useful in making a reliable backup

o  In LVM, you can easily replace failing storage devices

·  Sometimes, you just need to configure access to storage where you know that the storage configuration is never going to change...In that case, you can use partitions instead of LVM

o  Using partitions has one major benefit:

§  It is much easier to create and manage partitions

Creating Partitions:

·  There are two ways to create and manage partitions:

o  Use the graphical Palimpsest tool, which you can start by selecting "Applications->System Tools->Disk Utility

§  Using this tool is somewhat easier than working with "fdisk" on the command line

o  Two popular command-line tools (fdisk or newer parted tool)

§  Creating a partition with "fdisk" is easy to do

§  After starting "fdisk", you simply indicate you want to create a new partition

§  There are 3 kinds of partitions you can create:

·  Primary Partitions: These are written directly to the master boot record of your hard drive... After creating four primary partitions, you can't add any more partitions. . .There's space for just four partitions in the partition table and no more than four

·  Extended Partition: Every hard drive can have one extended partition

o  You can't create a file system in an extended partition

o  The only thing you can do with it is to create logical partitions

o  You'll use an extended partition if you intend to use more than four partitions in total on a hard drive

o  An extended partition, will allow you to create 11 additional logical partitions

·  Logical Partition: A logical partition (not to be confused with a logical volume) is created inside an extended partition

o  You can have a maximum of 11 logical partitions per disk, and you can create file systems on top of logical partitions

o  After selecting between primary, extended, or logical partitions, you need to select a partition type. .This is an indication to the OS what the partition is to be used for.

o  On RHEL servers, the following are the most common partition types:

§  83 - This is the default partition type. It's used for any partition that is formatted with a Linux file system

§  82 - This type is used to indicate that the partition is used as swap space

§  05 - This partition type is used to indicate that it is an extended partition

§  8e - Use this partition type if you want to use the partition as an LVM physical volume

o  Once you've created the partition, you'll write the changes to disk

o  Writing the new partition table to disk doesn't automatically mean your server can start using it right away

o  In many cases, you'll get an error message indicating that the device on which you've created the partition is busy.. If this happens, you'll need to restart your server to activate the new partition

Exercise: Creating Partitions

·  At this point, you have completed the exercise and added partitions to your usb flash drive.

·  Next step: do something with them... Since you created normal partitions, you would now typically go ahead and format them.. In the next section, you will learn how to do that