LVM, Troubles with adding another Disk


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users LVM, Troubles with adding another Disk
# 1  
Old 09-09-2014
LVM, Troubles with adding another Disk

I am having trouble with LVM and one of my physical volumes.

Using Ubuntu Desktop 14.04

I was trying to set up LVM across two disks (not containing the OS or Home).

First I created the initial Physical Volume, the Volume Group, and the Logical volume, and everything seemed fine. The problem occurred after trying to add the second disk. During the course of this, I managed to screw up the entire thing. Now I have a physical volume that is in a sort of limbo.

If I check the Volume Group, it says /dev/sda is in the volume group. See the end of the following:

Code:
sudo vgdisplay -v
    Finding all volume groups
  Incorrect metadata area header checksum on /dev/sda at offset 4096
    Finding volume group "lvmglr"
  Incorrect metadata area header checksum on /dev/sda at offset 4096
  --- Volume group ---
  VG Name               lvmglr
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               6.37 TiB
  PE Size               4.00 MiB
  Total PE              1669257
  Alloc PE / Size       1669257 / 6.37 TiB
  Free  PE / Size       0 / 0
  VG UUID               fo3J0d-4Fx2-aGxs-4LA7-Dd1F-T7EM-4WNcyN

  --- Logical volume ---
  LV Path                /dev/lvmglr/Storage
  LV Name                Storage
  VG Name                lvmglr
  LV UUID                jvRh2S-yfgm-AYQr-z13N-MEHB-lxih-eFx07H
  LV Write Access        read/write
  LV Creation host, time jaypc, 2014-09-07 11:17:18 -0400
  LV Status              available
  # open                 0
  LV Size                6.37 TiB
  Current LE             1669257
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:0

  --- Physical volumes ---
  PV Name               /dev/sdg
  PV UUID               JZHnOJ-BXd1-TPHF-udMI-c7lM-4kYz-4yeeB3
  PV Status             allocatable
  Total PE / Free PE    953861 / 0

  PV Name               /dev/sda
  PV UUID               5oMQWz-WreT-OyWd-Oy5b-OrvQ-1YOh-QsnW30
  PV Status             allocatable
  Total PE / Free PE    715396 / 0

However, if I check out the physical volume itself, it says it is not in any volume group. So right there it is not consistent, because the Volume Group reports it already contains /dev/sda, but /dev/sda reports that it is not in any Volume Group:

Code:
sudo pvdisplay -v /dev/sda
    Using physical volume(s) on command line
  Incorrect metadata area header checksum on /dev/sda at offset 4096
    Wiping cache of LVM-capable devices
  "/dev/sda" is a new physical volume of "2.73 TiB"
  --- NEW Physical volume ---
  PV Name               /dev/sda
  VG Name
  PV Size               2.73 TiB
  Allocatable           NO
  PE Size               0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               5oMQWz-WreT-OyWd-Oy5b-OrvQ-1YOh-QsnW30

It now is impossible to reduce:

Code:
sudo vgreduce -v lvmglr /dev/sda
    Finding volume group "lvmglr"
  Incorrect metadata area header checksum on /dev/sda at offset 4096
  Incorrect metadata area header checksum on /dev/sda at offset 4096
    Using physical volume(s) on command line
  Physical volume "/dev/sda" still in use

Still in use, so I tried the following to move the extants on the drive elsewhere:

