0

On Ubuntu 22.04.2. I am attempting to resize the partition containing my /home using free space which exists immediately before/to the left of the current location of the partition. The actual /home is a volume within the partition in question (ditto for root and swap), which may be an artifact from a CentOS installation that previously lived within the partition currently being used for Ubuntu. This partition does not include /boot, which I've made sure lives in a different partition on the same drive.

The output of lsblk -o NAME,MAJ:MIN,SIZE,FSTYPE,MOUNTPOINTS when booted normally:

NAME           MAJ:MIN   SIZE FSTYPE      MOUNTPOINTS
loop0            7:0       4K squashfs    /snap/bare/5
loop1            7:1   243.8M squashfs    /snap/code/119
loop2            7:2   116.8M squashfs    /snap/core/14784
loop3            7:3    55.6M squashfs    /snap/core18/2697
loop4            7:4      62M squashfs    /snap/core20/1587
loop5            7:5    63.3M squashfs    /snap/core20/1822
loop6            7:6    72.9M squashfs    /snap/core22/522
loop7            7:7    81.6M squashfs    /snap/discord/150
loop8            7:8   163.3M squashfs    /snap/firefox/1635
loop9            7:9   240.6M squashfs    /snap/firefox/2356
loop10           7:10   80.7M squashfs    /snap/gmail-app/7
loop11           7:11  164.8M squashfs    /snap/gnome-3-28-1804/161
loop12           7:12    219M squashfs    /snap/gnome-3-34-1804/77
loop13           7:13  400.8M squashfs    /snap/gnome-3-38-2004/112
loop14           7:14  346.3M squashfs    /snap/gnome-3-38-2004/119
loop15           7:15  452.4M squashfs    /snap/gnome-42-2204/56
loop16           7:16   91.7M squashfs    /snap/gtk-common-themes/1535
loop17           7:17  329.5M squashfs    /snap/inkscape/10521
loop18           7:18  100.1M squashfs    /snap/julia/74
loop19           7:19   67.3M squashfs    /snap/jupyter/6
loop20           7:20   10.1M squashfs    /snap/liquidctl/34
loop21           7:21  115.8M squashfs    /snap/slack/68
loop22           7:22   45.9M squashfs    /snap/snap-store/582
loop23           7:23   49.8M squashfs    /snap/snapd/18357
loop24           7:24    304K squashfs    /snap/snapd-desktop-integration/49
loop25           7:25    428K squashfs    /snap/snapd-desktop-integration/57
loop26           7:26  320.4M squashfs    /snap/vlc/3078
sda              8:0     2.7T             
├─sda1           8:1       1M             
├─sda2           8:2      15M             
└─sda3           8:3     2.7T ntfs        /media/ben/HDD
nvme0n1        259:0     1.8T             
├─nvme0n1p1    259:1     499M ext4        /boot
├─nvme0n1p2    259:2      99M vfat        /boot/efi
├─nvme0n1p3    259:3      16M             
├─nvme0n1p4    259:4     1.2T ntfs        
└─nvme0n1p6    259:5   145.5G LVM2_member 
  ├─centos-swap
  │            253:0    14.6G swap        [SWAP]
  ├─centos-home
  │            253:1    80.8G ext4        /home
  └─centos-root
               253:2      50G ext4        /var/snap/firefox/common/host-hunspell
                                          /

When booted from USB:

NAME            MAJ:MIN   SIZE FSTYPE      MOUNTPOINTS
loop0             7:0     2.1G squashfs    /rofs
loop1             7:1      62M squashfs    /snap/core20/1587
loop2             7:2       4K squashfs    /snap/bare/5
loop3             7:3   163.3M squashfs    /snap/firefox/1635
loop4             7:4   400.8M squashfs    /snap/gnome-3-38-2004/112
loop5             7:5    45.9M squashfs    /snap/snap-store/582
loop6             7:6     284K squashfs    /snap/snapd-desktop-integration/14
loop7             7:7      47M squashfs    /snap/snapd/16292
loop8             7:8    91.7M squashfs    /snap/gtk-common-themes/1535
sda               8:0     2.7T             
├─sda1            8:1       1M             
├─sda2            8:2      15M             
└─sda3            8:3     2.7T ntfs        
sdb               8:16   28.7G iso9660     
├─sdb1            8:17    3.6G iso9660     /cdrom
├─sdb2            8:18    4.1M vfat        
├─sdb3            8:19    300K             
└─sdb4            8:20   25.1G ext4        /var/crash
                                           /var/log
nvme0n1         259:0     1.8T             
├─nvme0n1p1     259:1     499M ext4        
├─nvme0n1p2     259:2      99M vfat        
├─nvme0n1p3     259:3      16M             
├─nvme0n1p4     259:4     1.2T ntfs        
└─nvme0n1p6     259:5   145.5G LVM2_member 
  ├─centos-swap 253:0    14.6G swap        
  ├─centos-home 253:1    80.8G ext4        
  └─centos-root 253:2      50G ext4        

and the same after 'deactivating' the partition I want to move in Gparted:

NAME        MAJ:MIN   SIZE FSTYPE      MOUNTPOINTS
loop0         7:0     2.1G squashfs    /rofs
loop1         7:1      62M squashfs    /snap/core20/1587
loop2         7:2       4K squashfs    /snap/bare/5
loop3         7:3   163.3M squashfs    /snap/firefox/1635
loop4         7:4   400.8M squashfs    /snap/gnome-3-38-2004/112
loop5         7:5    45.9M squashfs    /snap/snap-store/582
loop6         7:6     284K squashfs    /snap/snapd-desktop-integration/14
loop7         7:7      47M squashfs    /snap/snapd/16292
loop8         7:8    91.7M squashfs    /snap/gtk-common-themes/1535
sda           8:0     2.7T             
├─sda1        8:1       1M             
├─sda2        8:2      15M             
└─sda3        8:3     2.7T ntfs        
sdb           8:16   28.7G iso9660     
├─sdb1        8:17    3.6G iso9660     /cdrom
├─sdb2        8:18    4.1M vfat        
├─sdb3        8:19    300K             
└─sdb4        8:20   25.1G ext4        /var/crash
                                       /var/log
nvme0n1     259:0     1.8T             
├─nvme0n1p1 259:1     499M ext4        
├─nvme0n1p2 259:2      99M vfat        
├─nvme0n1p3 259:3      16M             
├─nvme0n1p4 259:4     1.2T ntfs        
└─nvme0n1p6 259:5   145.5G LVM2_member 

I loaded Ubuntu 22.04 from a USB, used GParted to "deactivate" the partition (still unclear on the relationship between deactivate and unmount; my intention is to unmount the partition so it can be moved, but unmount is not explicitly provided as an option), queued and applied a move and resize to make the partition in question fill the space preceding it, and acknowledged a warning about not moving /boot before beginning the move. I then receive the below warning:

Partition(s) 6 on ... have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. You should reboot now before making further changes.

This warning gives the option to continue, but it seems unwise to do so. How can I (relatively) safely move and resize my partition?

GParted screenshot. The key symbol is not present when the drive is deactivated, but it generally takes several attempts to actually deactivate it.

0 Answers0