[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] how to recover lvm after OS re-install



On Sat, 15 Mar 2008, lemon lemon wrote:

> Now struggling to recover the logical volume I had before the server crash.
> It is full of files, data etc. OS was not (and is not) on that hard disk.
> That is a separate data partition (actually a hard raid array). There is no
> any hard disk failure. And, I didn't formatted this disk during re-install
> OS. So, I think, the data should be there untouched.

So far so good.

> What I did:
> #pvcreate /dev/sdc
> #vgcreate -s 32M raid_vg0 /dev/sdc (I used the same PE size as before)
> #lvcreate -l 23839 -n raid_lv0 raid_vg0 (maximum extents from vgdisplay)

That, however, just wiped out your data.  Why did you do that???

> Unfortunately, it complains when mounting raid_lv0:
> #mount: you must specify the filesystem type

Yep, you wiped out the filesystem.

> Obviously, if I format it, there will be no problem in mounting, but will
> lose all the data on it. 

You've wiped the super block, so recovery will be complex.

> Is there a way to mount this lv without losing data? Or, should I forget
> about all the data on that disk?

Didn't the pvcreate warn you about wiping out an existing VG?
If it didn't, then you might be confused about which disk your VG
was on.

-- 
	      Stuart D. Gathman <stuart bmsi com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]