1833016 Members
2448 Online
110048 Solutions
New Discussion

Re: vgexport

 
SOLVED
Go to solution
Teck Sim
Frequent Advisor

vgexport

After vgexport -m vg01.mapfile /dev/vg01, where would the mapfile be?
Will it be under the current directory?
Is that mean I have to have a large enough space for the vgexport?
Any suggestions if just by looking at my bdf above and tell me where I should do a vgexport?
Thanks.
14 REPLIES 14
steven Burgess_2
Honored Contributor

Re: vgexport

Teck

As per your example , the mapfile will be placed in your current directory, to place elsewhere use absolute paths

man vgexport

for more info

Regards

Steve
take your time and think things through
Helen French
Honored Contributor
Solution

Re: vgexport

Some points:

1) By default, the map file will be created in the current directory. The system specific VG information/changes file will be under /etc/lvmconf.

2) These map files are *very* small files (in bytes). You don't need to have very large space for this.

3) vgexport will just remove the VG information from /etc/lvmtab file. This will not do anything with the data on the disks. When using mapfile, you are just saving the VG information (LV names, disks, VG name etc) in a small file.
Life is a promise, fulfill it!
PIYUSH D. PATEL
Honored Contributor

Re: vgexport

Hi,

The mapfile will not occupy much space ...just a few bytes. It basically stores the information about the volumegroup. What are the disks in the vg, lvols etc.

It will be in the current directory and you could even specify the directory where you want to store using.

Piyush

Jeff Schussele
Honored Contributor

Re: vgexport

Hi Teck,

Doesn't take hardly any space at all.
It, by default, goes into /etc/lvmconf.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Teck Sim
Frequent Advisor

Re: vgexport

Ok. I got lot of ideas.
This is what I am planning to do:
1) full backup of the system.
2) preserve the following files before cold installation of 11:-
# /.forward
# /.profile
# /etc/profile
# /etc/group
# /etc/hosts
# /etc/inetd.conf
# /etc/inittab
# /etc/nsswitch
# /etc/ntp.conf
# /etc/passwd
# /etc/rc.config.d/netconf
# /etc/rc.config.d/netdaemons
# /etc/rc.config.d/nfsconf
# /etc/resolv.conf
# /etc/sendmail.cf
# /etc/services
# /etc/shells
# /etc/shutdown.allow
# /var/adm/cron/*.allow
# /var/adm/fbackupfiles/*
# /var/spool/cron/crontabs/*
# /sbin/init.d/

3) vgexport -m vg01.mapfile /dev/vg01
4) cold install 11
5) vgimport -m vg01.mapfile /dev/vg01
6) vgchange -a y vg01

Next question:
1) Are both vgexport and vgimport actually export/import my oracle database?
sorry for not being able to understand the logic.
Patrick Wallek
Honored Contributor

Re: vgexport

If you are doing thins in preparation for an OS install, I would do the vgexport like this:

vgexport -m mapfilename -p -v -s vgname

This will not actually perform the vgexport on your VG but will create the mapfile so that you can vgimport the VG after your OS install.

The vgimport / vgexport commands are OS level commands and work at the VG level only, they will NOT do an DB export / imports.
A. Clay Stephenson
Acclaimed Contributor

Re: vgexport

If I understand your question, vgimport/vgexport is NOT THE SAME as an Oracle export/import. The data on your vg01 remains intact. You simply are telling the new OS about these disks with the vgimport. Make sure that you add your mapfile (created with vgexport) to your lists of files to save.

I suppose I would add the -p option to your vgexport. That way the map file is created but everything else is intact. Vgexport with or without the -p option DOES NOT DESTROY any data on the disks that make up the volume group.

One point that should be made is that /dev/rdsk/c1t5d0 on the old system MIGHT become, for example, /dev/rdsk/c3t5d0 on the new system. This is especially true if cards were added or removed after the original OS was loaded. For that reason, I strongly suggest that you make ghard copies of the output of ioscan -fn, bdg, and vgdisplay -v of each volume group before the OS install.


I
If it ain't broke, I can fix that.
Teck Sim
Frequent Advisor

Re: vgexport

I guess I am confused with "A cold install will erase all exisiting data on the target disk(s) during the process"
I was thinking the cold install will erase all oracle data.
S.K. Chan
Honored Contributor

Re: vgexport

Well not quite .. as far as your steps are concern. After step 3 , ie the vgexport you would want to save the "vg01.mapfile" somewhere else (tape or another system) before you cold install your server. Once the 11.x server is up, restore the file in say /tmp and first you got to create the LVM device file ..
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
Then only you do the "vgimport" ie step 5 follow by step 6. The vgexport/import operation does not change your data, it's just like saving the LVM configuration information so that you can maintain the same LVM config in a newly installed system or in another system. It does not alter your Oracle DB.
Helen French
Honored Contributor

Re: vgexport

Again, a cold install will not erase your DATA. It will erase the volume group - /dev/vg00. This is the root VG and the OS install takes place here. All other VGs are *normally* data VGs and for preserving those VGs, you need to do vgexport and vgimport.

The data will not get erased unless you forced to do it. The vgexport and vgimport are only for LVM VGs and NOT for Oracle or any other applications.
Life is a promise, fulfill it!
PIYUSH D. PATEL
Honored Contributor

Re: vgexport

Hi,

vgexport/vgimport works on the OS level and not the Oracle level. The contents on the hardisk will remain the same. But since you are planning to upgrade, you should always take your full Oracle backup and restore it back in case there is a problem. If the device files of the harddisks change then also you can vgimport those disks with the new device file names.

Piyush
Sanjay_6
Honored Contributor

Re: vgexport

Hi,

vgexport -m vg01.mapfile /dev/vg01 will create the mapfile vg01.mapfile in the current directory. This is a very small file and you should not be worried about the diskspace. you can create this file in whichever directory you want,

vgexport -s -m /tmp/vg01/mapfile /dev/vg01

Hope this helps.

Regds
Martin Johnson
Honored Contributor

Re: vgexport

The cold install will erase any data in the root volume group (/dev/vg00). Therefore, if you have any oracle data in the root volume group you need to back it up or you will lose it.


Marty
Teck Sim
Frequent Advisor

Re: vgexport

Thanks to all of you out there. I feel much more positive after reading all your messages. You guys are great!