1836579 Members
1890 Online
110102 Solutions
New Discussion

Re: vgimport problem

 
Jorge Pons
Trusted Contributor

vgimport problem

Hi

I have a Autoraid 12h in K100, and want to import from RP5430. I have 5 VG, I do this:

# umount /disco10
# umount /disco20

# vgchange -a n /dev/vg01
# vgchange -a n /dev/vg02

# vgexport -s -v -m /tmp/vg01.map /dev/vg01
# vgexport -s -v -m /tmp/vg02.map /dev/vg02

# grep vg01 /etc/fstab > /tmp/vg01.fstab
# grep vg02 /etc/fstab > /tmp/vg02.fstab

With Ftp put *.map and *.fstab to the other machine

# mkdir /dev/vg01
# mkdir /dev/vg02

# mknod /dev/vg01/group c 64 0x010000
# mknod /dev/vg02/group c 64 0x020000

# vgimport -s -v -m /tmp/vg01.map /dev/vg01
# vgimport -s -v -m /tmp/vg02.map /dev/vg02

# vgchange -a y /dev/vg01
# vgchange -a y /dev/vg02

# touch /tmp/fsmap

# cat /tmp/vg0*.fstab >> /tmp/fsmap

# cat /tmp/fsmap >> /etc/fstab

I had mount points,

When I mount, it tells me:

mount: /dev/vg04/lvol1: No such file or directory
mount: /dev/vg03/lvol1: No such file or directory
mount: /dev/vg02/lvol1: No such file or directory

Whats happens?

Thanks

Jorge
23 REPLIES 23
Massimo Bianchi
Honored Contributor

Re: vgimport problem

Hi,
it looks correct.
Can you please post the incriminated
/etc/fstab ?

HTH,
Massimo

Bruno Vidal
Respected Contributor

Re: vgimport problem

Hi,
In your procedure you do on the RP "cat /tmp/vg0*" are you sure that you don't have any vg0X file in /tmp ?? Or more simple, are you sure that you don't have any vg0X already in your /etc/fstab file ?

Cheers.
Ian Dennison_1
Honored Contributor

Re: vgimport problem

Interesting point - you are importing vg01 and vg02, but the errors include lvols from vg03 and vg04?

Perhaps correct those vg03/4 errors first, as they may contains the mount point directories for vg01/2?

Share and Enjoy! Ian
Building a dumber user
Stefan Farrelly
Honored Contributor

Re: vgimport problem

Theres something wrong with your fstab file. The error you listed is;

mount: /dev/vg04/lvol1: No such file or directory
mount: /dev/vg03/lvol1: No such file or directory
mount: /dev/vg02/lvol1: No such file or directory


which shows its trying to mount vg02, vg03, vg04 (all lvol1) - whereas you imported vg01 and vg02 - so why are you trying to mount vg03 and vg04 ??

Edit your /etc/fstab file manually and fix it to how you want it to look.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Pete Ledger
New Member

Re: vgimport problem

Mount is complaining about two volumes in volume groups who have not indicated are changing ie /dev/vg04 & /dev/vg03. Somehow it looks like you have incorrect info in your /etc/fstab file.

I'd check that /tmp/fstab was empty prior to your "cat /tmp/vg0*.fstab" >> /tmp/fsmap" and also that there are no other vg0*.fstab files in /tmp.

You will have to compare to info in /etc/fstab and ensure the volume details are correct in there by comparing with what you have on the system. This is all assuming the volume group imports worked without errors.
Jorge Pons
Trusted Contributor

Re: vgimport problem

Hi

I want to export/import 5 vg (vg01, vg02, vg03, vg04 and vg05) but only write this vg01 and vg02.
The fstab file:

# more fstab
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /tmp vxfs delaylog 0 2
/dev/vg00/lvol5 /home vxfs delaylog 0 2
/dev/vg00/lvol6 /opt vxfs delaylog 0 2
/dev/vg00/lvol7 /usr vxfs delaylog 0 2
/dev/vg00/lvol8 /var vxfs delaylog 0 2
/dev/vg01/lvolswap ... swap pri=0 0 0
/dev/vg00/lvol9 /oracle vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
/dev/vg00/lvol10 /brs vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
/dev/vg01/lvol2 /baksistema vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
/dev/vg01/lvol3 /admin vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
/dev/vg01/lvol1 /disco10 hfs rw,suid 0 2
/dev/vg02/lvol1 /disco20 hfs rw,suid 0 2
/dev/vg03/lvol1 /disco30 hfs rw,suid 0 2
/dev/vg04/lvol1 /disco40 hfs rw,suid 0 2
/dev/vg05/lvol1 /disco50 hfs rw,suid 0
2


Thanks

Jorge
Ian Dennison_1
Honored Contributor

Re: vgimport problem

3 checks to perform,...

1. fstyp -v /dev/vg02/lvol1
You are mounting as hfs file system. Lets check that this is the filesystem format.

2. ll -d /dis*
Are the directories present?

3. vgdisplay -v /dev/vg01
You are mounting /dev/vg01/lvswap as swap, did the lv names come across correctly?

Share and Enjoy! Ian
Building a dumber user
Stefan Farrelly
Honored Contributor

Re: vgimport problem

Did the vgimport and vgchange commands for all 5 VG's work ?

If so can you ls /dev/vg0*/ and can you see lvol1 for each vg ? this proves they imported correctly.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Jorge Pons
Trusted Contributor

Re: vgimport problem

 
Massimo Bianchi
Honored Contributor

Re: vgimport problem

Hi,
in addition to Ian's answer:

note this:
/dev/vg01/lvolswap ... swap pri=0 0 0
/dev/vg00/lvol9 /oracle vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
/dev/vg00/lvol10 /brs vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2

and this:
/dev/vg01/lvol2 /baksistema vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2
/dev/vg01/lvol3 /admin vxfs rw,suid,nolargefiles,delaylog,datainlog 0 2

AND THIS !!!
/dev/vg01/lvol1 /disco10 hfs rw,suid 0 2

extract from your fstab...


looks like you have to clean it up and check what you have imported.
vg01 must be pre-existent, or you will have not used it for swap.

Now you imported it... and the swap ?

Massimo
Massimo Bianchi
Honored Contributor

Re: vgimport problem

Hi,
reading also your other post, it looks like three is a bit of mess.

I suggest you to export all of your vg, clean your fstab and start again.

Check also the minor number
ll /dev/vg*/group

to see if there are any inconsistences.

Try importing them one by one, and building the fstab accordingly.

HTH,
Massimo
Jorge Pons
Trusted Contributor

Re: vgimport problem

Stefan

Something is wrong:

# ls /dev/vg0*

/dev/vg00:
group lvol2 lvol5 lvol8 rlvol10 rlvol4 rlvol7
lvol1 lvol3 lvol6 lvol9 rlvol2 rlvol5 rlvol8
lvol10 lvol4 lvol7 rlvol1 rlvol3 rlvol6 rlvol9

/dev/vg01:
group lvol3 lvol6 lvolswap rlvol3 rlvol6 rlvolswap
lvol1 lvol4 lvol7 rlvol1 rlvol4 rlvol7
lvol2 lvol5 lvol8 rlvol2 rlvol5 rlvol8

/dev/vg02:
group

/dev/vg03:
group

/dev/vg04:
group

/dev/vg05:
group
#
Ian Dennison_1
Honored Contributor

Re: vgimport problem

It does not look like it has imported /dev/vg02 correctly.

Also, /dev/vg01 shows 9 lvols in the output you produced, yet there are only 4 lvols specified in the /etc/fstab. Is this right?

Share and Enjoy! Ian
Building a dumber user
Stefan Farrelly
Honored Contributor

Re: vgimport problem

Yes, its a mess.

It looks like vg01 is a copy of vg00 from the other server!

It could be the /dev/dsk/cxxxx entries are different on this server than on the original server. You must map out carefully all the disk devices for each vg and be sure you are trying to import the correct ones on the new server. Do a full ioscan first when the disks are ready on the new server so you can id all the new /dev/dsk entries you will need to use.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Jorge Pons
Trusted Contributor

Re: vgimport problem

Ok.

I don??t know how I am at this situation. How I clean all the modifications?

If I modified lvmtab, I need to execute vgscan and it creates lvmtab with all the disks. I must delete all entries in /dev/vg02....?

Thanks
Massimo Bianchi
Honored Contributor

Re: vgimport problem

Hi, to clean up all:

vgexport all of your vg
vi /etc/fstab and remove EVERY reference to vg that is not vg00
strip off the swap on vg01

reboot (because you had a vg01 with a swap in it)


and then import the vg one by one.

your method looked right...

Massimo
Massimo Bianchi
Honored Contributor

Re: vgimport problem

I forgot: do not use vgscan, otherwise you will get the vg re-created...
Massimo
Jorge Pons
Trusted Contributor

Re: vgimport problem


The problem is that the lvols is not created.
If I listed /dev/vg02 for example, only is group.
if I do lvcreate /dev/vg02, appeard lvol2.

???

Jorge
Massimo Bianchi
Honored Contributor

Re: vgimport problem

Hi,
so vg01 is O.K. ?

Please confirm this.

Now, as a second question:
- delete /dev/vg02/group
- delete /dev/vg02


re-create them and try a

vgimport

with the -v and -p
option, to use "preview" and "verbose", to see if they cget created, or if your export was wrong.

Can you please post the content of
vg02.map ?

Maybe the problem is here :)

Massimo
Jorge Pons
Trusted Contributor

Re: vgimport problem

That is..

# more vg02.map
VGID 05eb7a3c399a89b
1 lvol1
vg02.map: END

Jorge

Massimo Bianchi
Honored Contributor

Re: vgimport problem

Hi,
vg02.map looks O.K.


Does the import works, after re-creating dir and special file ?

Do you get any error ?
BTW, are source and dest the same O.S. ? It should not matter, but...

Massimo

Jorge Pons
Trusted Contributor

Re: vgimport problem

it tells me
/dev
# cd vg02
sh: vg02: not found.
# vgimport -s -v -m /tmp/vg02.map /dev/vg02
Beginning the import process on Volume Group "/dev/vg02".
vgimport: Volume group "/dev/vg02" already exists in the "/etc/lvmtab" file.
#
#
and nothing is created. How I clean lvmtab?

Thanks
Massimo Bianchi
Honored Contributor

Re: vgimport problem

"it tells me
/dev
# cd vg02
sh: vg02: not found.
# vgimport -s -v -m /tmp/vg02.map /dev/vg02
Beginning the import process on Volume Group "/dev/vg02".
vgimport: Volume group "/dev/vg02" already exists in the "/etc/lvmtab" file.
#
#
and nothing is created. How I clean lvmtab?

Thanks "

Hi,
to clean lvmtab:
- cp -p /etc/lvmtab /etc/lvmtab.ORIG
- vgscan -p
preview to see what will be done
- vgscan
to operate
if this does not clean lvmtab, then
- rm /etc/lvmtab
we made a copy before
- vgscan


HTH,
Massimo