** Description changed:

  LVM can be enlarged for attached disk drives with Ubuntu installed[1]
  but they can not be shrunken:
  
  gparted 1.3.1 (tested with Ubuntu 23.04 as host OS)[1] status:
  * Attached a disk drive with Ubuntu Server 22.04 installed: CAN shrink LVM2 PV
      Bug attachment references:
      * Ubuntu-server_22.04-LVM-screenshot_1.png
      * Ubuntu-server_22.04-LVM-screenshot_2.png
      * Ubuntu-server_22.04-LVM-screenshot_3.png
  * Attached a disk drive with Ubuntu 22.04 installed: Can not shrink LVM2 PV
      Bug attachment references:
      * Ubuntu_22.04_with_LVM-screenshot_1.png
      * Ubuntu_22.04_with_LVM-screenshot_2.png
  * Attached a disk drive with Ubuntu 23.04 installed: Can not shrink LVM2 PV
      Bug attachment references:
      * Ubuntu_23.04_with_LVM-screenshot_1.png
      * Ubuntu_23.04_with_LVM-screenshot_2.png
  
  This bug prevents people to make default partition installations of Ubuntu 
with LVM, and then shrink the file system, which is useful if you want to save 
disk image (.img) files. To circumvent the issue, one could
  * Buy small SSD drives (16-32 GB), and fill them
  * Or 1) perform installation on typical large SSD drives. 2) Create partition 
images of only the used space, to shrink the disk image size in the next step. 
3) Create a disk image.
  
  # Temporary workarounds
  
  ## Mount the disk in a live distro
  
- ### lvreduce/lvextend
- 
https://trisquel.info/en/wiki/how-resize-trisquels-default-encrypted-partitions
- 
  ### Run gParted on other installations
  
  Works:
  * Boot Ubuntu live distro
  * Use gParted to shrink the LVM on the disk
  
  Works:
  * Install trisquel on a dedicated disk and boot it.
  * Use gParted to shrink the LVM on the disk. It will work because Trisquel is 
using "vgtrisquel" as VG name, not "vgubuntu", so they won't overlap.
  
  Does not work:
  * Boot another disk with Ubuntu installed
  * gParted will not be able to shrink the LVM, because the LVM name is already 
occupied by the booted distro.
  * To circumvent this issue, I have proposed "Add unique VG name to avoid 
activating multiple VGs with the same name from multiple disk" - 
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/2023970 — please vote 
on it.
  
+ ### Run lvreduce/lvextend from a live distro
+ 
https://trisquel.info/en/wiki/how-resize-trisquels-default-encrypted-partitions
+ 
  # References
  1: LVM can be enlarged:
      Bug attachment references:
      * Ubuntu_22.04_with_LVM (disk image restored to a much larger disk than 
the disk image to demonstrate that the LVM can be enlarged) -screenshot_1.png
      * Ubuntu_22.04_with_LVM (disk image restored to a much larger disk than 
the disk image to demonstrate that the LVM can be enlarged) -screenshot_2.png
      * Ubuntu_22.04_with_LVM (disk image restored to a much larger disk than 
the disk image to demonstrate that the LVM can be enlarged) -screenshot_3.png
      * Ubuntu_22.04_with_LVM (disk image restored to a much larger disk than 
the disk image to demonstrate that the LVM can be enlarged) -screenshot_4.png
      * Ubuntu_22.04_with_LVM (disk image restored to a much larger disk than 
the disk image to demonstrate that the LVM can be enlarged) -screenshot_5.png

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2023637

Title:
  Can shrink LVM2 PV file system in Ubuntu Server 22.04 but not in
  Ubuntu 22.04/23.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/2023637/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to