How to Remove Primary Swap on HP-UX 11iv3 Online by Dusan Baljevic

1,127 views

Published on

How to Remove Primary Swap on HP-UX 11iv3 Online

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,127
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

How to Remove Primary Swap on HP-UX 11iv3 Online by Dusan Baljevic

  1. 1. How to remove primary swap on HP-UX 11iv3 online By Dusan Baljevic (dusan.baljevic@ieee.org) Remove primary swap and move it into another volume group. To remove the primary swap, we need to ensure that the new swap device has at least enough space that “reserve” requires. Otherwise, swapoff(1M) command will fail! Step 1: Add new primary swap (can be in other VG but that is strongly not recommended!) # lvcreate -C y –r n -L 8192 -n lvswap2 /dev/vgswap # swapon -f /dev/vgswap/lvswap2 # swapinfo -tm Mb TYPE AVAIL dev 8192 /dev/vg00/lvol2 dev 8192 /dev/vgswap/lvswap2 reserve memory 3876 total 20260 MbMbPCT START/ USED FREE USED 0 8192 0% Mb LIMIT RESERVE 0 - PRI 1 0 8192 0% 0 - 1 1301 963 2264 -1301 2913 17996 25% 11% - 0 - START/ Mb FREE USED LIMIT RESERVE 8192 0% 0 - PRI 1 NAME Step 2: Remove primary swap on-line # swapoff /dev/vg00/lvol2 # lvrmboot -s vg00 # swapinfo -tm Mb MbMbPCT TYPE AVAIL USED dev 8192 0 /dev/vgswap/lvswap2 reserve 1291 memory 3876 963 total 12068 2254 -1291 2913 9814 25% 19% - 0 - NAME
  2. 2. Step 3: Add line into /etc/fstab for the new primary swap and reboot the server /dev/vg00/lvol3 / vxfs delaylog 0 1 /dev/vg00/lvol1 /stand vxfs tranflush 0 1 /dev/vg00/lvol4 /home vxfs delaylog 0 2 /dev/vg00/lvol5 /tmp vxfs delaylog 0 2 /dev/vg00/lvol6 /usr vxfs delaylog 0 2 /dev/vg00/lvol7 /var vxfs delaylog 0 2 /dev/vg00/lvol8 /var/tmp vxfs delaylog 0 2 #/dev/vg00/lvdump3 / dump defaults 0 0 /dev/vgswap/lvswap2 / swap defaults 0 0 After the reboot, check swap status and confirm that non-root volume is now the primary swap: # swapinfo -tm Mb MbMbPCT TYPE AVAIL USED dev 8192 0 /dev/vgswap/lvswap2 reserve 1283 memory 3876 950 total 12068 2233 START/ Mb FREE USED LIMIT RESERVE 8192 0% 0 -1283 2926 9835 25% 19% - 0 PRI 1 NAME - However, because we did not initialize the disk in vgswap with “-B” option, it does not contain the Boot Area, and cannot be added with “lvlnboot -s /dev/vgswap/lvswap2”. As a result, this is reported: # lvlnboot -v Boot Definitions for Volume Group /dev/vg00: Physical Volumes belonging in Root Volume Group: /dev/disk/disk6_p2 -- Boot Disk Boot: lvol1 on: /dev/disk/disk6_p2 Root: lvol3 on: /dev/disk/disk6_p2 No Swap Logical Volume configured No Dump Logical Volume configured

×