0

I had to reinstall CentOS on a system with a separate disk array for data. I installed on the OS disks and kept the other disk array as storage (so they were not formatted).

When I try to mount the disks, I'm blocked due to unknown filesystem lvm2.

First some background. The system has two arrays of drives. One is for the OS (CentOS 6), the other for Data. Here is the physical disk count on the machine:

#   Description                                     Total Gigs
2   HARD DRIVE, 300GB, SAS6, 10, 2.5, H-CE, E/C      600
6   HARD DRIVE, 600G, SAS6, 10, 2.5, W-SIR, E/C     3600

The two smaller drives are mirrored as 300g - this is where the OS lives.

The volume names are not listed when using pvs

PV          VG       Fmt  Att PSize  PFree
/dev/sda5   vg_mybox lvm2 a-- 276g   0
/dev/sdb1            lvm2 --- 1.8t   1.8t
/dev/sdc1            lvm2 --- 948g   948.67g

The PSize and PFree lines worry me.

Here's output from pvscan

  PV /dev/sda5   VG vg_ursula   lvm2 [276.34 GiB / 0    free]
  PV /dev/sdb1                  lvm2 [1.80 TiB]
  PV /dev/sdc1                  lvm2 [948.67 GiB]
  Total: 3 [3.00 TiB] / in use: 1 [276.34 GiB] / in no VG: 2 [2.73 TiB]

and lvscan

  ACTIVE            '/dev/vg_mybox/LogVol05' [29.30 GiB] inherit
  ACTIVE            '/dev/vg_mybox/LogVol04' [48.83 GiB] inherit
  ACTIVE            '/dev/vg_mybox/LogVol03' [48.83 GiB] inherit
  ACTIVE            '/dev/vg_mybox/lv_root' [111.74 GiB] inherit
  ACTIVE            '/dev/vg_mybox/lv_home' [9.77 GiB] inherit
  ACTIVE            '/dev/vg_mybox/lv_swap' [27.89 GiB] inherit

and vgscan

  Reading all physical volumes.  This may take a while...
  Found volume group "vg_ursula" using metadata type lvm2

and vcgk -vvv

https://gist.github.com/anonymous/25ddd3280a34364fa186

file -s /dev/sdb1

/dev/sdb1: LVM2 (Linux Logical Volume Manager) , UUID: B1bLeFveeDcnfZ2i0tuqWtHgSd6UAgM

file -s /dev/sdc1

/dev/sdc1: LVM2 (Linux Logical Volume Manager) , UUID: SMMVLUKEuBPHuTeoarMkDAlJDDY1Gm2

and

pvdisplay /dev/sdb1

  "/dev/sdb1" is a new physical volume of "1.80 TiB"
  --- NEW Physical volume ---
  PV Name               /dev/sdb1
  VG Name               
  PV Size               1.80 TiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               B1bLeF-veeD-cnfZ-2i0t-uqWt-HgSd-6UAgMA

pvdisplay /dev/sdc1

  "/dev/sdc1" is a new physical volume of "948.67 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/sdc1
  VG Name               
  PV Size               948.67 GiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               SMMVLU-KEuB-PHuT-eoar-MkDA-lJDD-Y1Gm2g

When installing this OS, I only moved the 276g drive to the "Install" list and left the other two as storage only. When I reviewed the format/partition settigns, the two storage drives did not have a check under the Format column.

enter image description here

What are my next steps to mount and get the data?

12
  • Have you enabled lvm on the two unrecognised disks? Commented Sep 23, 2015 at 20:11
  • Haven't done anything yet. Goal #1 is not not destroy any data on those disks.
    – a coder
    Commented Sep 23, 2015 at 20:47
  • Oh... That changes things a bit... what was the file format on the discs pre-install?
    – Gravy
    Commented Sep 23, 2015 at 20:50
  • The disks couldn't have been ext4 if they were lvm containers. Please clarify. Commented Sep 23, 2015 at 21:11
  • Output of vgscan and lvscan -D please Commented Sep 23, 2015 at 21:16

1 Answer 1

0

It is strange that your PVs are not assigned to any VG and all the parameters are zero. Looks like formatted.

1.) Boot SystemRescue CD and test if it can detect the LVs on the disk. So you can backup the data. Run

pvscan
vgchange -ay

If it not works lets see what pvck can tell you:

pvck -d -v /dev/sdb1
pvck -d -v /dev/sdc1

2.) Without knowing where the LV partitions are the FS cannot be mounted. Without FS it's hard to access the files. As last resort you could use file carving tools to save as much data as possible: See scalpel and foremost.

2
  • Tried vgchange -ay last night. The only volume showing afterwards is vg_ursula (per vgscan).
    – a coder
    Commented Sep 24, 2015 at 14:40
  • I'm very familiar with vgcfgbackup now, but did not know to include this in my server backups before. I've already updated my other server backup scripts accordingly. The previous VG config would make my life much easier today. :(
    – a coder
    Commented Sep 24, 2015 at 14:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .