Lewati navigasi

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).

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 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” contains a list of commonly used parted commands. The sections that follow explain some of these commands and arguments in more detail.

Command Description check minor-num Perform a simple check of the file system cp fromto Copy file system from one partition to another; from and to are the minor numbers of the partitions
help Display list of available commands
mklabel label Create a disk label for the partition table
mkfs minor-numfile-system-type Create a file system of type file-system-type
mkpart part-typefs-typestart-mbend-mb Make a partition without creating a new file system
mkpartfs part-typefs-typestart-mbend-mb Make a partition and create the specified file system
move minor-numstart-mbend-mb Move the partition
name minor-numname Name the partition for Mac and PC98 disklabels only
print Display the partition table
quit Quit parted
rescuestart-mbend-mb Rescue a lost partition from start-mb to end-mb
resize minor-numstart-mbend-mb Resize the partition from start-mb to end-mb
rm minor-num Remove the partition
select device Select a different device to configure
set minor-numflagstate Set the flag on a partition; state is either on or off
toggle [NUMBER [FLAG] Toggle the state of FLAG on partition NUMBER
unit UNIT Set the default unit to UNIT
Table 6.1. parted commands

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s

%d blogger menyukai ini: