F5F Stay Refreshed Software Operating Systems Linux GParted does not allow shrinking a 1 TiB partition.

Linux GParted does not allow shrinking a 1 TiB partition.

Linux GParted does not allow shrinking a 1 TiB partition.

D
DantBossGamer
Member
191
11-02-2024, 08:51 AM
#1
During setup I had no option but to use the installer's automatic partitioning which would allocate space for the OS. Knowing it usually lets you adjust partitions with a dragging arrow, I realized it didn’t work here. I created a 931.04 GiB partition named /dev/sdb5 for Ubuntu, using the lvm2 pv file system under the extended filesystem directory. My challenge was reducing that 931.04 GiB drive to roughly 33.0 GiB since I already have more free space elsewhere. Normally on Windows I’d use Disk Management to shrink a volume, but with Linux I needed different steps. Here’s what I tried:

- I’m using a live Ubuntu CD with GParted installed.
- The drive has three partitions: sdb1 (487 MiB), sdb2 (nearly empty), and sdb5 (931.04 GiB).
- A lock icon appears next to sdb2 and sdb5.
- I suspect Kubuntu won’t fit the full 931.04 GiB, but it shows zero unused space.
- On sdb1 I see all options—delete, resize, move, format, manage flags, label, etc.—but nothing fixes the issue.
- On sdb2 I only get “manage flags” and “information,” which doesn’t help.
- On sdb5 I can resize or move but only adjust alignment; deactivating removes locks, yet the minimum size stays at 931 GiB.
- The lvm flag isn’t clear to me.

My goal is to shrink sdb5 down to about 33.0 GiB so it fits better on the remaining drive space.
D
DantBossGamer
11-02-2024, 08:51 AM #1

During setup I had no option but to use the installer's automatic partitioning which would allocate space for the OS. Knowing it usually lets you adjust partitions with a dragging arrow, I realized it didn’t work here. I created a 931.04 GiB partition named /dev/sdb5 for Ubuntu, using the lvm2 pv file system under the extended filesystem directory. My challenge was reducing that 931.04 GiB drive to roughly 33.0 GiB since I already have more free space elsewhere. Normally on Windows I’d use Disk Management to shrink a volume, but with Linux I needed different steps. Here’s what I tried:

- I’m using a live Ubuntu CD with GParted installed.
- The drive has three partitions: sdb1 (487 MiB), sdb2 (nearly empty), and sdb5 (931.04 GiB).
- A lock icon appears next to sdb2 and sdb5.
- I suspect Kubuntu won’t fit the full 931.04 GiB, but it shows zero unused space.
- On sdb1 I see all options—delete, resize, move, format, manage flags, label, etc.—but nothing fixes the issue.
- On sdb2 I only get “manage flags” and “information,” which doesn’t help.
- On sdb5 I can resize or move but only adjust alignment; deactivating removes locks, yet the minimum size stays at 931 GiB.
- The lvm flag isn’t clear to me.

My goal is to shrink sdb5 down to about 33.0 GiB so it fits better on the remaining drive space.

E
eggman722
Member
176
11-02-2024, 08:51 AM
#2
It's quite unusual. Mostly I've managed better results with gparted shrinking partitions. It can reduce a partition down to its actual usage, whereas Windows sometimes can't shrink them further. Just two points to verify: Are you trying to shrink a primary or logical/extended volume? And are the partitions unmounted? (Looks like they have locks if so)
E
eggman722
11-02-2024, 08:51 AM #2

It's quite unusual. Mostly I've managed better results with gparted shrinking partitions. It can reduce a partition down to its actual usage, whereas Windows sometimes can't shrink them further. Just two points to verify: Are you trying to shrink a primary or logical/extended volume? And are the partitions unmounted? (Looks like they have locks if so)

X
xXYoloLaskaXx
Member
56
11-02-2024, 08:51 AM
#3
GParted is truly a powerful utility. Recently I reorganized my entire SSD with ease, handling shrinking, relocating, and expanding various types of partitions. It appears your partition setup is more intricate than usual. However, Gparted manages partitions without relying on logical volumes—follow along as the explanation runs a bit longer. Typically, the first partition might be /boot, while the second could be a large LVM or Logical Volume Manager volume. Imagine it like a big whiteboard; each partition is a section marked by lines drawn across it. You can allocate more or less space as needed. This setup resembles an extended partition but offers greater capabilities. Initially, you’ll need to adjust the logical volume within the LVM area (repositioning lines), then either create a new logical volume inside the LVM (drawing fresh lines) or expand the LVM itself (trimming the board). Depending on your goals, this varies. If you plan to use it solely for Linux, placing it inside LVM simplifies things. For multi-OS use—such as supporting both Windows and Linux—you’d need to carve out space within LVM, which isn’t straightforward. GParted seems capable of handling LVM resizing without issues, but you’ll still have to manually adjust the logical volume first.

