Missing file systems after resizing LVM2 partition

General support questions
Post Reply
User avatar
ramseyrt
Posts: 2
Joined: 2018/09/13 01:21:37
Location: Niceville, FL
Contact:

Missing file systems after resizing LVM2 partition

Post by ramseyrt » 2019/02/12 21:26:51

Hello,

While attempting to copy the contents of a 4TB HD to a 500GB HD, I shrank my LVM2 partition and ended up with an unbootable drive. When booting, I get the following error, "dracut-initqueue[3733]: Warning: dracut-initqueue timeout - starting timeout scripts". This message scrolls down the screen to a counter stating that it will wait indefinitely. Anyway, the system never boots up.

To shrink the LVM2 partition, I booted the 4TB drive in a separate system as a secondary drive (primary drive running 7.4). The LVM2 partition contains the /root, swap, and /home partitions. I had 3.6TB allocated to /home, which only had 50Mb of data, so I decided to shrink it to 5Gb. I used tar to backup /home and then umounted all the LVM filesystems. I then used "lvreduce -L 5G /dev/cl/home" to resize the filesystem. Of course, the XFS filesystem in /home was now broken so I remade the filesystem using "mkfs.xfs /dev/cl/home". With that done, I mounted the filesystem and then untared the user files back into /home. Everything looked great. I must have missed something though because the drive won't boot now. Here's a multitude of outputs run from the rescue disk:

Code: Select all

sh-4.2# fdisk -l
Disk /dev/sda: 4000.8 GB, 4000787030016 bytes, 7814037168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: gpt
Disk identifier: C54FE656-4A8B-4DC2-9B89-5C289F53A787


#         Start          End    Size  Type            Name
 1         2048       411647    200M  Microsoft basic 
 2       411648       821247    200M  EFI System      EFI System Partition
 3       821248      2918399      1G  Microsoft basic 
 4      2918400    221630463  104.3G  Linux LVM       

Disk /dev/loop0: 347 MB, 347414528 bytes, 678544 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 536 MB, 536870912 bytes, 1048576 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/live-rw: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/live-base: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Code: Select all

sh-4.2# ssm list
------------------------------------------------------------
Device           Free     Used      Total  Pool  Mount point
------------------------------------------------------------
/dev/loop0                      331.32 MB                   
/dev/loop1                        2.00 GB                   
/dev/loop2                      512.00 MB                   
/dev/sda                          3.64 TB        PARTITIONED
/dev/sda1                       200.00 MB                   
/dev/sda2                       200.00 MB                   
/dev/sda3                         1.00 GB                   
/dev/sda4   104.29 GB  0.00 KB  104.29 GB  cl               
------------------------------------------------------------
--------------------------------------------------
Pool  Type  Devices       Free     Used      Total  
--------------------------------------------------
cl    lvm   1        104.29 GB  0.00 KB  104.29 GB  
--------------------------------------------------
--------------------------------------------------------------
Volume      Volume size  FS           FS size       Free  Type  
--------------------------------------------------------------
/dev/loop0    331.32 MB  squashfs                               
/dev/loop1      2.00 GB  ext4         2.00 GB  898.83 MB        
/dev/sda2     200.00 MB  vfat                             part  
/dev/sda3       1.00 GB  xfs       1014.00 MB  693.05 MB  part  
--------------------------------------------------------------

Code: Select all

sh-4.2# vgs
  VG #PV #LV #SN Attr   VSize    VFree   
  cl   1   0   0 wz--n- <104.29g <104.29g

Code: Select all

sh-4.2# pvs
  PV         VG Fmt  Attr PSize    PFree   
  /dev/sda4  cl lvm2 a--  <104.29g <104.29g

Code: Select all

sh-4.2# lvs  -o vg_name,lv_name

Code: Select all

sh-4.2# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda4
  VG Name               cl
  PV Size               104.29 GiB / not usable 1.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              26698
  Free PE               26698
  Allocated PE          0
  PV UUID               g2gCIt-9bBo-CRjR-0wgQ-MhP0-Gc0N-y6FG1n

Code: Select all

sh-4.2# vgdisplay
  --- Volume group ---
  VG Name               cl
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  9
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <104.29 GiB
  PE Size               4.00 MiB
  Total PE              26698
  Alloc PE / Size       0 / 0   
  Free  PE / Size       26698 / <104.29 GiB
  VG UUID               NEbYUz-9GdP-Y1lx-k5ou-Gyhg-HF1l-VdqF9F

Code: Select all

sh-4.2# lvdisplay

Code: Select all

sh-4.2# dd if=/dev/sda4 bs=512 count=24 | strings

