1837650 Members
2844 Online
110117 Solutions
New Discussion

Disk Mirror Cookbook

 
SOLVED
Go to solution
Jeff Fry
Occasional Contributor

Disk Mirror Cookbook

I'm looking for a disk mirror cookbook for HPUX 11.00.

I need to add a new disk (already done), use it to mirror an existing smaller volume group, break the mirror, remove the original disk, and extend the size of the volume group to the capacity of the new disk.

2nd task is to convert 3 small disks (each on it's own disk on it's own volume group onto one disk....can I mirror to do this? Do I backup & restore? Any advice? I'm trying to do as much online as possible without down time!

Thanks!
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor

Re: Disk Mirror Cookbook

Hi Jeff:

If I understand your situation correctly, the fundamental problem is that the geometry of the *volume group* (particularly, 'max_pe' and 'pe_size') is fixed at the time of 'vgcreate' and cannot be changed short of recreating (from scratch) the volume group.

Extending the volume group with new physical disk is not going to change this fixed geometry. Too, mirroring is done at the *logical volume* level, so aside from moving data from physical disk to physical disk, you are not going to be able end up with a potentially larger filesystem.

In fact, when you migrate data with mirroring (as with 'lvmerge') the two mirror copies must be of exactly the same size.

I think you are going to need to recreate volume groups from scratch and move your data with 'cpio' or reload from a backup tape. In this way, you can appropriately utilize larger disk.

Regards!

...JRF...

Misa
Frequent Advisor
Solution

Re: Disk Mirror Cookbook

HP CE's have been rumored ;) to have a useful LVM cookbook. The "System Administration Tasks" (@10.20; now "Managing Servers and Workgroups" or some such) book has useful LVM info.

But for your questions -- I've been terse rather than verbose, not knowing your experience level -- task 1:

0. If by "add a new disk (already done)" you mean you've put it in a new VG, you may want to reconsider & put in existing, smaller VG.
1. use the vgextend command to add the new, larger disk to the existing smaller VG
2. vgdisplay -v to see the disks in the existing VG
3. use the pvmove command to move extents from the original disk(s) in the VG to the new, larger disk
4. use vgreduce to get the original disk out of the VG

There should be no need to do any mirroring or extending size of the VG. I don't think my procedure requires anything but basic LVM. Also, no downtime is required AFAIK. I've pvmoved extents underneath a running Oracle (filesystem) database w/o problems.

Task 2: AFAIK, your best bet is to backup/restore because of the fact that they're in separate VGs -- pvmove won't work across VGs. I have a nagging feeling that there may be a better way to do this, but it's not coming to me at the moment.

--Misa
Jeff Fry
Occasional Contributor

Re: Disk Mirror Cookbook

Thank you both, appreciate the info. I suspected the small disks would be a restore but hoped there was a trick.

I'll do the steps to roll to the bigger disk...thanks for that!