jonnathanclay
April 3rd, 2021, 02:43 AM
Hello community
I am trying to increase the size of a VG and I ran into several problems, these are the steps that I executed:
Add additional disk space. When executing fdisk -l to verify the space it showed me this message:
GPT PMBR size mismatch (41943039 != 62914559) will be corrected by write.The backup GPT table is not on the end of the device. This problem will be corrected by write.
Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors
Disk model: QEMU HARDDISK
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: gpt
Disk identifier: FA3DBA3B-C8B5-45A6-AE60-8FA3EF5C9794
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 25163775 23062528 11G Linux filesystem
I googled and found that I had to enter the parted application to correct it, then I did the following:
root@container:~# partedGNU Parted 3.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
resizepart NUMBER END resize partition NUMBER
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
(parted) print
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 20971520 blocks) or continue with the current setting?
Fix/Ignore? Fix
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 1076MB 1074MB ext4
3 1076MB 12.9GB 11.8GB
It no longer shows me the GPT PMBR message, so I check the volume information
root@container:~# df -h |grep ubuntu--vg-ubuntu
/dev/mapper/ubuntu--vg-ubuntu--lv 11G 8.8G 1.5G 86% /
root@container:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
ubuntu-lv ubuntu-vg -wi-ao---- <11.00g
lv-0 vg0 -wi-ao---- <500.00g
root@container:~# vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 1 0 wz--n- <11.00g 0
vg0 1 1 0 wz--n- <500.00g 0
I try to extend the space of the ubuntu-vg
root@container:~# vgextend ubuntu-vg /dev/sda
Device /dev/sda excluded by a filter.
I check inside the /etc/lvm/lvm.conf file if there is any uncommented filter and I can't find any
Of course this doesn't work either since I don't have free space on the VG
root@container:~# lvextend /dev/ubuntu-vg/ubuntu-lv -l +100%FREE -r Size of logical volume ubuntu-vg/ubuntu-lv unchanged from <11.00 GiB (2815 extents).
Logical volume ubuntu-vg/ubuntu-lv successfully resized.
resize2fs 1.45.5 (07-Jan-2020)
The filesystem is already 2882560 (4k) blocks long. Nothing to do!
I tried this that I read in a corner of the internet that could work
root@container:~# wipefs -a /dev/sda
wipefs: error: /dev/sda: probing initialization failed: Device or resource busy
I don't know what to do anymore, could someone please help me
All of this is happening under Ubuntu 20.04.2
I am trying to increase the size of a VG and I ran into several problems, these are the steps that I executed:
Add additional disk space. When executing fdisk -l to verify the space it showed me this message:
GPT PMBR size mismatch (41943039 != 62914559) will be corrected by write.The backup GPT table is not on the end of the device. This problem will be corrected by write.
Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors
Disk model: QEMU HARDDISK
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: gpt
Disk identifier: FA3DBA3B-C8B5-45A6-AE60-8FA3EF5C9794
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 25163775 23062528 11G Linux filesystem
I googled and found that I had to enter the parted application to correct it, then I did the following:
root@container:~# partedGNU Parted 3.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a particular partition
quit exit program
rescue START END rescue a lost partition near START and END
resizepart NUMBER END resize partition NUMBER
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
(parted) print
Warning: Not all of the space available to /dev/sda appears to be used, you can fix the GPT to use all of the space (an extra 20971520 blocks) or continue with the current setting?
Fix/Ignore? Fix
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 1076MB 1074MB ext4
3 1076MB 12.9GB 11.8GB
It no longer shows me the GPT PMBR message, so I check the volume information
root@container:~# df -h |grep ubuntu--vg-ubuntu
/dev/mapper/ubuntu--vg-ubuntu--lv 11G 8.8G 1.5G 86% /
root@container:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
ubuntu-lv ubuntu-vg -wi-ao---- <11.00g
lv-0 vg0 -wi-ao---- <500.00g
root@container:~# vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 1 0 wz--n- <11.00g 0
vg0 1 1 0 wz--n- <500.00g 0
I try to extend the space of the ubuntu-vg
root@container:~# vgextend ubuntu-vg /dev/sda
Device /dev/sda excluded by a filter.
I check inside the /etc/lvm/lvm.conf file if there is any uncommented filter and I can't find any
Of course this doesn't work either since I don't have free space on the VG
root@container:~# lvextend /dev/ubuntu-vg/ubuntu-lv -l +100%FREE -r Size of logical volume ubuntu-vg/ubuntu-lv unchanged from <11.00 GiB (2815 extents).
Logical volume ubuntu-vg/ubuntu-lv successfully resized.
resize2fs 1.45.5 (07-Jan-2020)
The filesystem is already 2882560 (4k) blocks long. Nothing to do!
I tried this that I read in a corner of the internet that could work
root@container:~# wipefs -a /dev/sda
wipefs: error: /dev/sda: probing initialization failed: Device or resource busy
I don't know what to do anymore, could someone please help me
All of this is happening under Ubuntu 20.04.2