Code:
sudo pvmove -v -n lvmglr /dev/sda
  Incorrect metadata area header checksum on /dev/sda at offset 4096
    Wiping cache of LVM-capable devices
  Physical volume /dev/sda not in a volume group
  Run `pvmove --help' for more information.

This shows /dev/sda not in group. I can't even force removal:

Code:
sudo pvremove -v -ff /dev/sda
  Incorrect metadata area header checksum on /dev/sda at offset 4096
    Wiping cache of LVM-capable devices
  Can't open /dev/sda exclusively - not removing. Mounted filesystem?

and the file system is definitely not mounted.

There is also the matter of the metadata header checksum error which I constantly get.

At this point, I am trying to remove /dev/sda from the volume group lvmglr, so I can retry adding it again.

I am looking for any help I can get on this, because now I am stuck and can progress no further.
# 2  
Old 09-09-2014
What does pvck report for that physical volume?
# 3  
Old 09-13-2014
run the following
pvscan
vgscan
lvscan
vgs
lvs
pvs

See what that shows. If all else fails you can look at running a vgcfgbackup and vgcfgrestore with choose the config in /etc/lvm that is good. The tree looks like this.
ls -R /etc/lvm
/etc/lvm:
archive backup cache lvm.conf

/etc/lvm/archive:
vg_root_00000-1774443783.vg

/etc/lvm/backup:
vg_root

/etc/lvm/cache:

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

[REDHAT7] Adding LVM volume

Dear community, is it possible to add more volumes to actual LVM disk? I have the following: # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 120G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 ... (0 Replies)
Discussion started by: Lord Spectre
0 Replies

2. HP-UX

LVM: is possible to replace a disk?

Scenario1: VG00 lvm,not mirrored,2 disk of 36GB vg size VG00 size is under 30G. Is possible to remove a disk of 36GB and replace "on fly" with a disk of 300GB on VG00? Thanks (6 Replies)
Discussion started by: Linusolaradm1
6 Replies

3. UNIX for Advanced & Expert Users

LVM - restore metadata on other disk

Hi guys, I would like to ask your opinion about my theory, how to fix my broken LVM without risking any data loss. I use Archlinux at home. I just love this distro, even it gives me a lots of work (particularly after system updates). Basic system spec: AMD FX(tm)-6100 Six-Core Processor... (1 Reply)
Discussion started by: lyynxxx
1 Replies

4. Filesystems, Disks and Memory

LVM recovery, Hard disk broken

Hi I am new on your forum, because I need some help. I have a server with debian and proxmox 2. The HardDisk is broken. I am in rescue mode, and I can't mount LVM partition to recover my backups. What I've already done : # fdisk -l Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 255... (0 Replies)
Discussion started by: pppplu
0 Replies

5. Solaris

Solaris 11 x86 installation troubles - 8G disk limit

Hi, I am trying to install Solaris 11 on an X86 machine. I am using the text install iso image burned to an optical disk. The system contains a single 500G SATA drive. When the system attempts to detect local disks, it reports that the disk only has a capacity of 8GB. How do I get... (2 Replies)
Discussion started by: jpoc
2 Replies

6. Linux

About shrinking LVM and then adding the freed space to another OS on dualboot system

Hi all, Fedora 17, 64bit Ubuntu 12.04 desktop 64bit HD 160G I installed Ubuntu 12.04 on the HD first taking up the whole disc. Later I added/installed Fedora 17 selecting the "Shrink" option and save the bootloader on /dev/sda1 to make them dualboot. Installation is successful with... (0 Replies)
Discussion started by: satimis
0 Replies

7. HP-UX

Remove Faulty disk from HP-UX LVM VG

Requirement to remove a faulty mirrored disk from hp-ux LVM <root@pdwp1s>/etc # vgdisplay -v /dev/vg00 vgdisplay: Warning: couldn't query physical volume "/dev/dsk/c2t0d0": The specified path does not correspond to physical volume attached to this volume group vgdisplay: Warning: couldn't... (9 Replies)
Discussion started by: Shirishlnx
9 Replies

8. AIX

Disk I/O Issue using LVM

We have a filesystem which contains 8 hard disks but i am facing disk I/O issue becuase data is not spreading across all the disks.Is there any way i can check how data is spreading and any parameter we need to change to spread ata across all disks. OS--AIX 5.3 (1 Reply)
Discussion started by: ukatru
1 Replies

9. AIX

disk space shortage, how to migrate to LVM?

Hello I'm working on AIX 6.1. I inherited something I do not know and now I need to bring it into the line. # df -m Filesystem MB blocks Free %Used Mounted on /dev/hd4 | 256.00 | 87.09 | 66% / /dev/hd2 | 4608.00 | 82.45 | 99%... (11 Replies)
Discussion started by: michalwu
11 Replies

10. HP-UX

disk adding through lvm

Hi dear(s) Can u explain how to add a disk through lvm with commands. I need to add a 9 gb scsi HS disk to a Hp D class 9000 server. (2 Replies)
Discussion started by: sreekumar.R
2 Replies
Login or Register to Ask a Question