Please note: I’m providing this guidance with a grain of caution. I’m not liable if anything goes awry, especially since I haven’t applied LVM in a live setting and am still learning from both tutorials and personal choices about my filesystem. If you find any inaccuracies, kindly let me know.

I highly suggest reviewing the linked resources:
- https://www.howtoforge.com/linux_lvm
- https://wiki.archlinux.org/index.php/LVM

When you boot a live USB, it usually mounts both the partition and the logical volume automatically. After unmounting the logical volume safely, you can resize the LVM partition—similar to safely ejecting a USB drive.

To proceed, first unmount the logical volume (like disconnecting a device). Then, use commands such as `lvdisplay` to confirm its name and location. You’ll likely see only one entry for your main partition. Next, employ `blkid` with the info from GParted to identify the filesystem type—most commonly ext4.

After unmounting, resize the LVM logical volume using:
```
sudo umount /dev/<volumegroup>/<logicalvolume>
sudo lvresize -L 30G -r <volumegroup> /<logicalvolume>
```

If you’re not using older file systems like ext2,3,4 or XFS, omit the `-r` flag and use the appropriate tool. For partitions outside LVM, unmount them in GParted and resize them easily afterward.

Once resized, you can create additional partitions within the LVM or move free space as needed. GParted’s interface is designed to handle these tasks efficiently, making it a solid choice for managing modern storage layouts.

Remember, Linux filesystems like ext4 are ideal here, but if you’re unsure, sticking to basic partitions and testing in virtual environments can save time later.

For those new to this process, avoid overly complex solutions such as LVM unless absolutely necessary. Virtual machines offer a safer sandbox for experimentation.

Lastly, when I first encountered this topic, I spent a lot of time reading it carefully—don’t rush through it. Live and learn!
X
xXYoloLaskaXx
11-02-2024, 08:51 AM #3

GParted is truly a powerful utility. Recently I reorganized my entire SSD with ease, handling shrinking, relocating, and expanding various types of partitions. It appears your partition setup is more intricate than usual. However, Gparted manages partitions without relying on logical volumes—follow along as the explanation runs a bit longer. Typically, the first partition might be /boot, while the second could be a large LVM or Logical Volume Manager volume. Imagine it like a big whiteboard; each partition is a section marked by lines drawn across it. You can allocate more or less space as needed. This setup resembles an extended partition but offers greater capabilities. Initially, you’ll need to adjust the logical volume within the LVM area (repositioning lines), then either create a new logical volume inside the LVM (drawing fresh lines) or expand the LVM itself (trimming the board). Depending on your goals, this varies. If you plan to use it solely for Linux, placing it inside LVM simplifies things. For multi-OS use—such as supporting both Windows and Linux—you’d need to carve out space within LVM, which isn’t straightforward. GParted seems capable of handling LVM resizing without issues, but you’ll still have to manually adjust the logical volume first.

Please note: I’m providing this guidance with a grain of caution. I’m not liable if anything goes awry, especially since I haven’t applied LVM in a live setting and am still learning from both tutorials and personal choices about my filesystem. If you find any inaccuracies, kindly let me know.

I highly suggest reviewing the linked resources:
- https://www.howtoforge.com/linux_lvm
- https://wiki.archlinux.org/index.php/LVM

When you boot a live USB, it usually mounts both the partition and the logical volume automatically. After unmounting the logical volume safely, you can resize the LVM partition—similar to safely ejecting a USB drive.

To proceed, first unmount the logical volume (like disconnecting a device). Then, use commands such as `lvdisplay` to confirm its name and location. You’ll likely see only one entry for your main partition. Next, employ `blkid` with the info from GParted to identify the filesystem type—most commonly ext4.

After unmounting, resize the LVM logical volume using:
```
sudo umount /dev/<volumegroup>/<logicalvolume>
sudo lvresize -L 30G -r <volumegroup> /<logicalvolume>
```

If you’re not using older file systems like ext2,3,4 or XFS, omit the `-r` flag and use the appropriate tool. For partitions outside LVM, unmount them in GParted and resize them easily afterward.

Once resized, you can create additional partitions within the LVM or move free space as needed. GParted’s interface is designed to handle these tasks efficiently, making it a solid choice for managing modern storage layouts.

Remember, Linux filesystems like ext4 are ideal here, but if you’re unsure, sticking to basic partitions and testing in virtual environments can save time later.

For those new to this process, avoid overly complex solutions such as LVM unless absolutely necessary. Virtual machines offer a safer sandbox for experimentation.

Lastly, when I first encountered this topic, I spent a lot of time reading it carefully—don’t rush through it. Live and learn!

F
fifu92336
Junior Member
32
11-02-2024, 08:51 AM
#4
Thank you, that's exactly what I intended.
F
fifu92336
11-02-2024, 08:51 AM #4

Thank you, that's exactly what I intended.