Operating System - HP-UX
1834831 Members
2525 Online
110070 Solutions
New Discussion

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

 
SOLVED
Go to solution
pap
Respected Contributor

WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Hi,
I am migrating system disks from HP-UX 10.20 (K220) to HP-ux 11.0 (K360)

I have done following things on two volume groups in 10.20

vgexport -m /tmp/lvmconf_vg10.map -p -s -v /dev/vg10

and similarly for another vg vg20.

Then I disconnected disks and connected to new system loaded with HP-UX 11.0

I have created group file for required vgs.

NOw, when importing the volume groups I gave following command.

vgimport -m /tmp/lvmconf_vg10.map -p -v -s /dev/vg10

Then it gave following error.

vgimport : can not open the control file "/dev/vg10/group"
No such file.

I have checked the file , it is there in the /dev/vg10 directory. I have deleted the file and created again....but no luck.
Can you please let me know how do I import the volume groups now.?

Appreciated your help in advance.

Thanks,
-Piyush.
"Winners don't do different things , they do things differently"
15 REPLIES 15
Paula J Frazer-Campbell
Honored Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Hi

Have you done this?

mkdir /dev/vg??
mknod c 64 0x0?0000 /dev/vg??/group
vgimport -s -m mapfile.name /dev/vg??

Paula
If you can spell SysAdmin then you is one - anon
Krishna Prasad
Trusted Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

You must create the device file for the volume group as explained in the above response.
Positive Results requires Positive Thinking
Rita C Workman
Honored Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Well my export and import commands are just slightly different:
On first node
vgexport -pvs -m /dev/vg
rcp to mapfile to second node

On second node
vgexport /dev/vg
mkdir /dev/vg
mknod /dev/vg/group c 64 0x0_0000

vgimport -vs -m /dev/vg

Just a thought,
Rita
Jeff Schussele
Honored Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

pap,

Did you create the node:

#mknod /dev/vg10 c 64 (always for VGs) 0x00000X (must be unique)

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Oooops that should have been :

#mknod c 64 0x000001 /dev/vg10/group.

I keep telling myself "It's the syntax, stupid!" ;~)

Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Patrick Wallek
Honored Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

What are the permissions on the /dev/vg?? directory and the /dev/vg??/group file?

The permissions on the group file shoud be crw------- at a minimum and it should be owned by root.

pap
Respected Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

yes I already created vg directory and group file.

Right now I have a vg10 directory and group file with 666 permission.

Still I am getting the same error.

Is it important to to vgexport using the -p option? or I should have done without -p option?

I did following while exporting vg.

vgexport -m /tmp/lvmconf_vg10.map -p -s -v /dev/vg10.
Then I copied the map file to new machine.

On new machine I have created

mkdir /dev/vg10
mknod /dev/vg10/group c 64 0x100000 /dev/vg10

now importing the volume group, I am getting the above error.
I have came across such error first time....

Thanks for your responses , though I am yet to solve my problem.

Thanks,

-Piyush.
"Winners don't do different things , they do things differently"
Helen French
Honored Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Hi Piyush,

You don't need to mention '/dev/vg10' two times while doing mknod. Try this:

# mknod /dev/vg10/group c 64 0x100000

After this check the file's major and minor numbers with ls -al command. Also make sure that the minor number is not used by any other VGs. Can you post the output of strings /etc/lvmtab ?

HTH,
Shiju

Life is a promise, fulfill it!
pap
Respected Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Hi, It was a typing mistake. I specified vg10 only one time.

Still no luck.
"Winners don't do different things , they do things differently"
Darrell Allen
Honored Contributor
Solution

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Hi Piyush,

The minor number you used for /dev/vg10/group 0x100000) may be too high for what you have configured as the max number of VGs on the system.

The configurable kernel parameter is maxvgs. Use sysdef to see what the max value is. You can change it with SAM or you can recreate group with a lower minor number (remember, it's in hex so the next after 0x090000 would be 0x0a0000).

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Eric Ladner
Trusted Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Check the maxvgs kernel parameter. If memory serves it defaults to 10 out of the box.
Helen French
Honored Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Hi Piyush,

Darell's point is a good one. Check the maxvg (default 10) parameter with 'sysdef' command. Then try with a hexadecimal minor number.

# mknod /dev/vg10/group c 64 0x0a0000

HTH,
Shiju
Life is a promise, fulfill it!
Sandip Ghosh
Honored Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Create the groupfile as a minor no 0x0a0000
It doesn't take as 10 , it takes as a.

Sandip
Good Luck!!!
Rita C Workman
Honored Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Pap,

If your minor number is
0x100000

then you are setting it at a value higher than your maxvgs can handle...remember 0 is a valid number..so 0-9 accounts for 10vg. Thus 0x100000 is too high.

Increase maxvgs !!

Rita

...0x0d0000 0d=13
...0x0f0000 0f=15
pap
Respected Contributor

Re: WHile importing volume groups it gave error "can not open the control file "dev/vg10/group"

Hi ,
Thanks a lot for your response.
I solved the problem. The culprit was MAx vg parameter and the minor number.....:)..

Thanks,.
"Winners don't do different things , they do things differently"