Operating System - HP-UX
1834377 Members
1873 Online
110066 Solutions
New Discussion

Re: How mounting an external disk containing a lvm ?

 
SOLVED
Go to solution
RINCE Frédéric
Occasional Advisor

How mounting an external disk containing a lvm ?

Hi,

I have 2 workstations in HP-UX 11:
one with an external scsi disk at #5 and I think on this disk there is my data in /dev/vg00/home. The problem is that the boot disk of this workstation is out so I want to mount this external disk on another workstation. My problem is that there is a lvm structure on this external disk and I don't know how to mount it on the other workstation. (vgimport ?)

Thanks for help ...
Regards
JB
14 REPLIES 14
Tim Nelson
Honored Contributor

Re: How mounting an external disk containing a lvm ?

-insert drive into another workstation
-ioscan
-ioscan -kfnC disk to view hardware
-insf -eH path_to_disk

-mkdir /dev/vgnew
-mknod /dev/vgnew/group c64 0x0a0000 ( pick an unused minor number
-vgimport /dev/vgnew /dev/dsk/cxtxdx ( device of new disk )
-fsck /dev/vgnew/rlvolx
-mkdir /newdir
-mount /dev/vgnew/lvolx /newdir

RINCE Frédéric
Occasional Advisor

Re: How mounting an external disk containing a lvm ?

Thanks Tim, but still a problem :

When I type the vgimport command my systeme tell "vgimport : cannot open the control file /dev/vgnew/group : no such device".
But when I type ls -l of /dev/vgnew I can see :
crwxrwxrwx 1 root sys 64 0x0a0000

Thanks
JB
Robert-Jan Goossens
Honored Contributor

Re: How mounting an external disk containing a lvm ?

Hi,

You will have to pick a free number

# ll /dev/*/group

You will probably have only one group file for vg00.

# rm /dev/vgnew/group
# mknod /dev/vgnew/group c64 0x010000
# vgimport /dev/vgnew /dev/dsk/cxtxdx
change the x's into your new disk device.

Regards,
Robert-Jan
RINCE Frédéric
Occasional Advisor

Re: How mounting an external disk containing a lvm ?

Thanks Robert-Jan

My disk is at /dev/dsk/c1t5d0 so I don't know witch lvol fsck and mounting ?

Thanks
JB
Tim Nelson
Honored Contributor

Re: How mounting an external disk containing a lvm ?

-Once the vgimport is completed using
vgimport /dev/vgxyz /dev/dsk/c1t5d0
-You can do a vgdisplay -v /dev/vgxyz to see the lvols ( you may need to do a vgchange -a y /dev/vgxyz if you get "not activated messages).

-pick the lvol that you are interested in
-fsck /dev/vgxyz/rlvolx
-then mount /dev/vgxyz/lvolx /mymount

RINCE Frédéric
Occasional Advisor

Re: How mounting an external disk containing a lvm ?

When I try to activate with vgchange command I have the message : vgchange : could not activate volume group /dev/vgnew : quorum not present, or some physical volume are missing

Thanks
JB
Tim Nelson
Honored Contributor

Re: How mounting an external disk containing a lvm ?

Here are all my assumptions.
1) there was not already a /dev/vgnew on serverb
2) there was only one disk in the volume group you are recovering from servera

Your last error indicates that there was more than one disk in the volume group on servera. If you are sure then you can vgchange -a y -q n /dev/vgnew. This will override the quorum requirement.

RINCE Frédéric
Occasional Advisor

Re: How mounting an external disk containing a lvm ?

Yes, there were 2 disk in servera : one for the system (internal) and one for the data (external) on the same vg00 volume. So you think I can do your last vgchange command with no risk of loosing my data ?

Thanks
JB
Robert-Jan Goossens
Honored Contributor

Re: How mounting an external disk containing a lvm ?

JB,

are you there where no other disks in the vg01 conf of the old system ?

Try to override the quorum

# vgchange -a y -q n /dev/vgnew

# vgdisplay -v /dev/vgnew

# fsck /dev/vgnew/rlvol1

# mkdir /oldhome

# mount /dev/vgnew/lvol1 /oldhome

Tim Nelson
Honored Contributor
Solution

Re: How mounting an external disk containing a lvm ?

You are safe to overide the quorum option.

All these vgimport / vgchange commands do not change data on the disk. They are only reading/importing the VG info / LVM header on the disk.

So unless you physically smash it on the ground or purposefully overrite the data you will not loose anything.

Another note: Once imported, if you do not remember which lvol has your data ( assuming there is more than 1 lvol ) you can repeat the fsck and mount on each one until you find what you are looking for.

RINCE Frédéric
Occasional Advisor

Re: How mounting an external disk containing a lvm ?

Ok,

/dev/vgnew is active but

when I type fsck on /dev/vgnew/rlvolx (x from 1 to 9) I have the message : fsck : /etc/defaults/fs is used for determining the file system type cannot open device /dev/vgnew/rlvolx file system failure

JB
Robert-Jan Goossens
Honored Contributor

Re: How mounting an external disk containing a lvm ?

start with the lvol9 and work you way back to 1 untill you find you old home

# fsck -F vxfs /dev/vgnew/rlvol9

# mount /dev/vgnew/lvol9 /oldhome

etc

disregard lvol1 (stand)+ lvol2 (swap)and lvol3 (/)
RINCE Frédéric
Occasional Advisor

Re: How mounting an external disk containing a lvm ?

not again ...

The message is "File system check failure aborting ..."

Thanks
JB
RINCE Frédéric
Occasional Advisor

Re: How mounting an external disk containing a lvm ?

If you have a solution ?

Sorry for me it's 0H30 in France so I go to bed ...
I hope tomorrow you will find a solution for my server ...
Thanks a lot and wait ...

Bye
JB