Score:1

How to resize and shrink the sole root mount LVM physical volume?

pl flag
sof

I've selected LVM default option and completed Ubuntu 22.04 installation, but failed to resize and shrink the sole root mount LVM physical volume afterwards.

Method 1:

# mount -t ext4
/dev/mapper/vgubuntu-root on /

# pvscan
PV /dev/sda2 VG vgubuntu lvm2 [SIZE]  
Total: 1 [SIZE]

# resize2fs -p /dev/vgubuntu/root [NEW_SIZE]
Online shrinking not supported.
(Note: NEW_SIZE is smaller yet big enough.)

# umount /dev/vgubuntu/root
target is busy.

# pvresize --setphysicalvolumesize [NEW_SIZE] /dev/sda2
cannot resize to [SMALL_NUM] extents as [NUM] are allocated.

Method 2: open Disks GUI, but Resize... option grayed out on /dev/vgubuntu/root.

Method 3: open GParted GUI, can't shrink /dev/sda2 despite Resize/Move option available.

Method 4: boot into recovery/maintenance mode, same as Method 1

So, how to resize and shrink it to make a second physical partition?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.