> For the complete documentation index, see [llms.txt](https://hanxu.gitbook.io/blogs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hanxu.gitbook.io/blogs/linux/linux-fen-qu-xiang-zuo-kuo-rong-de-fang-fa.md).

# 【Linux】分区向左扩容的方法

@[TOC](https://github.com/UnderTurrets/notes/blob/master/Linux/文章目录/README.md)

***

## 为什么是向左扩容

Linux向右扩容非常简单，无论是系统自带的`disks`工具还是apt安装的`gparted`工具，都有图像化的界面可以操作。但是，都不支持向左扩容。笔者这里的磁盘情况如下：

![](https://cdn.jsdelivr.net/gh/UnderTurrets/ImageHosting@master/linux_extenddisk_mydisk.png)

其中磁盘1的99.5GB是我的Linux系统分区，已经捉襟见肘，需要扩容。而我分出的100GB又在它的左侧，这种情况下，无论是在win系统还是Linux系统，都是无法直接扩容的。

## 操作前的备份

无论扩容是否成功，请先进行数据克隆。笔者这里就找了一根1TB的硬盘对磁盘1进行全盘拷贝。这样就算Linux崩了也可以恢复：

![](https://cdn.jsdelivr.net/gh/UnderTurrets/ImageHosting@master/linux_extenddisk_backup.png)

## 方法：启动盘试用Ubuntu后进行操作

准备一个Ubuntu启动盘，开机加载启动盘，加载启动盘的方法见[此篇](https://hanxu.gitbook.io/blogs/linux/linuxinstall-xiang-xi-de-ubuntu-he-win-shuang-xi-tong-an-zhuang-zhi-nan)。然后进入`Try or install Ubuntu`，进入之后选择试用。然后在试用的情况下，才可以对Linux的分区进行扩容。

进入试用之后，可以试用时自带的`gparted`工具进行操作，有图形化界面，非常简单，不必赘述了。
