GParted, a popular partition editor for Linux systems, can be a lifesaver when it comes to managing disk partitions. However, you might encounter an issue where GParted refuses to let you extend a partition. This article will provide a detailed context on this topic, covering key concepts, and offering a solution to this common problem.
Understanding the Issue
When you try to extend a partition using GParted, you might encounter an error message that says "Can't write to disk." This issue can occur due to several reasons, such as:
- The partition table is locked by another process.
- The partition you want to extend is not contiguous.
- The partition you want to extend is mounted.
Solution: Unmount the Partition
The most common reason for this issue is that the partition you want to extend is mounted. To resolve this, you need to unmount the partition before extending it. Here's how:
- Identify the partition you want to extend using the 'fdisk -l' command:
- Identify the file system mounted on the partition using the 'mount' command:
- Unmount the partition using the 'umount' command:
- Now you can extend the partition using GParted:
sudo fdisk -l
/dev/sdc1 2048499711497664243 83 Linux /dev/sdc2 501758234440703233938946111, 6G 5 Extended /dev/sdc5 501760234440703233938944111, 6G 8e
sudo mount
Look for the partition you identified in the output. The output will look something like this:
/dev/sdc5 on /mnt/data type ext4 (rw,relatime,errors=remount-ro,data=ordered)
sudo umount /dev/sdc5
In summary, if you encounter an issue where GParted won't let you extend a partition, the most common cause is that the partition is mounted. To resolve this, you need to unmount the partition before extending it. You can use the 'fdisk', 'mount', and 'umount' commands to identify and unmount the partition.
References