Operating System - HP-UX
1833553 Members
3317 Online
110061 Solutions
New Discussion

LVM Configuration on an EVA LUN

 
SOLVED
Go to solution
CelesteG
Advisor

LVM Configuration on an EVA LUN

Hello all, I am trying to find out if there is a way that I can mount a v-disk from an EVA storage unit that already has LVM configuration on it and access the pv/vg/lv information without doing a pvcreate and basically starting from scratch. This drive belonged to the server it is to be re-presented to and the data on the drive is still there but I don't know how to access it. I'm thinking I should have done a vgexport before this server was rebuilt and then I could have done an import once this vdisk was presented again. Still, that is a guess on my part. Any advice is greatly appreciated. This can be re-created, I'm just trying to find an eaiser way to approach this, even if it has to be a "Lessons Learned" for the next time.
Thank you.
Celeste
6 REPLIES 6
Nguyen Anh Tien
Honored Contributor

Re: LVM Configuration on an EVA LUN

Hmm. You should have done a vgexport/vgimport before.
HP is simple
CelesteG
Advisor

Re: LVM Configuration on an EVA LUN

Thanks for your response Nguyen. I suspected that, but I also wasn't sure if there was another way to accomplish this. Guess this is a Lessons Learned.
Patrick Wallek
Honored Contributor
Solution

Re: LVM Configuration on an EVA LUN

If the LUN in question was the only one in the VG, you can still import it, even though you didn't export it before.

# ioscan -fnC disk

to make sure the /dev/dsk and /dev/rdsk device files were recreated.

# mkdir /dev/vg??
# mknod /dev/vg??/group c 64 0x0?0000
# vgimport -v /dev/vg?? /dev/dsk/c?t?d?

Just use the appropriate VG name, group device minor number and /dev/dsk/ device file where appropriate.

It should work.

If there was more than one LV in the VG they will be imported as LVOL1, LVOL2, etc. since you do not have a map file.

After this you can mount the LV as you normally would.
CelesteG
Advisor

Re: LVM Configuration on an EVA LUN

Patrick, this is awesome!! And this was the only LUN in that vg (auugghh!) I am working on a project where everything has to be done yesterday (which project isn't like that) and since my last post I have already executed a pvcreate -f on the vdisk then....

vgcreate for the volume group
lvcreate for the logical volumes
newfs for the file systems
mkdir file systems
mount file systems
fsadm for large files

I was on track with the mkdir and mknod, but could have saved myself a lot of steps with the vgimport. I will definately keep this in mind for the next time!!!
Thanks a bunch!
Celeste
Devender Khatana
Honored Contributor

Re: LVM Configuration on an EVA LUN

Hi,

Alongwith this also put a valid entry if you want the file systems to be auto-mounted while system boots up.

Another point is that you could import this disk even if it was part of a VG having more than one disk. But you could recover only those LVOLs whose PEs were fully allocated onto this disk.

HTH,
Devender
Impossible itself mentions "I m possible"
CelesteG
Advisor

Re: LVM Configuration on an EVA LUN

Yes, by updating the /etc/fstab file with valid entries for my file systems and options. Did that. Thanks for the response.