Operating System - HP-UX
1834827 Members
2601 Online
110070 Solutions
New Discussion

un mirrror or Split the mirror

 
SOLVED
Go to solution
Asif_8
Regular Advisor

un mirrror or Split the mirror

Hi !
Server = rp2405
Os =hp-ux11i
2 disk 36 Gb
Group vg00
I want un mirror the disk or volume I want to use 2nd disk for other purpuse
how to split or un mirrior the disk. how to user mirror disk for other application
thanks
11 REPLIES 11
Karthik S S
Honored Contributor
Solution

Re: un mirrror or Split the mirror

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=305908

More results from ITRC,
http://tinyurl.com/2snnl

-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Shaikh Imran
Honored Contributor

Re: un mirrror or Split the mirror

Hi,
Be careful if you are trying to remove the mirror of the root disk.

DO-NOT-FORGET TO USE lvlnboot -R if you are doing it for root VG.
1)Remove the LV's from the mirror
#/usr/sbin/lvsplit [-A autobackup] [-g PhysicalVolumeGroup] lv_path ...


Up to 127 logical volumes can be specified on the command line. All logical volumes must belong to the same Volume group.

2)Reduce the Volume group to 1

#vgreduce vg01 /dev/dsk/cxtxdx.

Now you can sucessfully remove the disk

Regards
I'll sleep when i am dead.
Rajeev  Shukla
Honored Contributor

Re: un mirrror or Split the mirror

Reduvfce the mirror copy to 0 and then you can use the disk, First choose the disk you want to use for your purpose and remove from root mirror.
use

for i in `vgdisplay -v vg00|grep "LV Name"|awk '{print $3}'`
do
lvreduce -m 0 $i /dev/dsk/
done

Then do a vgreduce and remove that disk from root vg.
vgreduce /dev/vg00 /dev/dsk/

You can then use your disk
jayan_3
Occasional Contributor

Re: un mirrror or Split the mirror

One More Very IMPORTANT Task is to update the lvm bootinformation using the

lvlnboot -R command

all the best

wip
Sanjiv Sharma_1
Honored Contributor

Re: un mirrror or Split the mirror

Trond Haugen
Honored Contributor

Re: un mirrror or Split the mirror

As you have already got the answer to your question I would considder this.
2 x 36 GB shlould leave some space even with all the system volumes mirrored. On option might be keeping that and creating new lvols that are not mirrored.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Asif_8
Regular Advisor

Re: un mirrror or Split the mirror

thanks all of them
1. after unmirror. I want to erase every data from 2nd disk and create knew volume

2.what is differen Lvreduce or lvsplit command


Michael Tully
Honored Contributor

Re: un mirrror or Split the mirror

One of the links provided is somewhat confusing.

To unmirror:
lvreduce -m 0 /dev/vg00/lvolX (for each logical volume)

To remove the disk from the volume group
vgreduce /dev/vg00 /dev/dsk/cXtYdZ (substitute you disk)

The difference is that 'lvreduce' removes the mirror, whilst 'lvsplit' splits a mirrored pair for the purpose of creating a backup. The man pages for these commands will provide further information. To use the disk, you can create another volume group. e.g. below
mkdir /dev/mygroup
mknod /dev/mygroup/group c 64 0x020000
vgcreate -p 128 /dev/mygroup /dev/dsk/cXtYdZ
lvcreate -n myvol /dev/mygroup
lvextend -L /dev/mygroup/myvol

See man pages for further details. Once you 'lvreduce/vgreduce' the mirror and disk, the data has gone.
Anyone for a Mutiny ?
Sanjiv Sharma_1
Honored Contributor

Re: un mirrror or Split the mirror

Hi,

Run the following command
# pvcreate -f /dev/rdsk/cxtxdx
cxdxtx is the device file for the disk you want to erase data.
# mkdir /dev/vg05 (vg05 is new vgname)
# mknod /dev/vg05/group c 64 0x050000
# vgcreate /dev/vg05 /dev/dsk/cxdxtx
# lvcreate -L 20000 /dev/vg04
# newfs -F vxfs -o largefiles /dev/vg05/rlvol1
# mkdir /newpountpoint (mount point as per your requirement)
# mount /dev/vg05/lvol1 /newmountpoint

This completes the task.

Difference betwen lvreduce and lvsplit
lvreduce --> decrease space allocation or the number of mirror copies of logical volumes
lvsplit --> split mirrored LVM logical volume into two logical volumes

Do man lvreduce and man lvsplit for more details.

hth.
Everything is possible
Sanjiv Sharma_1
Honored Contributor

Re: un mirrror or Split the mirror

Oppsssssss..

# lvcreate -L 20000 /dev/vg04

You can create single 36 GB lvol or multiple smaller size lvol

Say lvol1 20 GB and lvol2 16 GB
# lvcreate -L 16000 /dev/vg04

Create new filesystems on each and mount them on seperate filesystems.

Everything is possible
Asif_8
Regular Advisor

Re: un mirrror or Split the mirror

thanks again !



To break the mirror..
# lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c2t2d0
# lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c2t2d0
# lvreduce -m 0 /dev/vg00/lvol3 /dev/dsk/c2t2d0
==> Repeat for the rest of the lvols.
# vgreduce vg00 /dev/dsk/c2t2d0
# lvlnboot -v

can i Run lvlnboot -R

asif