Operating System - HP-UX
1834312 Members
2483 Online
110066 Solutions
New Discussion

How to recreate a volume group I am using right now

 
mudongxiao
Advisor

How to recreate a volume group I am using right now

I have a volume group vg03 I am using right now.
I umount all the filesystem
then mediainit /dev/rdsk/c0t11d0,
I got the message:
unable to set exclusive mode: Device busy.

I am not sure what's the procedure to re-create a volume group .
Can you tell me how to do it
4 REPLIES 4
The Real MD
Valued Contributor

Re: How to recreate a volume group I am using right now

Can you break down what you are trying to do.

Many Thanks

Martin.
Pete Randall
Outstanding Contributor

Re: How to recreate a volume group I am using right now

I would vgexport it:

vgexport -m -s /tmp/vg03.map /dev/vg03

Then you simply need to run pvcreate (-f, probably), vgcreate, lvcreate.


Pete


Pete
mudongxiao
Advisor

Re: How to recreate a volume group I am using right now

I run the vgexport, but it show me the "vg03 is still active"
Patrick Wallek
Honored Contributor

Re: How to recreate a volume group I am using right now

1) Stop any applications using the filesystems from the VG.

2) BACK UP ALL DATA AT LEAST TWICE

3) Unmount filesystems

4) Deactivate the VG with the 'vgchange -a n vgname' (where vgname is your VG)

5) Recreate the /dev/vg?? directory - mkdir /dev/vgname (where vgname is your VG)

6) Recreate the VG's group file - 'mknod /dev/vgname/group c 64 0x0?0000 (where vgname is your VG and the ? in 0x0?0000 is a unique number among ALL VGs - You should do an ls -l /dev/vgname/group before the vgexport to note the number currently in use)

7) Now recreate your VG with vgcreate

8) Recreate your LVs

9) Mount the filesystems

10) Restore your data