Ubuntu – How to speed up a partition resize using gparted

gpartedpartitioning

Shrinking and expanding partition using gparted in old versions of ubuntu was very fast. Moving a partition was the only time-consuming task and the time depend on size of partition.

In new versions of ubuntu, gparted seems to take a long time shrinking and expanding partitions. I guess it's because it moves fragmented spaces and moving is very time-consuming, so the overall time of shrinking or expanding a partition is shrinking or expanding time plus time taken in moving fragmented spaces. That is huge if we are expanding or shrinking a big partition.

To save time I want to ignore fragmented space. Is there any way to shrink or expand a partition without taking care of small fragmentation using gparted or any other tool?

Best Answer

Put simply, no, you can't. GParted needs to clean up the partitions as best it can in order to ensure a safe and successful resize.

Here is a longer explanation I found on the GParted forums:

The problem with this is that it requires the file system to be in a definitiely clean state - otherwise, the resize operations (especially shrinking) would destroy data. While this is relatively easy to ensure for the typical Linux file systems (GParted brings the tools required to check and fix them with it on the Live media), it is not so easy for third-parts file systems like NTFS: For these file systems, you often need to boot the "native" operating system for these file systems and perform some magic there. In addition to this, even some of the Linux file systems can not be moved this way, since there is no known way to shrink them (jfs / XFS / Reiser4) - and to enlarge them, they need to be mounted, and growing must be done on-line (jfs / XFS). Depending on your machine, this is not a very clever idea - maybe you perform the resize operations on a system with very little RAM (and modern file systems can consume huge amounts of memory).

Hope that answers your question.

Related Question