Standard Partitions using parted
The utility parted allows users to:
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).
A device containing a partition must not be in use if said partition is to be
removed or resized. Similarly, when creating a new partition on a device, said
device must not be in use. 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 is 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
turn off all
unmounted), you can unmount them with the umount command and
the swap space on the hard drive with the swapoff command.
Table below contains a list of commonly used parted commands. The sections
that follow explain some of these commands and arguments in more detail.
- View the existing partition table
- Change the size of existing partitions
- Add partitions from free space or additional hard drives
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).
A device containing a partition must not be in use if said partition is to be
removed or resized. Similarly, when creating a new partition on a device, said
device must not be in use. 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 is 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
turn off all
unmounted), you can unmount them with the umount command and
the swap space on the hard drive with the swapoff command.
Table below contains a list of commonly used parted commands. The sections
that follow explain some of these commands and arguments in more detail.
Comments
Post a Comment