1833750 Members
2689 Online
110063 Solutions
New Discussion

Re: Can't import volume.

 
SOLVED
Go to solution
Jeremy Loukinas
Frequent Advisor

Can't import volume.

For some reason after a clean install of 11.00 I cannot import my volumes. The volumes were created on a 10.20 server. As part of our cold install I kept all the mapfile and conf files from /etc/lvmconf.

So here is what I am trying to do.
/dev/dsk/c2t9d3
mkdir /dev/vg22
mknod /dev/vg22/group c 64 0x220000
vgimport -m vg22.mapfile /dev/vg22 /dev/dsk/c2t9d2 /dev/dsk/c2t9d3 /dev/dsk/c2t9d4 /dev/dsk/c2t9d5
/dev/dsk/c2t9d6 /dev/dsk/c2t9d7
/dev/dsk/c2t11d0 /dev/dsk/c2t11d1
/dev/dsk/c2t11d2 /dev/dsk/c2t11d3
/dev/dsk/c2t11d4 /dev/dsk/c2t11d5
/dev/dsk/c2t11d6 /dev/dsk/c2t11d7

And I am getting the following

vgimport: Cannot open the control file "/dev/vg22/group":
No such device

but...

# ls -al /dev/vg22/group
crw-rw-rw- 1 root sys 64 0x220000 Jul 1 13:03 /dev/vg22/group
#

Any suggestions..

Jeremy




11 REPLIES 11
twang
Honored Contributor

Re: Can't import volume.

take a try:
# vgimport -v -m vg22.mapfile /dev/vg22 /dev/dsk/c2t9d2 /dev/dsk/c2t9d3 /dev/dsk/c2t9d4 /dev/dsk/c2t9d5
Massimo Bianchi
Honored Contributor
Solution

Re: Can't import volume.

Hi,
check maxvg in the kernel /stand/system

if not present, the maximum value is 10 (decimal)

try using a minor like 0x050000 to be on the safe side.

Massimo
Jeremy Loukinas
Frequent Advisor

Re: Can't import volume.

twang..

Same thing.
Pete Randall
Outstanding Contributor

Re: Can't import volume.

Jeremy,

It's the 0x220000. Too big. Back it off to 0x100000 or something.


Pete



Pete
twang
Honored Contributor

Re: Can't import volume.

Generate map files from 10.20 before upgrade,

# vgexport -p -v -s -m /tmp/vg22s.map vg22
# vgexport -p -v -m /tmp/vg22.map -f /tmp/vg22.disks
# ll /dev/vg*/group > /tmp/group.info
# cp /etc/fstab /tmp/fstab.old

Restore vg22.s.map, vg22.map, group.info, fstab.old and vg22.disks to /tmp.

# mkdir /dev/vg22
# mknod /dev/vg22/group -c 64 0x220000

Edit /tmp/vg22.disks and change the devices files. Only the controller numbers (cxx) will change.
# ioscan -fnC disk > /tmp/disk.out
Look at disk.out and see how the controller numbers got changed. So, modify vg22.disks accordingly. Once it is done import the vg.

# vgimport -v -m /tmp/vg22.map -f /tmp/vg22.disks vg22

If you are not sure about the disks, then you can import it with -s option.

# vgimport -v -s -m /tmp/vg22.s.map vg22.

Scan the disks and import vg22.

# vgchange -a y vg22

Paste the entries corresponding to vg22 from fstab.old into /etc/fstab

# mount -a
Pete Randall
Outstanding Contributor

Re: Can't import volume.

Jeremy,

From man vgcreate:

"The minor number for the group file should be unique among all
the volume groups on the system. It has the format 0xNN0000,
where NN runs from 00 to ff. The maximum value of NN is
controlled by the kernel tunable parameter maxvgs."


Check kernel paramater maxvgs. 22 is too big.


Pete



Pete
Jeremy Loukinas
Frequent Advisor

Re: Can't import volume.

Change the maxvg param higher because I have a ton of vg's.

So now I get a whole new error:-)

Beginning the import process on Volume Group "/dev/vg22".
vgimport: The Physical Volumes specified on the command line
do not belong to the same Volume Group.
#


Here is my vg22.conf and vg22.mapfile.
# strings vg22.conf
CONFIG01
/dev/vg22
/dev/rdsk/c2t9d2
/dev/rdsk/c2t9d3
/dev/rdsk/c2t9d4
/dev/rdsk/c2t9d5
/dev/rdsk/c2t9d6
/dev/rdsk/c2t9d7
/dev/rdsk/c2t11d0
/dev/rdsk/c2t11d1
/dev/rdsk/c2t11d2
/dev/rdsk/c2t11d3
/dev/rdsk/c2t11d4
/dev/rdsk/c2t11d5
/dev/rdsk/c2t11d6
/dev/rdsk/c2t11d7
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
LVMREC01U
VGDA0001
VGSA0001llr

mapfile:
# strings vg22.mapfile

1 lvol1
2 lvol2
3 lvol3
4 lvol4
5 lvol5
6 lvol6
7 lvol7
8 lvol8
9 lvol9
10 lvol10
11 lvol11
12 lvol12
13 lvol13
14 lvol14
15 lvol15
16 lvol16
17 lvol17
18 lvol18
19 lvol19
20 lvol20
21 lvol21
22 lvol22
23 lvol23
24 lvol24
25 lvol25
26 lvol26
27 lvol27





Pete Randall
Outstanding Contributor

Re: Can't import volume.

Jeremy,

What syntax did you use? Where did this conf file come from? Are you still specifying the physical volumes on the vgimport command line? Have you verified that these are the correct paths to the physical volumes in this VG?


Pete



Pete
Tim D Fulford
Honored Contributor

Re: Can't import volume.

You may have got some of your disks muddled up!! try "vgscan -p" this should (non-destructively) print out what disks are members of the same LV.

Regards

Tim
-
James R. Ferguson
Acclaimed Contributor

Re: Can't import volume.

Hi Jeremy:

It is very likely that the device files (pv_paths) changed as a consequence of the cold-installation. One way to deduce the new pv_paths is do do a 'vgscan'. THe results will show the various device files grouped (clustered) into volume groups:

# vgscan -a -p -v

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: Can't import volume.

Actually, this is a place where SAM really works well. Delete the /dev/vg22 directory and contents, run SAM and select Disks and Filesystems -> Volume Groups. Once there, select from the Actions list: Import...

SAM will scan all the unassigned disks and automatically group them together using the unique serial numbers written to the disks when they were first added to a volume group. The new window shows the physical path so you select it and down at the bottom of the window, you'll see a place to name the new volume group. Just type in vg22 and select OK. The import will not see alternate or redundant paths to the volume group (and warns you) but this can be fixed later.

SAM will assign default lvol names (lvol1 lvol2 lvol3...) but you can rename them if desired. You'll find the volume group ready to use and lvols ready to mount.


Bill Hassell, sysadmin