After getting error messages that I was running out of disk space, I looked at the disks and found that the output from fdisk (127.101 GiB) did not coincide with the output from vgdisplay (57.43 GiB).
How can I allocate the full disk space (127.101 GiB) to the VG?
β Volume group β
VG Name qubes_dom0
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 135
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 39
Open LV 11
Max PV 0
Cur PV 1
Act PV 1
VG Size 57.43 GiB
PE Size 4.00 MiB
Total PE 14703
Alloc PE / Size 11765 / <45.96 GiB
Free PE / Size 2938 / <11.48 GiB
VG UUID LHX4Ra-a4Io-X5Lj-2JfQ-A7Vf-tUni-gz4L29
Many problems that people have in Qubes are actually not Qubes specific.
This is one of those.
You can find many guides online to resizing volume groups, and those
should help you. The only Qubes specific part is that you have to do
this in dom0, and take in to account the fact that the disk is
encrypted.
You will also want to determine how you will make use of the new space
most likely you want to extend the lv given over to qubes.
Make sure that you have a backup of your system before you start, if you
have data or config that you care about.
You can create a new partition and add it to the volume group - I would extend the actual partition and then extend the volume group.
If you need specific help with any step , please ask.
I never presume to speak for the Qubes team.
When I comment in the Forum or in the mailing lists I speak for myself.
In fact, there are many descriptions about logical disks, but not related to a) qubes and b) encrypted disks.
My physical partition (/dev/nvme0n1p14), which contains the encrypted lvm, is 128GiB.
You have correctly identified that: I want to extend the lvm to qubes.
I cannot create a new partition because the entire physical partition (/dev/nvme0n1p14, mapped to /dev/mapper/luks-1d8a72d1-87d4-4c04-8a21-20a63699b4b8) contains the encrypted filesystem.
fdisk -l also shows it correctly (127.101 GiB).
The question is, how do I teach vgdisplay that there is still space there?
For me it is incomprehensible where this difference comes from, because during the installation the 128GiB were already there and fully assigned.
It would be best to show the individual steps to increase the VG, but also with referencies (I have not found any) to appropriate documentation I would also be satisfied.
Thanks!
I have decided to restore from a previous backup then:
[@dom0 ~]$ sudo pvcreate /dev/nvme0n1p16
WARNING: Device /dev/mapper/luks-1d8a72d1-87d4-4c04-8a21-20a63699b4b8 has size of 120428544 sectors which is smaller than corresponding PV size of 120453120 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG qubes_dom0 have changed sizes.
WARNING: ext4 signature detected on /dev/nvme0n1p16 at offset 1080. Wipe it? [y/n]: y
Wiping ext4 signature on /dev/nvme0n1p16.
Physical volume β/dev/nvme0n1p16β successfully created.
[@dom0 ~]$ sudo pvdisplay
WARNING: Device /dev/mapper/luks-1d8a72d1-87d4-4c04-8a21-20a63699b4b8 has size of 120428544 sectors which is smaller than corresponding PV size of 120453120 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG qubes_dom0 have changed sizes.
β Physical volume β
PV Name /dev/mapper/luks-1d8a72d1-87d4-4c04-8a21-20a63699b4b8
VG Name qubes_dom0
PV Size <57.44 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 14703
Free PE 2938
Allocated PE 11765
PV UUID H5JLUs-Hfmi-K1jg-VgCz-NxlE-3WOm-vYpvcE
β/dev/nvme0n1p16β is a new physical volume of β<70.56 GiBβ
β NEW Physical volume β
PV Name /dev/nvme0n1p16
VG Name
PV Size <70.56 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID 9WQCoy-BCPi-uA4u-lnmG-6AKD-guu2-3eerhu
[@dom0 ~]$ sudo vgextend /dev/qubes_dom0 /dev/nvme0n1p16
WARNING: Device /dev/mapper/luks-1d8a72d1-87d4-4c04-8a21-20a63699b4b8 has size of 120428544 sectors which is smaller than corresponding PV size of 120453120 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG qubes_dom0 have changed sizes.
WARNING: Device /dev/mapper/luks-1d8a72d1-87d4-4c04-8a21-20a63699b4b8 has size of 120428544 sectors which is smaller than corresponding PV size of 120453120 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG qubes_dom0 have changed sizes.
WARNING: Device /dev/mapper/luks-1d8a72d1-87d4-4c04-8a21-20a63699b4b8 has size of 120428544 sectors which is smaller than corresponding PV size of 120453120 sectors. Was device resized?
Volume group βqubes_dom0β successfully extended
[@dom0 ~]$ sudo vgdisplay
WARNING: Device /dev/mapper/luks-1d8a72d1-87d4-4c04-8a21-20a63699b4b8 has size of 120428544 sectors which is smaller than corresponding PV size of 120453120 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG qubes_dom0 have changed sizes.
β Volume group β
VG Name qubes_dom0
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 236
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 43
Open LV 11
Max PV 0
Cur PV 2
Act PV 2
VG Size 127.99 GiB
PE Size 4.00 MiB
Total PE 32766
Alloc PE / Size 11765 / <45.96 GiB
Free PE / Size 21001 / <82.04 GiB
VG UUID LHX4Ra-a4Io-X5Lj-2JfQ-A7Vf-tUni-gz4L29