Managing Disk Storage 6.1. Standard Partitions Using Parted - Red Hat ENTERPRISE LINUX 5 - DEPLOYMENT Deployment Manual

Hide thumbs Also See for ENTERPRISE LINUX 5 - DEPLOYMENT:
Table of Contents

Advertisement

Chapter 6.
Managing Disk Storage
6.1. Standard Partitions using parted
The utility parted allows users to:
• View the existing partition table
• Change the size of existing partitions
• Add partitions from free space or additional hard drives
If you want to view the system's disk space usage or monitor the disk space usage, refer to
Section 38.3, "File
Systems".
By default, the parted package is included when installing Red Hat Enterprise Linux. To start
parted, log in as root and type the command parted /dev/sda at a shell prompt (where /dev/
sda is the device name for the drive you want to configure).
If you want to remove or resize a partition, the device on which that partition resides must not be in
use. Creating a new partition on a device which is in use—while possible—is not recommended.
For a device to not be in use, none of the partitions on the device can be mounted, and any swap
space on the device must not be enabled.
As well, the partition table should not be modified while it is in use because the kernel may not
properly recognize the changes. If the partition table does not match the actual state of the mounted
partitions, information could be written to the wrong partition, resulting in lost and overwritten data.
The easiest way to achieve this it to boot your system in rescue mode. When prompted to mount the
file system, select Skip.
Alternately, if the drive does not contain any partitions in use (system processes that use or lock the
file system from being unmounted), you can unmount them with the umount command and turn off all
the swap space on the hard drive with the swapoff command.
Table 6.1, "parted commands"
that follow explain some of these commands and arguments in more detail.
Command
check minor-num
cp from to
help
mklabel label
mkfs minor-num file-system-type
mkpart part-type fs-type start-mb
end-mb
contains a list of commonly used parted commands. The sections
Description
Perform a simple check of the file system
Copy file system from one partition to another;
from and to are the minor numbers of the
partitions
Display list of available commands
Create a disk label for the partition table
Create a file system of type file-system-
type
Make a partition without creating a new file
system
71

Advertisement

Table of Contents
loading

Table of Contents