LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 02-22-2019, 02:57 PM   #1
AHMN48
LQ Newbie
 
Registered: Feb 2019
Posts: 6

Rep: Reputation: Disabled
Angry Cannot change VG VolGroup while PVs are missing


Hi Everybody, I'm confused, Tired, searched everywhere on the Internet
I added hard drive to my Centos 6 (VMWare 6.7), then tried to extend volume drive, I will get an error when enter: lvextend /dev/VolGroup/lv_root /dev/sda3
==================
I did everything from here: https://www.tecmint.com/extend-and-r...lvms-in-linux/
==================
now I faced with unknow device in pvdisplay list
can't remove it or can't add it
please someone help me
 
Old 02-22-2019, 03:33 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,155

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
If you don't show us data how can we help. Some of the command output from that article would make sense. Also
Code:
lsblk -f
 
Old 02-22-2019, 03:51 PM   #3
AHMN48
LQ Newbie
 
Registered: Feb 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
NAME FSTYPE LABEL UUID MOUNTPOINT
sr0 iso9660 VMware Tools

sda
├─sda1 ext4 f90f9122-e582-4a8b-acf1-c951c053d03f /boot
├─sda2 LVM2_me lIIlF4-w8JX-ePZT-CDm5-KJu7-HJz3-NAeOzj
│ ├─VolGroup-lv_swap (dm-0) swap e046fa97-1722-44c0-b00f-b46cff9bc2f2 [SWAP]
│ └─VolGroup-lv_root (dm-2) ext4 e2939f8f-cbe6-4b05-92e8-bd636cd3906c /
├─sda3
└─sda4 LVM2_me ngcXom-U7Ic-nYi3-ZAcS-xZaZ-RQvG-yDSj8l
VolGroup-lv_root-missing_1_0 (dm-1)

└─VolGroup-lv_root (dm-2) ext4 e2939f8f-cbe6-4b05-92e8-bd636cd3906c /
=====================================================================
and
=====================================================================
Code:
pvdisplay
/dev/root: read failed after 0 of 4096 at 30639325184: Input/output error
/dev/root: read failed after 0 of 4096 at 30639382528: Input/output error
Couldn't find device with uuid xZ1rkD-prZi-MTlb-LW9X-fsIH-lc5w-pk5IZR.
Couldn't find device with uuid OSVL9y-uzQ6-N0qw-m2mO-FVpG-Wd8l-y2YTWM.
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup
PV Size 15.51 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 3970
Free PE 0
Allocated PE 3970
PV UUID lIIlF4-w8JX-ePZT-CDm5-KJu7-HJz3-NAeOzj

--- Physical volume ---
PV Name unknown device
VG Name VolGroup
PV Size 14.00 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 3583
Free PE 0
Allocated PE 3583
PV UUID xZ1rkD-prZi-MTlb-LW9X-fsIH-lc5w-pk5IZR

--- Physical volume ---
PV Name unknown device
VG Name VolGroup
PV Size 14.00 GiB / not usable 2.04 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 3583
Free PE 3583
Allocated PE 0
PV UUID OSVL9y-uzQ6-N0qw-m2mO-FVpG-Wd8l-y2YTWM

--- Physical volume ---
PV Name /dev/sda4
VG Name VolGroup
PV Size 2.00 GiB / not usable 3.35 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 511
Free PE 511
Allocated PE 0
PV UUID ngcXom-U7Ic-nYi3-ZAcS-xZaZ-RQvG-yDSj8l

Last edited by AHMN48; 02-26-2019 at 05:45 AM.
 
Old 02-22-2019, 03:54 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by AHMN48 View Post
I will get an error when enter: lvextend /dev/VolGroup/lv_root /dev/sda3
You get an error because the command is incorrect. You need to provide the new size of the logical volume, and the second parameter doesn’t make sense.
EDIT: The above paragraph is incorrect, sorry.

Or perhaps you meant vgextend rather than lvextend?

What is the error message?

Last edited by berndbausch; 02-22-2019 at 05:59 PM.
 
Old 02-22-2019, 03:57 PM   #5
AHMN48
LQ Newbie
 
Registered: Feb 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
You get an error because the command is incorrect. You need to provide the new size of the logical volume, and the second parameter doesn’t make sense.

Or perhaps you meant vgextend rather than lvextend?

What is the error message?
Code:
 lvextend /dev/VolGroup/lv_root /dev/sda3
/dev/root: read failed after 0 of 4096 at 30639325184: Input/output error
/dev/root: read failed after 0 of 4096 at 30639382528: Input/output error
Couldn't find device with uuid xZ1rkD-prZi-MTlb-LW9X-fsIH-lc5w-pk5IZR.
Couldn't find device with uuid OSVL9y-uzQ6-N0qw-m2mO-FVpG-Wd8l-y2YTWM.
Cannot change VG VolGroup while PVs are missing.
Consider vgreduce --removemissing.
Cannot process volume group VolGroup
=======================================
and when enter:
======================================
Code:
vgreduce --removemissing --force VolGroup
/dev/root: read failed after 0 of 4096 at 30639325184: Input/output error
/dev/root: read failed after 0 of 4096 at 30639382528: Input/output error
Couldn't find device with uuid xZ1rkD-prZi-MTlb-LW9X-fsIH-lc5w-pk5IZR.
Couldn't find device with uuid OSVL9y-uzQ6-N0qw-m2mO-FVpG-Wd8l-y2YTWM.
Removing partial LV lv_root.
Logical volume VolGroup/lv_root contains a filesystem in use.

