Discussion:
[linux-lvm] seems as if iy should be simple but I'm stuck
Dave Stevens
2015-04-04 01:57:30 UTC
Permalink
I've recovered two drives from a failed raid-10 array and now have a
working degraded array from which I'd like to retrieve data. After
assembling the array I ran fdisk and saw an LVM setup, with
VolGroup00. Running lvscan shows the xen virtual machine names and
disk allocations as they should be. I almost never do anything with
lvm so I thought I'd make a directory and mount the logical volume on
it to check out the data. When I mount /dev/VolGroup00/lvname I am
told I need to specify a filesystem type. But specifying either ext3
or lvms gives errors. I don't see what I need to do. Anyone?

The idea is to move the xen virtual machine to another working
centos-xen machine, start it and do data recovery. I can supply more
details but don't know what is relevant.

Dave
--
"As long as politics is the shadow cast on society by big business,
the attenuation of the shadow will not change the substance."

-- John Dewey
Marian Csontos
2015-04-08 08:58:54 UTC
Permalink
Post by Dave Stevens
I've recovered two drives from a failed raid-10 array and now have a
working degraded array from which I'd like to retrieve data. After
assembling the array I ran fdisk and saw an LVM setup, with VolGroup00.
Running lvscan shows the xen virtual machine names and disk allocations
as they should be. I almost never do anything with lvm so I thought I'd
make a directory and mount the logical volume on it to check out the
data. When I mount /dev/VolGroup00/lvname I am told I need to specify a
filesystem type. But specifying either ext3 or lvms gives errors. I
don't see what I need to do. Anyone?
Depends...

I am not sure if there is any data lost. Supposing there is it is better
to work on copy of data.

If working on the same host you can snapshot the LVs, and work on the
snapshot. As usually keep in mind snapshots are rather slow, and you
should drop/merge them when done with recovery.

Or just dd the LVs to a file (use reasonable large bs, bs=4M makes
sense, as 4M is the default LVM2 extent size), and move (or better copy)
that around as you like.

If you want to peek inside the image and if the format is RAW, which I
suppose it is, the logical volume is a whole disk image with a MBR and a
partition table, kpartx is what you want.

-- Martian
Post by Dave Stevens
The idea is to move the xen virtual machine to another working
centos-xen machine, start it and do data recovery. I can supply more
details but don't know what is relevant.
Dave
Continue reading on narkive:
Loading...