LABELONE
LVM2 001g2gCIt9bBoCRjR0wgQMhP0Gc0Ny6FG1n
 LVM2 x[5A%r0N*>
cl {
id = "NEbYUz-9GdP-Y1lx-k5ou-Gyhg-HF1l-VdqF9F"
seqno = 1
format = "lvm2"
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "g2gCIt-9bBo-CRjR-0wgQ-MhP0-Gc0N-y6FG1n"
device = "/dev/sda4"
status = ["ALLOCATABLE"]
flags = []
dev_size = 7811117056
pe_start = 2048
pe_count = 953505
# Generated by LVM2 version 2.02.166(2)-RHEL7 (2016-09-28): Tue Aug 14 15:42:46 2018
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost.localdomain"	# Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64
creation_time = 1534261366	# Tue Aug 14 15:42:46 2018
cl {
id = "NEbYUz-9GdP-Y1lx-k5ou-Gyhg-HF1l-VdqF9F"
seqno = 2
format = "lvm2"
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "g2gCIt-9bBo-CRjR-0wgQ-MhP0-Gc0N-y6FG1n"
device = "/dev/sda4"
status = ["ALLOCATABLE"]
flags = []
dev_size = 7811117056
pe_start = 2048
pe_count = 953505
logical_volumes {
root {
id = "li0jF4-glAQ-5u0I-ysPq-wgi1-KpNY-6gBhrr"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1534261366
creation_host = "localhost.localdomain"
segment_count = 1
segment1 {
start_extent = 0
extent_count = 12800
type = "striped"
stripe_count = 1
stripes = [
"pv0", 0
# Generated by LVM2 version 2.02.166(2)-RHEL7 (2016-09-28): Tue Aug 14 15:42:46 2018
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost.localdomain"	# Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64
creation_time = 1534261366	# Tue Aug 14 15:42:46 2018
cl {
id = "NEbYUz-9GdP-Y1lx-k5ou-Gyhg-HF1l-VdqF9F"
seqno = 3
format = "lvm2"
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "g2gCIt-9bBo-CRjR-0wgQ-MhP0-Gc0N-y6FG1n"
device = "/dev/sda4"
status = ["ALLOCATABLE"]
flags = []
dev_size = 7811117056
pe_start = 2048
pe_count = 953505
logical_volumes {
root {
id = "li0jF4-glAQ-5u0I-ysPq-wgi1-KpNY-6gBhrr"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1534261366
creation_host = "localhost.localdomain"
segment_count = 1
segment1 {
start_extent = 0
extent_count = 12800
type = "striped"
stripe_count = 1
stripes = [
"pv0", 0
home {
id = "ldzoHy-yiLb-4QD7-Bsug-IAuC-seO1-t9ojej"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1534261368
creation_host = "localhost.localdomain"
segment_count = 1
segment1 {
start_extent = 0
extent_count = 939681
type = "striped"
stripe_count = 1
stripes = [
"pv0", 12800
# Generated by LVM2 version 2.02.166(2)-RHEL7 (2016-09-28): Tue Aug 14 15:42:48 2018
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost.localdomain"	# Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64
creation_time = 1534261368	# Tue Aug 14 15:42:48 2018
cl {
id = "NEbYUz-9GdP-Y1lx-k5ou-Gyhg-HF1l-VdqF9F"
seqno = 4
format = "lvm2"
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "g2gCIt-9bBo-CRjR-0wgQ-MhP0-Gc0N-y6FG1n"
device = "/dev/sda4"
status = ["ALLOCATABLE"]
flags = []
dev_size = 7811117056
pe_start = 2048
pe_count = 953505
logical_volumes {
root {
id = "li0jF4-glAQ-5u0I-ysPq-wgi1-KpNY-6gBhrr"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1534261366
creation_host = "localhost.localdomain"
segment_count = 1
segment1 {
start_extent = 0
extent_count = 12800
type = "striped"
stripe_count = 1
stripes = [
"pv0", 0
home {
id = "ldzoHy-yiLb-4QD7-Bsug-IAuC-seO1-t9ojej"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1534261368
creation_host = "localhost.localdomain"
segment_count = 1
segment1 {
start_extent = 0
extent_count = 939681
type = "striped"
stripe_count = 1
stripes = [
"pv0", 12800
swap {
id = "ZgayP3-QsBy-gScj-RdSJ-obqo-5WqQ-EgnlE4"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1534261381
creation_host = "localhost.localdomain"
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1024
type = "striped"
stripe_count = 1
stripes = [
"pv0", 952481
# Generated by LVM2 version 2.02.166(2)-RHEL7 (2016-09-28): Tue Aug 14 15:43:01 2018
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost.localdomain"	# Linux localhost.localdomain 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64
creation_time = 1534261381	# Tue Aug 14 15:43:01 2018
cl {
id = "NEbYUz-9GdP-Y1lx-k5ou-Gyhg-HF1l-VdqF9F"
seqno = 5
format = "lvm2"
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "g2gCIt-9bBo-CRjR-0wgQ-MhP0-Gc0N-y6FG1n"
device = "/dev/sda4"
status = ["ALLOCATABLE"]
flags = []
dev_size = 7811117056
pe_start = 2048
pe_count = 953505
logical_volumes {
root {
id = "li0jF4-glAQ-5u0I-ysPq-wgi1-KpNY-6gBhrr"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1534261366
creation_host = "localhost.localdomain"
segment_count = 1
segment1 {
start_extent = 0
extent_count = 12800
type = "striped"
stripe_count = 1
stripes = [
"pv0", 0
home {
id = "ldzoHy-yiLb-4QD7-Bsug-IAuC-seO1-t9ojej"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1534261368
creation_host = "localhost.localdomain"
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1280
type = "striped"
stripe_count = 1
stripes = [
"pv0", 12800
swap {
id = "ZgayP3-QsBy-gScj-RdSJ-obqo-5WqQ-EgnlE4"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1534261381
creation_host = "localhost.localdomain"
segment_count = 1
segment1 {
start_extent = 0
extent_count = 1024
type = "striped"
stripe_count = 1
stripes = [
"pv0", 952481
# Generated by LVM2 version 2.02.166(2)-RHEL7 (2016-11-16): Mon Feb 11 04:05:26 2019
contents = "Text Format Volume Group"
version = 1
description = ""
creation_host = "localhost.localdomain"	# Linux localhost.localdom

Thanks in advance for any help!

Rob

Post Reply