Last edited by AHMN48; 02-26-2019 at 05:44 AM. Reason: add comment
 
Old 02-22-2019, 06:10 PM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Can you edit your posts and put [code] and [/code] around the code so that it becomes more readable?

It would seem that by changing the size of the underlying Vmware disk and/or by repartitioning the disk, you overwrote some critical information. For example, you may have overwritten the original partition table, or the physical volume headers of two PVs that are now missing.

It also seems that your root logical volume is partially located on the missing devices. This is why you can't remove the missing PVs.

The data might still be there, but due to the changed partition table or other changes that you applied, it can't be found.

Perhaps this situation is recoverable. For example, there are tools that attempt to find missing partitions on a disk, such as by finding their UUIDs. Depending on the value of the data in the root filesystem, it may not be worthwhile attempting that, and it might be better to just scrap the entire VM and start from the beginning.
 
1 members found this post helpful.
Old 02-26-2019, 05:43 AM   #7
AHMN48
LQ Newbie
 
Registered: Feb 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
Can you edit your posts and put [code] and [/code] around the code so that it becomes more readable?

It would seem that by changing the size of the underlying Vmware disk and/or by repartitioning the disk, you overwrote some critical information. For example, you may have overwritten the original partition table, or the physical volume headers of two PVs that are now missing.

It also seems that your root logical volume is partially located on the missing devices. This is why you can't remove the missing PVs.

The data might still be there, but due to the changed partition table or other changes that you applied, it can't be found.

Perhaps this situation is recoverable. For example, there are tools that attempt to find missing partitions on a disk, such as by finding their UUIDs. Depending on the value of the data in the root filesystem, it may not be worthwhile attempting that, and it might be better to just scrap the entire VM and start from the beginning.
I can't change server, because I have installed script already bought it, who's sold me script unreachable and without him, I don't know how can I install script again on my server, can you help me about that?
 
Old 03-08-2019, 08:24 AM   #8
tyler2016
Member
 
Registered: Sep 2018
Distribution: Debian, CentOS, FreeBSD
Posts: 243

Rep: Reputation: Disabled
If you added a new drive, it shouldn't be showing up as /dev/sda, it will be /dev/sdb. Did you mess with the partition table on /dev/sda? The tutorial is showing the process as adding a new partition to a disk that isn't fully used. If you messed with the partition table of your /dev/sda and it was fully allocated, you may have hosed your system. Did you run the commands EXACTLY as they showed, including fdisk? If you did, you might have to reformat and reinstall? Can you post the output of the following commands run as root:

lsblk
pvdisplay
vgdisplay
lvdisplay
cat /etc/fstab

Last edited by tyler2016; 03-08-2019 at 08:30 AM.
 
Old 03-27-2019, 11:28 AM   #9
AHMN48
LQ Newbie
 
Registered: Feb 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Lightbulb

Quote:
Originally Posted by tyler2016 View Post
If you added a new drive, it shouldn't be showing up as /dev/sda, it will be /dev/sdb. Did you mess with the partition table on /dev/sda? The tutorial is showing the process as adding a new partition to a disk that isn't fully used. If you messed with the partition table of your /dev/sda and it was fully allocated, you may have hosed your system. Did you run the commands EXACTLY as they showed, including fdisk? If you did, you might have to reformat and reinstall? Can you post the output of the following commands run as root:

lsblk
pvdisplay
vgdisplay
lvdisplay
cat /etc/fstab
Thanks, here is the results:
Code:
 lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
sda 8:0 0 32G 0 disk
├─sda1 8:1 0 500M 0 part /boot
├─sda2 8:2 0 15.5G 0 part
│ ├─VolGroup-lv_swap (dm-0) 253:0 0 992M 0 lvm [SWAP]
│ └─VolGroup-lv_root (dm-2) 253:2 0 28.5G 0 lvm /
├─sda3 8:3 0 14G 0 part
└─sda4 8:4 0 2G 0 part
VolGroup-lv_root-missing_1_0 (dm-1) 253:1 0 14G 0 lvm
└─VolGroup-lv_root (dm-2) 253:2 0 28.5G 0 lvm /
Code:
 pvdisplay
/dev/root: read failed after 0 of 4096 at 30639325184: Input/output error
/dev/root: read failed after 0 of 4096 at 30639382528: Input/output error
Couldn't find device with uuid xZ1rkD-prZi-MTlb-LW9X-fsIH-lc5w-pk5IZR.
Couldn't find device with uuid OSVL9y-uzQ6-N0qw-m2mO-FVpG-Wd8l-y2YTWM.
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGroup
PV Size 15.51 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 3970
Free PE 0
Allocated PE 3970
PV UUID lIIlF4-w8JX-ePZT-CDm5-KJu7-HJz3-NAeOzj

