1837365 Members
3288 Online
110116 Solutions
New Discussion

Removing mirroring

 
SOLVED
Go to solution
Porus H Havewala
New Member

Removing mirroring

Hi,

HP-UX newbie question here....

Our development computer has mirrored disks - this seems
to be a waste of space on development.

Mirror Copies Mount Directory
1 /srvrs
1 /stand
1
1 /
1 /tmp
1 /home
0 /opt
1 /usr
1 /var
1 /oradata

We can possibly gain as much as 10GB to use if we
remove mirroring on some filesystems.

Is there any quick and easy way to remove the mirroring
and recover the mirror space so that it can be used?
Can this be done without a total rebuild ie. back up and
restoring from backup.

Any help much appreciated.Thanks.

Regards,

Porus.
4 REPLIES 4
Steven Sim Kok Leong
Honored Contributor
Solution

Re: Removing mirroring

Hi,

Take /var for example ie. /var is mounted on /dev/vg00/lvol10. You do not need to un-mount or backup/restore the filesystems.

Just follow the following two steps to remove the mirror copy of /var.
1) lvsplit /dev/vg00/lvol10
2) lvremove /dev/vg00/lvol10b
[Note: lvol10b with "b" appended is the mirror copy which is not mounted, thus you can lvremove the lvol10b safely while lvol10 is still being mounted.]

Regards.

Steven.
Daniel Correa
Advisor

Re: Removing mirroring

I would do "lvreduce -m 0 /dev/vg00/lvol10 /dev/dsk/XXXX. "XXXX" = disk device you want to remove mirroring from. Once you reduced all the lvols off the disk, if you want to put a new volume group on it don't forget to vgreduce it out of the current vg. "vgreduce /dev/vgXX /dev/dsk/XXXX.
Alan Riggs
Honored Contributor

Re: Removing mirroring

You can also do this in one step with the lvreduce command.

lvreduce -m 0 /dev/vg00/lvol3 /dev/dsk/c*t*d*

(Note: the disk specified is the one you wish to free, not the one you wish to remain in the volume group.)

Re: Removing mirroring

Hi Porus,

I agree with the above comments, the simpliest way to reduce a mirror is to execute:

lvreduce -m 0 /dev/vg??/lvol?

HP-UX supports one original and two mirrors of your data. As is standard UNIX numbering schemes start at "0". To add one mirrored copy you'd use "-m 1", to add the 2nd mirrored copy "-m 2". By using the "-m 0" you are simply telling the OS you no longer require mirroring.

Bernie
"Today is a good day"