0

Before anyone marks this as a duplicate, please bear with me - I'm pulling my hair for a good amount of time and went through all the other questions but I can't seem to find an answer coping with the exact same problem.

I'm on Ubuntu Server 18.04 LTS. I changed a 32GB SSD to a 500GB HDD by dd-cloning it and fixed the partition-table and extended the partition size with parted.

Now, I want to make use of all new available space. I did

sudo vgextend ubuntu-vg /dev/sda3

but I get "Can't open /dev/sda3 exclusively. Mounted filesystem?"

I guess I'm not seeing the bigger picture here because I lack the experience in this context.

Here's some more output, looking for a bit of input to help me understand what's going on. Thanks!

sudo partprobe /dev/sda3  

sudo partprobe /dev/sda3 Error: Partition(s) 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 on /dev/sda3 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.

A reboot doesn't affect this message.

sudo fdisk -l

Disk /dev/loop0: 91 MiB, 95408128 bytes, 186344 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop1: 91.1 MiB, 95494144 bytes, 186512 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/loop2: 89.5 MiB, 93835264 bytes, 183272 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: E63DDDF3-F746-41FF-8E31-611F4891E2A8

Device Start End Sectors Size Type /dev/sda1 2048 4095 2048 1M BIOS boot /dev/sda2 4096 2101247 2097152 1G Linux filesystem /dev/sda3 2101248 976562500 974461253 464.7G Linux filesystem

Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 12.6 GiB, 13463715840 bytes, 26296320 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

sudo pvscan

PV /dev/sda3 VG ubuntu-vg lvm2 [28.81 GiB / 16.27 GiB free] Total: 1 [28.81 GiB] / in use: 1 [28.81 GiB] / in no VG: 0 [0 ]

sudo vgscan

Reading volume groups from cache. Found volume group "ubuntu-vg" using metadata type lvm2

sudo lvscan

ACTIVE '/dev/ubuntu-vg/ubuntu-lv' [<12.54 GiB] inherit

df

Filesystem 1K-blocks Used Available Use% Mounted on udev 3987928 0
3987928 0% /dev tmpfs 803708 2664 801044 1% /run /dev/mapper/ubuntu--vg-ubuntu--lv 12874848 6635588
5656332 54% / tmpfs 4018532 0
4018532 0% /dev/shm tmpfs 5120
4 5116 1% /run/lock tmpfs 4018532 0 4018532 0% /sys/fs/cgroup /dev/loop0
93184 93184 0 100% /snap/core/6350 /dev/loop2
91648 91648 0 100% /snap/core/6130 /dev/loop1
93312 93312 0 100% /snap/core/6259 /dev/sda2
999320 208868 721640 23% /boot tmpfs
803704 8 803696 1% /run/user/1000

  • You can't make changes to partitions that are mounted and in use. – GabrielaGarcia Feb 9 at 20:30
  • I forgot to mention that I can't unmount sda.. sudo umount -l /dev/sda3 umount: /dev/sda3: not mounted. When I check for processes that use sda I get no output: fuser -m -v /dev/sda3 – Alex Feb 9 at 20:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.