1

This concerns Ubuntu 16.04 configured with LVM2, all under VMWare. Physical volumes are VMWare virtual disks (VMDKs). The machine was often running out of space on /root during upgrades. Although it is a home machine, it does run all the core services for the home. Foolishly, I do not have a backup. This machine started as running non-essential services, but grew to become indispensable. It runs our home DNS, which has become quite important to the family. I deferred implementing a backup scheme too long.

Now, I've duplicated the VMDKs so I can work on a working copy with minimal further risk of loss.

I was attempting to add more space to the partition containing /root. I had added a new physical volume and extended the volume group to include the new disk. I then attempted to resize the partition using gparted using a live cd boot image. Somehow, I've corrupted the volume group so no logical volumes display.

The original machine won't boot, so I created a new virtual machine (VM) and moved the "physical" drives to the new machine and attempted to import the physical volumes and their included volume groups and logical volumes:

root@linuxdesktop:~# pvscan
PV /dev/sdb3   VG base-vg         lvm2 [49.26 GiB / 49.26 GiB free]
PV /dev/sdc1   VG base-vg         lvm2 [20.00 GiB / 20.00 GiB free]
PV /dev/sdd1                      lvm2 [1023.00 MiB]
Total: 3 [70.25 GiB] / in use: 2 [69.25 GiB] / in no VG: 1 [1023.00 MiB]

pvscan shows physical disk /dev/sdd1 is not part of any volume group. Later, when things are working, I can backup, then delete the unused physical disk.

Next, I scanned for volume groups. I believe I just ran vgscan, but I've run it in -v (verbose) mode here to clear the cache:

vgscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Reading volume groups from cache.
Found volume group "base-vg" using metadata type lvm2

vgdisplay displays details of known volume groups:

root@linuxdesktop:~# vgdisplay
--- Volume group ---
VG Name               base-vg
System ID
Format                lvm2
Metadata Areas        2
Metadata Sequence No  10
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                0
Open LV               0
Max PV                0
Cur PV                2
Act PV                2
VG Size               69.25 GiB
PE Size               4.00 MiB
Total PE              17729
Alloc PE / Size       0 / 0
Free  PE / Size       17729 / 69.25 GiB
VG UUID               5XhEhi-1S2Z-yHn0-citP-aUGu-Qs8V-nAubjk

Two physical volumes are listed, but no logical volumes show. This volume group should contain volumes. Is there a way to search for the volume information and recreate or recover it? Am I missing something simple in the processes of adding LVM elements?

0

You must log in to answer this question.

Browse other questions tagged .