[LVM] pit mounted in LVM partition after system reassembly

 

The partition of the original Ubuntu 12.04 server version is as follows.

Disk configuration

 

The glibc upgrade causes the system to restart and cannot be started. After the system is repaired, it is still wrong. The system is then refitted.

In the reassembly project, the original ext4 partition is formatted and LVM is unchanged.

New system disk assignment

 

The system is installed. You can mount access normally after executing the following command.

e2label /dev/vgjenkins/lvjenkins /jenkins

e2label /dev/vgbuild/lvlocaldata /localdata

mkdir  /mnt/jenkins/

mkdir  /mnt/localdata

mount -L /jenkins /mnt/jenkins

mount -L  /localdata /mnt/localdata

Modify / etc/fstab

vim /etc/fstab

#--add below
LABEL=/localdata  /mnt/localdata ext4        defaults,relatime,usrquota,data=writeback                    0       2
LABEL=/jenkins       /mnt/jenkins  ext4        defaults                    0       2

Restart the system and prompt that / locadaldata cannot be mounted. Press S to skip mount and power on. Check LVM configuration as follows

 vgdisplay
  Couldn't find device with uuid n3lryH-nt0A-8H1g-6Dz3-gR43-8DKE-BvRXcc.
  --- Volume group ---
  VG Name               vgbuild
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  5
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                1
  VG Size               6.94 TiB
  PE Size               4.00 MiB
  Total PE              1819968
  Alloc PE / Size       1819592 / 6.94 TiB
  Free  PE / Size       376 / 1.47 GiB
  VG UUID               qM5sXD-YUFC-Ylwq-0VM1-qpI7-OvAc-CLdFJt

  --- Volume group ---
  VG Name               vgjenkins
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               465.66 GiB
  PE Size               4.00 MiB
  Total PE              119209
  Alloc PE / Size       119209 / 465.66 GiB
  Free  PE / Size       0 / 0
  VG UUID               dVGlj7-nF52-csCj-8oMg-tddl-1WtY-Zn7IeW


root@xmbuilder02:~# vgscan
  Reading all physical volumes.  This may take a while...
  Couldn't find device with uuid n3lryH-nt0A-8H1g-6Dz3-gR43-8DKE-BvRXcc.
  Found volume group "vgbuild" using metadata type lvm2
  Found volume group "vgjenkins" using metadata type lvm2
root@xmbuilder02:~# lvscan
  Couldn't find device with uuid n3lryH-nt0A-8H1g-6Dz3-gR43-8DKE-BvRXcc.
  inactive          '/dev/vgbuild/lvlocaldata' [6.94 TiB] inherit
  ACTIVE            '/dev/vgjenkins/lvjenkins' [465.66 GiB] inherit

View uuid of disk

blkid
/dev/sda2: UUID="03da65e6-e9fe-4de1-83a5-ec45c4229e99" TYPE="ext4"
/dev/sda3: UUID="ba1d2701-4239-48e1-a6d5-7cd4290a447a" TYPE="ext4"
/dev/sda4: UUID="98a4a7ae-72de-4808-9cd7-d562e7a60807" TYPE="swap"
/dev/sda5: UUID="c8c55378-f2c4-4bad-a172-f0b6521c3aa8" TYPE="ext4"
/dev/sda6: UUID="ae48f427-4218-4a75-8098-01a3614b9266" TYPE="ext4"
/dev/sda7: UUID="1f366e10-5654-48ae-8bd2-748a9564075e" TYPE="ext4"
/dev/sda8: UUID="cTpMy1-ml54-jMFu-UN09-KR9E-4XT7-gStZ49" TYPE="LVM2_member"
/dev/sda9: UUID="0YRTc9-dBEp-Q6Oc-sqyX-PTzh-oqzj-AVUXHM" TYPE="LVM2_member"
/dev/mapper/vgjenkins-lvjenkins: LABEL="/jenkins" UUID="ef89fd5f-5ac8-4a53-b755-0ef8e297d0de" TYPE="ext4"

 

Tags: jenkins Ubuntu glibc vim

Posted on Sun, 09 Feb 2020 12:08:16 -0500 by Distant_storm