Unmirror the disk in hp-ux 11i

 
Cathy Arora
Frequent Advisor

Unmirror the disk in hp-ux 11i

I have two disk and I had to mirrored them.
I am not quite sure what the steps are to unmirror it and later I have to create another volume.
Your help is appreciated.
Thanks
raj
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: Unmirror the disk in hp-ux 11i

lvsplit logical_volume_name

lvsplit /dev/vg01/lvol16

Thats it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Helen French
Honored Contributor

Re: Unmirror the disk in hp-ux 11i

You can do it with 'lvreduce' command:

# lvreduce -m 0 /dev/vgXX/lvol_name /dev/dsk/disk_device_file

Specify the disk you want to be free.
Life is a promise, fulfill it!
G. Vrijhoeven
Honored Contributor

Re: Unmirror the disk in hp-ux 11i

Hi,

If you need to split the mirror for e.g. backup i would go for the lvsplit. If you need the second disk for other purpuses i would go for lvreduce. In the second option you need to get the disk out of all the lvols before you can free it with vgreduce /dev/vgname /dev/dsk/c?t?d?

Hope this helps,

Gideon
Sunil Sharma_1
Honored Contributor

Re: Unmirror the disk in hp-ux 11i

Hi,

the best way is
#lvreduce -m 0 /dev/vgxx/lvolyy

volume group name and lvol name depend on your system.

Regards
Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Cathy Arora
Frequent Advisor

Re: Unmirror the disk in hp-ux 11i

THANKS ALL;
Is it possible that I can split my 2nd disk in such way that one logical volume will use as a back up and bring up system when 1st disk crashes and other logical volume can be used to create other file sytems etc.
if that is true then please help me with chain of commands.
Also I would like to undestand - how to get the disk out of all the lvols before free it with vgreduce.
I thought vgreduce /dev/vgname /dev/dsk/c?t?d takes out disk from all the vols.
Please help me clear my confusion.

Thanks again.
raj
Patrick Wallek
Honored Contributor

Re: Unmirror the disk in hp-ux 11i

In answer to your first question, no that will probably not work. If this disk was a mirrored boot disk, then you would need the entire disk to be able to recover your system if the primary disk crashed.

Now, to answer your second question -- You must first reduce *ALL* LVOLs off of this disk.

# lvreduce -m 0 /dev/vg??/lvol? /dev/dsk/c?t?d?

You must do the above command for *ALL* LVOLs on that disk.

Only then will you be able to vgreduce the disk out of the VG.

# vgreduce /dev/vg?? /dev/dsk/c?t?d?
Cathy Arora
Frequent Advisor

Re: Unmirror the disk in hp-ux 11i

Thanks Patrick.
ANother question is -How do find out if I already lvreduce some vols and do not remember which ones.
Any kind of list commnad for that?

Thanks again.
raj
Cathy Arora
Frequent Advisor

Re: Unmirror the disk in hp-ux 11i

Does anyone know how to check during unmirroring if lvreduce is done for all the
volumes. so that vgreduce can be proceeded.
Also how to check if unmirroring went OK after doing lvreduce and vgreducce by some command and not by briniging up the system by mirrored disk.
Thanks
raj
Patrick Wallek
Honored Contributor

Re: Unmirror the disk in hp-ux 11i

YOu can see what LVOLs are still on the disk by doing a:

# pvdisplay -v /dev/dsk/c?t?d?