Operating System - HP-UX
1837238 Members
2123 Online
110115 Solutions
New Discussion

Remove a non root Volume Group without shutting down?

 
SOLVED
Go to solution
TechC
Regular Advisor

Remove a non root Volume Group without shutting down?

Hello all,
I have an HPUX 11.11 box with 3 volume groups VG00, VGWORK, and VGGEN respectively. I need to remove VGWORK and use the existing disk for VG00. VGWORK is currently active. There is one existing lvol in VGWORK. There is only one 4 GB
pvol or disk belonging to VGWORK. What I want to know is, what are the correct steps to...
1.Remove VGWORK.
2.Add the freed disk disk to my VG00 vol group.
3.If possible, do this without rebooting.
Thanks
James
8 REPLIES 8
Marco A.
Esteemed Contributor

Re: Remove a non root Volume Group without shutting down?

Actually the reboot is not necessary...!

Go ahead with the changes...

Regards,

Marco
Just unplug and plug in again ....
TechC
Regular Advisor

Re: Remove a non root Volume Group without shutting down?

Great, I would prefer not to reboot as I would have to notify many people.
Hoewver, I need the correct steps to follow to achieve this this task.

James
Patrick Wallek
Honored Contributor

Re: Remove a non root Volume Group without shutting down?


1. Unmount any filesystems that are part of vgwork
2. Deactivate vgwork - vgchange -a n vgwork
3. Export vgwork (this blows away the VG) - vgexport vgwork
4. pvcreate the disk from vgwork - pvcreate -f /dev/rdsk/c?t?d?
5. Extend root VG - vgextend vg00 /dev/dsk/c?t?d?
6. Do whatever you need to do with the disk -- extend LV's, create LV's whatever.

No reboots are necessary.
James R. Ferguson
Acclaimed Contributor

Re: Remove a non root Volume Group without shutting down?

Hi James:

If you want to save any data in the filesystem associated with the logical volume associated with 'vgwork', then backup that data do with it what you need to do.

That said, you can do:

# vgexport /dev/vgwork
# pvcreate -B /dev/rdsk/cXtYdZ ...the appropriate disk
# vgextend vg00 /dev/dsk/cXtYdz

Now, 'lvextend' or 'lvcreate' as you need using your new physical disk.

These operations will not require a reboot.

All said, *however*, I would advise you _NOT_ to create a vg00 with multiple physical disks to house non-standard operating system logical volumes and filesystems if that is your goal.

Indeally, vg00 should contain only the operating system and be devoid of any application (non-OS) data. This makes upgrades and system recoveries very much simpler and cleaner. Your boot disk (vg00) should also have _every_ logical volume mirrored for high availability. If that is the reason for adding another physical volume to your existing vg00, then you are doing the right thing!

Regards!

...JRF...
TechC
Regular Advisor

Re: Remove a non root Volume Group without shutting down?

Well Thank you guys for the help. i love this site!
JRF,
The reason I am adding this disk is I am out of physical extents on this volume group and don't need vgwork any longer. I need to extend the /home/ftpuser lvol because this is where our ftp data is uploaded every night, and i need to extend this due to the data growing.
I know this should probably not have been setup that way but I have "inherited" this box and a program in another state is actually pointing to this box. Any suggestion would be appreciated but I know we have to keep this about LVM inthis section of the forums.
Thanks again
James
James R. Ferguson
Acclaimed Contributor
Solution

Re: Remove a non root Volume Group without shutting down?

HI (again) James:

You do mirror your vg00 logical volumes, don't you? Adding only one physical volume to vg00 in order to grow a logical volume that is mirrored is going to present a problem; viz. for mirroring to be effective, you need to maintain mirrored extents on seperate physical volumes -- strict allocation. The path down which you are heading deserves the addition of *two* physical disk.

If you truly have only one more physical volume, I would not add it to vg00 but rather keep it in its own volume group. You can create a filesystem and mount the 'ftpuser' as a discrete mountpoint on that volume group. To me, that's musch cleaner.

Regards!

...JRF...
TechC
Regular Advisor

Re: Remove a non root Volume Group without shutting down?

JRF,
The box is not mirrored actually..I know that is terrible, however like I said this box was inehrited by me so I did not have a say on how it was built..I do Ignite tapes regularly if that means anything..
I am going to take your advice and leave the VG00 alone and create a lvol in a different volume group and mount /home/ftpuser there.
That should work for my objective I believe.
Thanks for the vision and clarity.
James
TechC
Regular Advisor

Re: Remove a non root Volume Group without shutting down?

Thanks again to everyone..
I was able to remove the volume group and
extend the lvol using your instructions.

James