Operating System - HP-UX
1748252 Members
3827 Online
108760 Solutions
New Discussion

Re: Re attach volume group after install new OS

 
Dree
Advisor

Re attach volume group after install new OS

Dear Expert,

 

I want to install OS HP-UX version 11.23 from version 11.11.

I have a lot of volume group that consist of data. Can I only install the OS without destroy any of data file?

In other word, I can re-attach again to my new operating system.

 

Thanks

Adrian Tjahjana

5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: Re attach volume group after install new OS

(You might want to cold install 11.31 instead of 11.23.)

 

So want to cold install on your system disks and leave your data disks alone?

RAJD1
Valued Contributor

Re: Re attach volume group after install new OS

Hi Adrian,

You can install 11.11 to 11.23  OS  , keeping the other volume groups (VG's) intact.

 

Can I only install the OS without destroy any of data file?

- Yes, if the VG's are in storage disk , you have to export the vgs prior to the upgrade and keep the map files, then after installation  you have to import the vgs and mount the filesystem as it was before.

 

- To accomplish that :

1. Before installation keep mapfiles of the VG's offsite or keep in other server on the network , and export the vgs.

# vgexport -p -v -s -m vg_name.map vg_name   ## -p  preview mode 

# umount /FS  ## Unmount all FS after apps stopped.

# vgchange -a n vg_name

# vgexport vg_name

 

2. Keep copy of /etc/fstab  

-  details of # mount -p 

- # vgdisplay <vg_names> l vgdisplay -v <vg_names> ; strings /etc/lvmtab

- # ls -lrt /dev/*/group   ## group file info.

 

 

- After OS installation: 

- copy mapfiles to any director.

- Create the mkdir/mknode for the vgs:

- # mkdir /dev/vgname ; mknod /dev/vgname/group c 64 0xZZ00    # [ Where ZZ is the minor number same as above ]

- Import the vgs.

- # vgimport -v -s -m vg_name.map vgname

- # vgchange -a y vgname

- # copy the nonvg00 entry from old /etc/fstab to new fstab.

- # create those mount points per nonvg00 FS in /etc/fstab

- # mount -a 

- # verify.

- # Done.

 

 

 

Hth,

Raj D.


Dree
Advisor

Re: Re attach volume group after install new OS

Hi,
Your concept is right, like we format lets say windows OS. I can attach again my data without restoring back.
Dree
Advisor

Re: Re attach volume group after install new OS

Hi Raj,
Thanks for your brilliant explanation, So in the conclusion I must do vgexport and save the map file in other place, and then save /etc/fstab file. After OS installation I only do vgimport from map file that I save and copy my stab.

I try first for this. it will be destroy the installation if I do wrong step?

Thanks
RAJD1
Valued Contributor

Re: Re attach volume group after install new OS

Hi Dree,

 

> I must do vgexport and save the map file in other place, and then save /etc/fstab file,

 

- Yes, before starting fresh installation , you have to keep the current vg's map file &  current system configuration. And to use them after installation for importing the vgs.


- When you import the vgs from the map files, same set of disks comes in for the respective vgs. It queries the meta data in the disk(s) and constructs the vg.  (Hope you have done vgexport/ vgimport tasks earlier to get familiar with it.) 

 

- When you build a fresh os, your filesystems other than vg00 filesystems doesnt contains on the /etc/fstab ,

So the non-vg00 Filesystem entires has to be populated in the /etc/fstab . For this you have to refer old /etc/fstab file. and copy paste the entries.

 

- After vgs imported. and /etc/fstab populated, you can mount the non-VG00 filesystems using # mount /filesystem_name  command.

 

 

Hope this helps...

Raj D.