增加分區(ext4)的大小或自動掛載它


2

我希望增加/分區的大小(當前大小為21 GB),是否可以以某種方式進行?我有更多可用空間,但不知道如何將其添加到現有分區中。我創建了一個具有可用空間的新分區(名為Extra,大小為12 GB),並希望將其與/合併,或者如果無法合併,則可以使用任何方法來更改掛載點。因為我用可用空間創建的新分區當前已安裝在/media/Extra上,所以每次啟動計算機時都必須安裝它。

這是sudo fdisk -l的輸出

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb8000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63      401624      200781   83  Linux
/dev/sda2          403456    31860735    15728640    7  HPFS/NTFS/exFAT
/dev/sda3   *    31860736   414078967   191109116    7  HPFS/NTFS/exFAT
/dev/sda4       414081022   625141759   105530369    f  W95 Ext'd (LBA)
/dev/sda5       414081024   558030847    71974912    7  HPFS/NTFS/exFAT
/dev/sda6       583198720   625141759    20971520   83  Linux
/dev/sda7       558033903   583191629    12578863+  83  Linux

Partition table entries are not in disk order

This is the image from the Disk UtilityGParted screenshot, 2 ext4 partitions from bottom

請幫助我解決此問題。謝謝!

0

Delete /dev/sda7 (Extra). This should concatenate unallocated space around it and produce a single unallocated block. After that you should be able to increase /dev/sda6 up to plus that space with Resize operation as described here How to merge partitions?