- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Is it ok to mirror 2 swap lvols?
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
01-08-2009 09:48 PM
01-08-2009 09:48 PM
I have an HP-UX 10.20 box with Mirror Disk installed. I want to mirror all the logical volumes on the root disk c3t6d0 to c3t4d0
My first question is regarding swap lvols.
Shown below.
There are 2 swap logical volumes on the root disk. I believe I read this is not an efficient way to spread swap but that is another story.
Is it a must or is it necessary or even suggested to mirror both of these swap logical volumes to the root disk mirror? How will mirroring or not mirroring both swaps
effect the box if one of the mirrors fail?
+++++++++++++++++++++++++++++++++++++++++++++
# swapinfo
dev 1953792 0 1953792 0% 0 - 1 /dev/vg00/lvol2
dev 8531968 0 8531968 0% 0 - 1 /dev/vg00/lvol4
+++++++++++++++++++++++++++++++++++++++++++++
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c3t6d0 (10/0/15/1.6.0) -- Boot Disk
/dev/dsk/c3t5d0 (10/0/15/1.5.0)
/dev/dsk/c3t4d0 (10/0/15/1.4.0)
Boot: lvol1 on: /dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c3t6d0, 0
+++++++++++++++++++++++++++++++++++++++++++++
My second question is also regarding mirroring the root disk. The lvols are pasted below. All of the lvols in the root volume group are on a single disk c3t6d0 with the exception of lvol10
which spans c3t6d0 and c3t5d0.
This logical volume has nothing to do with the OS and contains only user data.
Now is it necessary to mirror this lvol in order to have a good root mirror. If my original root disk dies can I still boot to the secondary root disk with no problems?
Thank you
--- Logical volumes ---
LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 140
Current LE 35
Allocated PE 35
Used PV 1
LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 1908
Current LE 477
Allocated PE 477
Used PV 1
LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 8332
Current LE 2083
Allocated PE 2083
Used PV 1
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 84
Current LE 21
Allocated PE 21
Used PV 1
LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 652
Current LE 163
Allocated PE 163
Used PV 1
LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 872
Current LE 218
Allocated PE 218
Used PV 1
LV Name /dev/vg00/lvol9
LV Status available/syncd
LV Size (Mbytes) 500
Current LE 125
Allocated PE 125
Used PV 1
LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 64
Current LE 16
Allocated PE 16
Used PV 1
LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 20
Current LE 5
Allocated PE 5
Used PV 1
LV Name /dev/vg00/lvol10
LV Status available/syncd
LV Size (Mbytes) 22148
Current LE 5537
Allocated PE 5537
Used PV 2
--- Physical volumes ---
PV Name /dev/dsk/c3t6d0
PV Status available
Total PE 4340
Free PE 0
PV Name /dev/dsk/c3t5d0
PV Status available
Total PE 4340
Free PE 0
PV Name /dev/dsk/c3t4d0
PV Status available
Total PE 4340
Free PE 4340
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2009 10:11 PM
01-08-2009 10:11 PM
Re: Is it ok to mirror 2 swap lvols?
The server was obviously built in desperate times.
I cannot call it production-quality :)
Anyway, back to your questions:
a) Ideally, all device-based swaps should
be mirrored (unless they are SAN-based
and protected).
When swap space is not protected, if it happens to be in use when the physical volume dies or has problems, you risk server
crash and data corruption.
b) Since lvol10 mounts some file system with
user data (looks like not a critical item), then "close your eyes" and forget about
mirroring (as long as you have
some mechanism to recover it).
c) By the same token, best practices
are against having two swap areas on
same physical volumes. If the swap
gets used, the chances of very poor
I/O performance are great.
d) Finally, your HP-UX 10.20 is pushing
its luck. The operating system is not
supported any more :)
Cheers,
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2009 10:37 PM
01-08-2009 10:37 PM
Re: Is it ok to mirror 2 swap lvols?
VK2COT, Thanks for the reply.
Man I know the 10.20 stuff is outdated but there are actually quite a few in the environment I work in and they run software that runs only on this platform. This is a different box than the last few posts.
Ok question..Should I delete one of these swap volumes then? What steps does removing one of these entail? It does not look like they are being used according to the swapinfo output. I had read that two on one disk is a bad idea but unfortunately I inherited this box.
I will heed your advice and mirror the swap volumes in any case whether it be one or both.
lvol10 I have backups for and it is just data
so I will not mirror it. I will have to just pound it out of fstab if the disk dies so it doesn't hang.
Thanks again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2009 12:31 AM
01-09-2009 12:31 AM
Re: Is it ok to mirror 2 swap lvols?
a) You have two swap devices.
Primary swap must have contiguous
allocation policy (lvol2).
That is because the kernel does not know how to understand LVM or VxVM.
Secondary swap (lvol4) does not have to
use contiguous allocation policy.
In fact, I would like to know what
lvdisplay says for lvol4. Maybe whoever
created it also enforced contiguous allocation.
b) Your primary swap seems to be around 1 GB,
and secondary 4.2 GB:
dev 1953792 0 1953792 0% 0 - 1 /dev/vg00/lvol2
dev 8531968 0 8531968 0% 0 - 1 /dev/vg00/lvol4
c) If we assume that secondary swap is
also contiguous, then I would
get rid of primary swap lvol2 (reboot is
required), and promote secondary swap lvol4
into primary (and mirror it!).
If lvol4 is not contiguous, then your effort
might be too much to redesign the swap
space. If it worked for so long, let it be :)
Cheers,
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2009 12:44 AM
01-09-2009 12:44 AM
Re: Is it ok to mirror 2 swap lvols?
As keenan says:
Swap space is one of these situations where we don't want LVM to worry about tracking and recovering changes in the volume. After a reboot, the data in a swap area is gone, i.e., it is completely transient. The only problem with changing the Consistency Recovery setting for a volume is that the volume cannot be opened in order to change the configuration. The only way this can be achieved for Primary Swap is to boot the system in LVM Maintenance Mode and to activate vg00 without starting the resynchronization process. It is lots of work to go through, but it will mean a reduction in IO to the root/boot disk, and on reboot, it will reduce the time the system takes to resynchronize all volumes in vg00 after a failure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2009 01:12 AM
01-09-2009 01:12 AM
Re: Is it ok to mirror 2 swap lvols?
This is always good to have the swap also mirrored as in case on e disk failures if u dont have the sap mirrored then ur system will not have any swap swap and might lead to an uneventful crash.
As i can see that u r using the 16 GB Disk and also that u r using 10.20 u must always have the Ignite backup ready for ue system and that also updated whwnever u are making certain changes to the system as 10.20 is outdated.
The other thing is that yes u can remove the swap on lvol4 to free up some space as the swapinfo says that the system is not using that much of swap.
if ur system is not using the swap that much still i would suggest u to remove lvol4 as swap to be removed rather than the lvol2.
Also can u please post the output for the coammnd #lvdisplay -v /dev/vg00/lvol4
Regards
Sujit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2009 04:39 AM
01-09-2009 04:39 AM
Re: Is it ok to mirror 2 swap lvols?
You not only could mirror swap volumes, you should and you should mirror both. (Although for the rest, your system will run fine with a non-mirrored swap).
If swap is not mirrored, your system will crash when your disk goes bad.
Further, be sure to create the boot, root and swap volumes in exactly the same way as they are on the primary disk. An lvdisplay -v of uour root, stand and swap LV should list the same extent numbers on both sides of the mirror. For non-boot LV's this doesn't really matter.
Also, disk /dev/dsk/c3t4d0 is not bootable. So if the primary disk goes down and is defective, your system will keep running, but it will no longer be able to boot. So re-create this physical volume with -B option and add boot information to the ISL partition.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2009 08:07 AM
01-09-2009 08:07 AM
Re: Is it ok to mirror 2 swap lvols?
VK2,
Here is my lvdisplay -v /dev/vg00/lvol4 op
Looks like it is contiguous but I would have to fly down to California to reconfigure the swap space. So maybe i will let it be.
++++++++++++++++++++++++++++++++++++++++++++
LV Name /dev/vg00/lvol4
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 8332
Current LE 2083
Allocated PE 2083
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
+++++++++++++++++++++++++++++++++++++++++++++
Orange adm,
Looks like MWC is on for both swap volumes...
Wish I was closer to the box so I could reconfigure.
Sujit kumar,
I have pasted the lvol4 output above.
I would like to eliminate the lvol4 swap volume if possible while the box is up if possible.
In my situation I do not think lvol4 is ever touched. If not I think I should remove it so I do not have two swap volumes on one disk and possibly improve performance. Does it use up lvol2 and then go to lvol4 or does it distribute across both evenly when the system uses swap?
Wim,
I will run the command to make sure I have my extents in correct order before I mirror. I have the doc for that. Thanks for the reminder.
As far as running pvcreate -B /dev/dsk/c3t4d0.
This is something I was looking for online last night. This disk is already a member of vg00 so do I need to vgreduce this pv from vg00 and then run pvcreate -B and mkboot commands? Or can I just run the pvcreate command without removing from vg00?
Thanks again all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2009 04:26 PM
01-09-2009 04:26 PM
SolutionYou asked :
> I have pasted the lvol4 output above.
> I would like to eliminate the lvol4 swap
> volume if possible while the box is up if
> possible.
> In my situation I do not think lvol4 is
> ever touched. If not I think I should
> remove it so I do not have two swap
> volumes on one disk and possibly improve
> performance. Does it use up lvol2 and then
> go to lvol4 or does it distribute across
> both evenly when the system uses swap?
Dusan's answer:
Although the screenshot was a bit garbled,
it looks like both your swap spaces have same priority (1). So, if your server needs
some swap, it will attempt to use it from
both devices at the same time.
The problem is that swap spaces are not
equal in size (ratio is lvol2:lvol4 = 1:4),
so lvol4 would be used much more if high
swap utilisation happens.
Since your primary swap is so small (I am
not sure what your RAM is), unless you
only have, say 512 MB of RAM, or 1 GB RAM,
anything bigger and you are in trouble.
So, if your RAM is not bigger than 1 GB, you
could remove lvol4, providing you do not
have some applications that require large
swap reservations when they start. To test
it, you could simply disable the secondary
swap, monitor it for a while, and then
remove it if nobody complains.
You asked:
> As far as running pvcreate -B /dev/dsk/c3t4d0.
> This is something I was looking for online
> last night. This disk is already a member
> of vg00 so do I need to vgreduce this pv
> from vg00 and then run pvcreate -B and
> mkboot commands? Or can I just run the
> pvcreate command without removing from
> vg00?
Dusan's answer:
If there are no used PV extents on the disk, you could do the command straight away.
It will ask you to use flag "-f" (force).
I would still prefer to do it properly: reduce the volume group and then run the "pvcreate -B" command.
Cheers,
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2009 06:01 PM
01-09-2009 06:01 PM
Re: Is it ok to mirror 2 swap lvols?
Thanks for the answers.
Ok my physical memory is roughly 2gb and the box is remote so i guess I am stuck with the swap setup the way it is and will mirror both lvol2 and lvol4.
As far as the pvcreate goes I will do the right thing and vgreduce the disk and then add it back and complete the mirroring.
Thanks to all who replied.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2009 06:02 PM
01-09-2009 06:02 PM
Re: Is it ok to mirror 2 swap lvols?
Thanks