--- Physical volume ---
PV Name unknown device
VG Name VolGroup
PV Size 14.00 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 3583
Free PE 0
Allocated PE 3583
PV UUID xZ1rkD-prZi-MTlb-LW9X-fsIH-lc5w-pk5IZR

--- Physical volume ---
PV Name unknown device
VG Name VolGroup
PV Size 14.00 GiB / not usable 2.04 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 3583
Free PE 3583
Allocated PE 0
PV UUID OSVL9y-uzQ6-N0qw-m2mO-FVpG-Wd8l-y2YTWM

--- Physical volume ---
PV Name /dev/sda4
VG Name VolGroup
PV Size 2.00 GiB / not usable 3.35 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 511
Free PE 511
Allocated PE 0
PV UUID ngcXom-U7Ic-nYi3-ZAcS-xZaZ-RQvG-yDSj8l

Code:
 vgdisplay
/dev/root: read failed after 0 of 4096 at 30639325184: Input/output error
/dev/root: read failed after 0 of 4096 at 30639382528: Input/output error
Couldn't find device with uuid xZ1rkD-prZi-MTlb-LW9X-fsIH-lc5w-pk5IZR.
Couldn't find device with uuid OSVL9y-uzQ6-N0qw-m2mO-FVpG-Wd8l-y2YTWM.
--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 14
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 4
Act PV 2
VG Size 45.50 GiB
PE Size 4.00 MiB
Total PE 11647
Alloc PE / Size 7553 / 29.50 GiB
Free PE / Size 4094 / 15.99 GiB
VG UUID mEILPU-5P7m-nh8g-2fxW-d23s-48Ml-Bfce22
Code:
 lvdisplay
/dev/root: read failed after 0 of 4096 at 30639325184: Input/output error
/dev/root: read failed after 0 of 4096 at 30639382528: Input/output error
Couldn't find device with uuid xZ1rkD-prZi-MTlb-LW9X-fsIH-lc5w-pk5IZR.
Couldn't find device with uuid OSVL9y-uzQ6-N0qw-m2mO-FVpG-Wd8l-y2YTWM.
--- Logical volume ---
LV Path /dev/VolGroup/lv_root
LV Name lv_root
VG Name VolGroup
LV UUID WXeRC0-tQbs-Ggf1-3g38-WVwq-Rjl9-OLkG76
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2015-11-01 10:12:53 +0330
LV Status available
# open 1
LV Size 28.54 GiB
Current LE 7305
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Path /dev/VolGroup/lv_swap
LV Name lv_swap
VG Name VolGroup
LV UUID fzGChQ-yF59-jBHi-PD8t-3ER1-I7q6-Y5VByD
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2015-11-01 10:13:03 +0330
LV Status available
# open 1
LV Size 992.00 MiB
Current LE 248
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
=========================================
please help me about that, thanks a lot
 
Old 03-27-2019, 12:12 PM   #10
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
How big was the volume that you attached?
 
Old 03-27-2019, 12:14 PM   #11
AHMN48
LQ Newbie
 
Registered: Feb 2019
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dc.901 View Post
How big was the volume that you attached?
My Hard was 15GB, one time extended to 18GB, then extended to 32GB
now it's 32 GB, but still, show as 15GB
can you help me about that?
 
Old 03-27-2019, 01:31 PM   #12
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Quote:
Originally Posted by AHMN48 View Post
My Hard was 15GB, one time extended to 18GB, then extended to 32GB
now it's 32 GB, but still, show as 15GB
can you help me about that?

In your earlier post of vgdisplay command output, I see:
Code:
  Alloc PE / Size       7553 / 29.50 GiB
  Free  PE / Size       4094 / 15.99 GiB
So, now, next part is to extend the logical volume.
Example on this link will get you there: https://access.redhat.com/solutions/44089


And in future, please wrap the output of commands in code tags; otherwise it is very difficult to read the results.
 
Old 03-27-2019, 01:33 PM   #13
dc.901
Senior Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS/RHEL, openSuSE/SLES, Ubuntu
Posts: 1,005

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Also, make sure you have good backups!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot change VG root_vg while PVs are missing. mlewis000 Linux - Newbie 1 09-07-2016 04:03 AM
restore lost LVM on md0 (1 PVs marked as missing) eRJe Slackware 3 01-14-2014 06:01 PM
grub-install cannot find device VolGroup on a ext4 partition superolmo Linux - Newbie 2 01-27-2012 08:11 PM
move VolGroup-lv-home to VolGroup-lv-root dmb2002man Linux - Newbie 11 08-19-2011 08:22 AM
Is there a way to resize PVs in LVM 1.0.8? Ken-ji Linux - Software 0 02-12-2006 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 02:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration