- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to mirror a logical volume ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:15 AM
06-02-2009 05:15 AM
How to mirror a logical volume ?
Hi everyone,
I have a question about mirroring logical volumes, If anyone can help.
Background:
We have secondary swap set up on hp-ux server, I have a new disk which I'm going add to the server. I then want to use that new disk to mirror the secondary swap ?
Can any one provide the steps for carrying this out please ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:25 AM
06-02-2009 05:25 AM
Re: How to mirror a logical volume ?
what you want to do?
you want to create mirror for swap? or all other lv? clarifiy, thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:26 AM
06-02-2009 05:26 AM
Re: How to mirror a logical volume ?
LVM mirroring occurs at the logical volume level. Given your description, add the new physical disk to the volume group on which your secondary swap lives. That is, 'pvcreate' the physical disk; and 'vgextend' it into the appropriate volume group.
Next, simply 'lvextend' with the '-m 1' option the logical volume that represents your secondary swap device.
See the manpages for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:27 AM
06-02-2009 05:27 AM
Re: How to mirror a logical volume ?
at first you need a product Mirror/UX,
and if you have in your OE, you could mirror.
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:31 AM
06-02-2009 05:31 AM
Re: How to mirror a logical volume ?
To clarify, I just want to create a mirror for swap in case of a disk failure on the disk which the secondary swap is on. I dont want to mirror any other logical volumes.
So currently my existing secondary swap sits on c1t2d0 in a logical volume, I have a new disk which I'm about to add to server and want to use this new disk to mirror the existing secondary swap.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:35 AM
06-02-2009 05:35 AM
Re: How to mirror a logical volume ?
so add the new disk to the VG pvcreate -f /.../rnewdisk ( vgextend ) and them use lvextend -m 1 .... .
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:37 AM
06-02-2009 05:37 AM
Re: How to mirror a logical volume ?
first initialize a disk
1.pvcreate /dev/rdsk/c#t3d#
then extend the logical volume with mirroring
2.lvextend -m1 /dev/vg00/lvol1 /dev/dsk/C#t#d#
thanks and regards
Sajjad sahir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:39 AM
06-02-2009 05:39 AM
Re: How to mirror a logical volume ?
Why you are mirroring your swap?????
If you want then add new disk and use this disk as new secondary swap disk .Create swap disk by using swapon.
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:42 AM
06-02-2009 05:42 AM
Re: How to mirror a logical volume ?
to prevent HW failure.
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:45 AM
06-02-2009 05:45 AM
Re: How to mirror a logical volume ?
Guys, So from some of the replies, I'm doubting whether mirroring the secondary swap is actually needed? Can someone confirm this pls ... is it not normal practice to mirror secondary swap ? does it serve any purpose then ?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:52 AM
06-02-2009 05:52 AM
Re: How to mirror a logical volume ?
to mirror ( duplicate ) is the best practice,
for production system.
If something happend to your disk where is your swap located, and you don't have a mirror, your system will go down.
mirroring and duplicating is to prevent SPOF
Single point of failure
mikap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 05:53 AM
06-02-2009 05:53 AM
Re: How to mirror a logical volume ?
I think you can go ahead to add new swap disk instead of mirroring old swap disk.
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 06:01 AM
06-02-2009 06:01 AM
Re: How to mirror a logical volume ?
Okay, I see Sunny is suggesting to set up new swap on the new disk, howver I think I would prefer to duplicate (mirror existing one), so what would the commands be pls ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 06:06 AM
06-02-2009 06:06 AM
Re: How to mirror a logical volume ?
> So from some of the replies, I'm doubting whether mirroring the secondary swap is actually needed? Can someone confirm this pls ... is it not normal practice to mirror secondary swap ? does it serve any purpose then ?
Yes, you _do_ want to mirror your secondary swap. To not mirror it might mean that you have a server crash in the event that the disk on which the swap device exists fails.
If you don't care about high availablity then don't mirror in the first place.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 06:06 AM
06-02-2009 06:06 AM
Re: How to mirror a logical volume ?
Consider this --- You have a swap LV that is not mirrored and resides on a single disk. Your server is cruising along without any apparent problems. Suddenly it crashes. The cause? The disk your swap is on went bad and you didn't know. When your sever tried to actually page out to that device, it couldn't, so your server crashed!
Now, if that swap LV were mirrored, the server would not have crashed.
Having multiple swap areas is NOT THE SAME as having your swap areas mirrored.
Mirroring your swap areas provides redundancy and prevents a single point of failure (which everyone usually wants).
Adding additional swap areas provides just that, more swap that is NOT redundant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 06:22 AM
06-02-2009 06:22 AM
Re: How to mirror a logical volume ?
Thanks alot for the last replies, I understand now that I should mirror the swap, can any one be kind enough to show the steps in completing the task of mirroring.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 06:25 AM
06-02-2009 06:25 AM
Re: How to mirror a logical volume ?
Assume new disk is c1t3d0 (substitute whatever your disk is)
Assume swap is vg01/lvol1 (substitute whatever yours is)
# pvcreate /dev/rdsk/c1t3d0
# vgextend vg01 /dev/dsk/c1t3d0
# lvextend -m 1 /dev/vg01/lvol1 /dev/dsk/c1t3d0
Wait......
Once the mirror finishes syncing you are done.
NOTE: Depending on the size of your swap LV, this may take a while.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2009 06:37 AM
06-02-2009 06:37 AM
Re: How to mirror a logical volume ?
Thanks Patrick, I understand your steps. I will do this now. Thanks for your help.