Hjelp med å utvide partisjon på Ubuntu server

Les hele artikkelen

Kjører en ubuntu server på esxi og har behov for å utvide den da 10GB ikke lenger er stort nok for å kjøre progravaren «Home-Assistant».
 
Jeg prøver og følge denne guiden:
https://ma.ttias.be/increase-a-vmware-disk-size-vmdk-formatted-as-linux-lvm-without-rebooting/
 
Men ved punkt «Extend your Logical Volume with the new partition» så sliter jeg.
Dette har jeg gjort:

Spoiler

flemmingss@Home-Assistant:~$ ls  /sys/class/scsi_host/
host0   host11  host14  host17  host2   host22  host25  host28  host30  host4  host7
host1   host12  host15  host18  host20  host23  host26  host29  host31  host5  host8
host10  host13  host16  host19  host21  host24  host27  host3   host32  host6  host9
flemmingss@Home-Assistant:~$ fdisk -l
fdisk: cannot open /dev/sda: Permission denied
fdisk: cannot open /dev/mapper/Home--Assistant--vg-root: Permission denied
fdisk: cannot open /dev/mapper/Home--Assistant--vg-swap_1: Permission denied
flemmingss@Home-Assistant:~$ sudo fdisk -l
[sudo] password for flemmingss:
Disk /dev/sda: 24 GiB, 25769803776 bytes, 50331648 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
Disklabel type: dos
Disk identifier: 0xfce72dba
 
Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1  *       2048   999423   997376  487M 83 Linux
/dev/sda2       1001470 20969471 19968002  9.5G  5 Extended
/dev/sda5       1001472 20969471 19968000  9.5G 8e Linux LVM
 
 
 
 
Disk /dev/mapper/Home--Assistant--vg-root: 8.8 GiB, 9395240960 bytes, 18350080 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/mapper/Home--Assistant--vg-swap_1: 764 MiB, 801112064 bytes, 1564672 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
flemmingss@Home-Assistant:~$ fdisk /dev/sda
 
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
fdisk: cannot open /dev/sda: Permission denied
flemmingss@Home-Assistant:~$ sudo fdisk /dev/sda
 
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
 
Command (m for help): n
Partition type
   p   primary (1 primary, 1 extended, 2 free)
   l   logical (numbered from 5)
Select (default p): p
Partition number (3,4, default 3): 3
First sector (999424-50331647, default 999424):
Last sector, +sectors or +size{K,M,G,T,P} (999424-1001469, default 1001469):
 
Created a new partition 3 of type 'Linux' and of size 1023 KiB.
 
Command (m for help): t
Partition number (1-3,5, default 5): 3
Partition type (type L to list all types): 8e
 
Changed type of partition 'Linux' to 'Linux LVM'.
 
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy
 
The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).
 
flemmingss@Home-Assistant:~$
 
***REBOOT****

 
Og dette skjer om jeg prøver utvide volumet:
 

flemmingss@Home-Assistant:~$ sudo vgextend Home-Assistant-vg /dev/sda3
  Device /dev/sda3 not found (or ignored by filtering).
  Unable to add physical volume '/dev/sda3' to volume group 'Home-Assistant-vg'.

 

 
Status per nå:

fdisk -l

Spoiler

flemmingss@Home-Assistant:~$ sudo fdisk -l
Disk /dev/sda: 24 GiB, 25769803776 bytes, 50331648 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
Disklabel type: dos
Disk identifier: 0xfce72dba

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1  *       2048   999423   997376  487M 83 Linux
/dev/sda2       1001470 20969471 19968002  9.5G  5 Extended
/dev/sda3        999424  1001469     2046 1023K 8e Linux LVM
/dev/sda5       1001472 20969471 19968000  9.5G 8e Linux LVM

Partition table entries are not in disk order.


Disk /dev/mapper/Home--Assistant--vg-root: 8.8 GiB, 9395240960 bytes, 18350080 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/mapper/Home--Assistant--vg-swap_1: 764 MiB, 801112064 bytes, 1564672 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
flemmingss@Home-Assistant:~$

pvscan

Spoiler

flemmingss@Home-Assistant:~$ sudo pvscan
  PV /dev/sda5   VG Home-Assistant-vg   lvm2 [9.52 GiB / 24.00 MiB free]
  Total: 1 [9.52 GiB] / in use: 1 [9.52 GiB] / in no VG: 0 [0   ]

vgdisplay

Spoiler

flemmingss@Home-Assistant:~$ sudo vgdisplay
  --- Volume group ---
  VG Name               Home-Assistant-vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  3
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               9.52 GiB
  PE Size               4.00 MiB
  Total PE              2437
  Alloc PE / Size       2431 / 9.50 GiB
  Free  PE / Size       6 / 24.00 MiB
  VG UUID               0wPc92-CBZG-mYBJ-vIpk-JYrO-uyij-c53LNq

Noen som har noen gode ideer? Det hadde jeg satt pris på.