13.4. Resizing a Partition


警告

Do not attempt to resize a partition on a device that is in use.

过程 13.4. Resize a partition

  1. Before resizing a partition, boot into rescue mode (or unmount any partitions on the device and turn off any swap space on the device).
  2. Start parted, where /dev/sda is the device on which to resize the partition:
    # parted /dev/sda# parted /dev/sda
    Copy to Clipboard Toggle word wrap
  3. View the current partition table to determine the minor number of the partition to resize as well as the start and end points for the partition:
    # print
    Copy to Clipboard Toggle word wrap
  4. To resize the partition, use the resize command followed by the minor number for the partition, the starting place in megabytes, and the end place in megabytes.

    例 13.2. Resize a partition

    For example:
    resize 3 1024 2048

    警告

    A partition cannot be made larger than the space available on the device
  5. After resizing the partition, use the print command to confirm that the partition has been resized correctly, is the correct partition type, and is the correct file system type.
  6. After rebooting the system into normal mode, use the command df to make sure the partition was mounted and is recognized with the new size.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat