1837107 Members
2300 Online
110112 Solutions
New Discussion

Can't vgimport

 
SOLVED
Go to solution
Teck Sim
Frequent Advisor

Can't vgimport

These are my steps:

# umount /dev/vg01/lvol1
# umount /dev/vg01/lvol2
# umount /dev/vg01/lvol3
# vgchange -a n vg01
volume group "vg01" has been successfully changed.

# vgexport -m vg01.mapfile /dev/vg01

then I saved/ftp vg01.mapfile to my c drive

cold install

and then:
# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
#vgimport -m vg01.mapfile /dev/vg01
and I recieved the following message:
vgimport: Unable to read the physical volume.

Please help.
Thanks.
11 REPLIES 11
Pete Devlin
Valued Contributor

Re: Can't vgimport

Do you know the disks that were in the volume group ? You could use vgimport -v /dev/vg01 /dev/dsk/cntndn adding each of your
disks. man vgimport has more info.
Cheers
Pete Devlin
Valued Contributor

Re: Can't vgimport

whoops I meant you need to specify your disks on the one line not one at a time.
PIYUSH D. PATEL
Honored Contributor
Solution

Re: Can't vgimport

Hi Teck,

It seems that the device name of the harddisk may have got changed after installation. If you know the device files of the harddisks which were present in the old vg01, compare them with the newly created device files of the harddisk.

The steps which you have taken are right and there are no problems in that. May be, during the ftp the map file might have got corrupted.

You can do two things,
1. If you know the device files of the harddisk present in the vg01, then

#vgimport /dev/vg01 /dev/dsk/c1t2d0 /dev/dsk/c1t3d0

Then it will import the vg01 info

Or else
2. You can do
#vgscan -a

This will detect the volume groups which are not in use and then tell you to add the vg01.

After you get this information,you can do
#vgchange -a y /dev/vg01

and then mount the lvols after making the mount points.

#mkdir /data1
#mount /dev/vg01/lvol1 /data1

Piyush
Teck Sim
Frequent Advisor

Re: Can't vgimport

Is there anyway at all that I can rename
/dev/vg01/lvol1 to /dev/vg01/d01.

I first created /dev/vg01/d01 before I vgexport. After I vgimport, /dev/vg01/d01 became /dev/vg01/lvol1.

Thanks.
James R. Ferguson
Acclaimed Contributor

Re: Can't vgimport

Hi:

Yes, you can rename the logical volume:

.../dev/vg01/lvol1 to /dev/vg01/d01

# unmount
# mv /dev/v01/lvol1 /dev/vg01/d01
# mv /dev/vg01/rlvol1 /dev/vgxx/rd01 #???note the raw device???
# mount /dev/vg01/d01

Thats all!

Regards!

...JRF...
Teck Sim
Frequent Advisor

Re: Can't vgimport

Thanks to all of you. Everything is working just fine.

Last question.

What are the absolute files that I need to backup before I do a cold installation of HP-UX 11? Thanks.
James R. Ferguson
Acclaimed Contributor

Re: Can't vgimport

HI (again):

In addition to your LVM mapfiles, here's a list of the principal files I'd backup to use after a cold-installation:

/.profile
/etc/group
/etc/hosts
/etc/inetd.conf
/etc/inittab
/etc/mail/sendmail.cf
/etc/motd
/etc/nsswitch
/etc/ntp.conf
/etc/passwd
/etc/profile
/etc/rc.config.d/netconf
/etc/rc.config.d/netdaemons
/etc/rc.config.d/nfsconf
/etc/resolv.conf
/etc/services
/etc/shells
/etc/shutdown.allow
/var/adm/cron/at.allow
/var/adm/cron/cron.allow
/var/adm/fbackupfiles/config
/var/adm/fbackupfiles/graphs/*
/var/spool/cron/crontabs/*
/sbin/init.d/
Regards!

...JRF...
PIYUSH D. PATEL
Honored Contributor

Re: Can't vgimport

Hi,

You should also take an Ignite backup if you have Ignite UX loaded on your system thro make_tape_recovery
so that you can recover back your vg00 as earlier.

You can also backup the important configuration files of your applications which you are using.

You can take a hardcopy printout of all the important files.

You can run the print_manifest command and then take the printout of the output. It will print all the information about your system

Piyush
Teck Sim
Frequent Advisor

Re: Can't vgimport

Will vgexport/vgimport kept my mirrored data?
How do I determine if I have mirrored disks on my system?
Thanks.
PIYUSH D. PATEL
Honored Contributor

Re: Can't vgimport

Hi,

vgexport/vgimport will not store any data, it will store information only about the lvols in the volume group.

lvdisplay -v /dev/vg01/lvol1

This will tell you if you have mirror copies for this lvol1

Piyush
PIYUSH D. PATEL
Honored Contributor

Re: Can't vgimport

Hi,

If you already had the mirror copies of your data before an vgexport then that mirror copy of the data will also be present after the vgimport. You can always view this using #lvdisplay -v /dev/vg01/lvol1

Make sure that you have imported all the disks which were present in the vg01 volume group before. If initially there weer 2 disks then you should have imported both the disks.

You can always issue an lvsync comand since the mirror copies of the data will be stale since you did an vgexport. The lvsysnc command will make the data in the mirror copy curren.
#lvsync /dev/vg01/lvol1

You can view this with the lvdisplay command.

Piyush