- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- import prob.....
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 01:48 PM
06-03-2004 01:48 PM
I made a mistake by exporti a vg that I need...
I did #vgexport -v -f outfile /dev/vg02
and I tried to put it back by doing
#vgimport -v -f outfile /dev/vg02
and it tells me that
vgimport: "/dev/vg02/group" not a character device
how do I need to put it back the way it was?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 02:20 PM
06-03-2004 02:20 PM
Re: import prob.....
it should be:
# vgimport -m outfile -v /dev/vg02
e.g. # vgimport -m outfile -v /dev/vg02 /dev/dsk/c#t#d#
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 02:29 PM
06-03-2004 02:29 PM
Re: import prob.....
sorry, there r some more pre-steps:
# mkdir /dev/vg02
# mknod /dev/vg02/group c 64 0x020000 --> check if the 0x020000 has been use, if so, look for another one.
# vgimport -v -f outfile /dev/vg02
# vgchange -a y /dev/vg02
regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 02:44 PM
06-03-2004 02:44 PM
Re: import prob.....
think you have not done any mistake..
Only thing is that when you export a volume group, its information in the system is removed. i.e. it updates /etc/lvmtab and deletes the files and directories for the lvm device files.
So before importing the Volume group, you need to create the device files for the same.
ll /dev/*/group
(Check for free minor numbers)
mkdir /dev/vg02
mknod /dev/vg02/group c 64 0x020000
vgimport -v -f outfile /dev/vg02
vgchange -a y /dev/vg02
with best wishes
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 03:01 PM
06-03-2004 03:01 PM
Re: import prob.....
well the lvols are restored although their names are not what I named before. It all becamse lovl10, 11, 12, ... in sequence.
since I also making that vg02 for mc/servicegard, I need it to be just like it was before. How would I do this??? thankx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 03:23 PM
06-03-2004 03:23 PM
Re: import prob.....
check in the /etc/fstab what exactly the name of the logical volumes were....
i.e. /dev/vg02/xxxxx
rename the lvol10 to lvolx in the /dev/vg02 directory. Also rename the raw or character device files to the actual one.
for eg...if your /etc/fstab has entries for mounting
/dev/vg02/lvora1
/dev/vg02/lvora2
then in /dev/vg02...rename lvol1 to lvora1 and rlvol1 to rlvora1 and lvol2 to lvora2 and rlvol2 to rlvora2..
This need not work always, if the entry in the /etc/fstab is not in the order in which the lvols had been created
with best wishes
Naveej
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 04:27 PM
06-03-2004 04:27 PM
Re: import prob.....
If this is an old logical volume, then you may find the map file under /etc/lvmconf directory. Look for vg02.map under it. If not, but if it is already setup in serviceguard, it means it might have already imported on the other node(s). In that case, you can generate a map file on that node using the command
#vgexport -p -v -m /tmp/vg02.map vg02
Copy vg02.map file onto this system in /tmp directory.
vg02.map file contains nothing but a mapping of logical volume names to their minor numbers.
Once you got the map file in any of the above ways, then export the VG and import it back.
#vgchange -a n vg02
#vgexport -v -m /tmp/vg02new.map -f /tmp/vg02.disks vg02
Use the procedure (create directory, group files) given already to import the VG except that you will be adding another option -m
#vgimport -v -m /tmp/vg02.map -f /tmp/vg02.disks vg02
#vgchange -a y vg02
(if it is serviceguarded already, then skip the vgchange step)
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 05:07 PM
06-03-2004 05:07 PM
Re: import prob.....
I tried looking for mapfile but.... I did not find it. I was thinking to restore vg02 by ignite. This "I think" will solve the maping thing since it will bring back to vgexport stage.
The only thing that I'm concern (if what I think was right) is that I added several lvols into vg02 after the ignite backup. Should I delete them before restoring to make the mapping exact same like before? or it wouldn't cause any prob?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 05:20 PM
06-03-2004 05:20 PM
Re: import prob.....
You have not lost any data as such but only the VG02 structure. It would be an good idea to get back all those special files for VG02. If you try doing IGnite backup, you may loose updated info after the backup and also other lvols you have created after backup.
See if vgscan helps you out in any way.
man vgscan.
Hope that helps.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 05:28 PM
06-03-2004 05:28 PM
SolutionI wouldn't suggest to restore it from ignite particularly if you added more logical volumes.
One another way is to "rename" the logical volumes. However, you will need to determine the usage of the logical volumes. For ex.,
#mkdir /test
#mount /dev/vg02/lvol1 /test
#cd /test
Note the contents of /test and see how it was used. For ex., if you made out that it was /oracle before, then find out the corresponding logical volume from /etc/fstab file say lvora. Then you can rename lvol1 to lvora by following these steps
#cd /
#umount /test
#mv /dev/vg02/lvol1 /dev/vg02/lvora
#mv /dev/vg02/rlvol1 /dev/vg02/rlvora
Becareful while renaming the lvol names. It's bit painful if you have quite a few logical volumes under this VG.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 05:35 PM
06-03-2004 05:35 PM
Re: import prob.....
I just looked at your other thread about adding a logical volume to serviceguard. Is this issue related to it?.
If so, then I suppose that you may have this volume group already defined on the other system. You can generate the map file there and use it on this system and you don't have to go through these pains. Look at my previous response.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 05:58 PM
06-03-2004 05:58 PM
Re: import prob.....
I will try to rename the lvols. The only problem that I have is ... most of the lvols are empty. So is there any unique address or some information for each lvol?
ps. Do I need to put all the lvol to fstab? since I'm not able to see vg02?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2004 06:35 PM
06-03-2004 06:35 PM
Re: import prob.....
you don't know how happy I am. Thanks to you all.
now i just need to figure out my MC/SG is having difficulty activating package. Something to do with vgchange and node thing. But thanks for the help.