Operating System - HP-UX
1831666 Members
3489 Online
110029 Solutions
New Discussion

Adding a new disk for mirroring

 
Vijay Dsouza
Frequent Advisor

Adding a new disk for mirroring

Friends,
In my existing setup of 11.23 I have a disk of 300 GB on which a filesystem exists (CRITICAL DATA), I have decided to mirror this to another disk after adding the new disk of same capacity. Are my steps correct after recognising the disk to implement a disk mirror?

1. pvcreate -f /dev/rdsk/NEWDISK

2. vgextend /dev/vg01 /dev/dsk/NEWDISK

3. lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/NEWDISK

Appreciate a quick reply , just wanna be sure to avoid :(.....

Thanks
Vijay
6 REPLIES 6
Torsten.
Acclaimed Contributor

Re: Adding a new disk for mirroring

For normal data disks (not boot disks) the commands are fine.

Leave "-f" away in step 1, this is more safe.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven E. Protter
Exalted Contributor

Re: Adding a new disk for mirroring

Shalom,

If you have mirror/ux installed, your procedure will work.

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
Sharma Sanjeev
Respected Contributor

Re: Adding a new disk for mirroring

Hi Vijay

Your Steps are correct, but if you have more lvol you can use for loop otherwise you have to do lvextend for all lvol
e.g
for i in /dev/vg01/lvol*
do
lvextend -m 1 /dev/vg01/$i /dev/dsk/NEWDISK
done

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Adam Winebaugh
Regular Advisor

Re: Adding a new disk for mirroring

Vijay,
YOur process will work. I tend to not use the -f option unless I have no choice. You don't want to force an operation unless you absolutley have to.
Khairul_1
Frequent Advisor

Re: Adding a new disk for mirroring

Hi Vijay,

Your process is OK. You can leave -f because your secondary disk is new. If you use -f no problem only force it to create physical volume.

Thanks
Khairul
Bangladesh
Vijay Dsouza
Frequent Advisor

Re: Adding a new disk for mirroring

Thanks Friends ! I have done this activity and things are fine . As advised i have not used the -f option because the disk is new and it does not have any previous LVM information on it.