LVM Management (overview)

From vpsget wiki
Revision as of 15:34, 30 September 2015 by Ndi (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


In case of LVM related issues try next:

Scan all disks for partiitions:

lvm pvscan #the same

Scan all disks for volume groups and build /etc/lvmtab and /etc/lvmtab.d/* which are the database for all other lvm commands:

lvm vgscan #the same

Scan all disks for logical volumes

lvm lvscan #the same

Change attributes of a logical volume

lvm lvchange -ay VolGrp_name

Run fsck

fsck -f /dev/VolGrp_name/LogVol00

View :


Usefull link:

Restore VG from backup/archive

Restore lvm partition

  1. lvm IRC channel by kabi_ the solution for others who might find themselves in the same boat:

look in /etc/lvm/archive and find the file that has the information just prior to the destructive act in this text file is a UUID for the volume that has been corrupted boot into rescue disk (or single user mode if the corrupted disk is not your boot volume) and run the following

pvcreate --config 'global{locking_type=0}' --uuid <UUID> --restorefile /etc/lvm/backup/<file containing previous info> /dev/<device>
vgcfgrestore -f /etc/lvm/archive/<file containing previous info> <volume group name>


lvrestore the whole physical volume pv90

  1. less /etc/lvm/archive/


  physical_volumes {
     pv0 {
        id = "BgR0KJ-JClh-T2gS-k6yK-9RGn-B8Ls-LYPQP0"


  1. pvcreate --uuid "BgR0KJ-JClh-T2gS-k6yK-9RGn-B8Ls-LYPQP0" \
 --restorefile /etc/lvm/archive/

Usefull links: