SlideShare a Scribd company logo
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
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

More Related Content

DOCX
Emo 8086 code for Loop
MdAlAmin187
 
KEY
Ruby on the server
Gleb Mazovetskiy
 
PDF
Customizing Your Shell With Dotfiles
Clayton Parker
 
PDF
Docker tips-for-java-developers
Aparna Chaudhary
 
PPTX
HP-UX Swap and Dump Unleashed by Dusan Baljevic
Circling Cycle
 
PDF
UX at HP Enterprise
David Ismailov
 
PPT
HPUX Update Seminar Session 1 Dan Taipala
dtaipala
 
PPTX
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
Circling Cycle
 
Emo 8086 code for Loop
MdAlAmin187
 
Ruby on the server
Gleb Mazovetskiy
 
Customizing Your Shell With Dotfiles
Clayton Parker
 
Docker tips-for-java-developers
Aparna Chaudhary
 
HP-UX Swap and Dump Unleashed by Dusan Baljevic
Circling Cycle
 
UX at HP Enterprise
David Ismailov
 
HPUX Update Seminar Session 1 Dan Taipala
dtaipala
 
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
Circling Cycle
 

Viewers also liked (19)

PDF
HP-UX - Patch Installation
Hemnath R.
 
PPTX
HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...
Circling Cycle
 
PDF
HP Unix administration
Hemnath R.
 
PDF
HP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDF
E. Balauca
 
PDF
Basic config in Cisco router
Hemnath R.
 
PDF
Ignite ux-quickstart
Mohamed Kajamoideen
 
DOCX
HP-UX 11iv3 Private Kernel Parameter nfile by Dusan Baljevic
Circling Cycle
 
PDF
Hp ux x_server
raviranchi02
 
PDF
Networking concepts and terms
Hemnath R.
 
PPS
Hp Integrity Servers
Eddy Jennekens
 
DOC
HP-UX RBAC Audsys Setup by Dusan Baljevic
Circling Cycle
 
DOCX
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
Circling Cycle
 
PPT
Hp ux-11iv3-multiple-clones-with-dynamic-root-disks-dusan-baljevic-mar2014
Circling Cycle
 
DOCX
Better Settings for /tmp Filesystem on HP-UX by Dusan Baljevic
Circling Cycle
 
DOCX
Three CLI Methods to Find Console IP details on HP-UX by Dusan Baljevic
Circling Cycle
 
PDF
Superdome
santossskm2006
 
DOCX
HP-UX 11i Log File Management with Logrotate by Dusan Baljevic
Circling Cycle
 
DOCX
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
Circling Cycle
 
PPTX
HP-UX with Rsync by Dusan Baljevic
Circling Cycle
 
HP-UX - Patch Installation
Hemnath R.
 
HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...
Circling Cycle
 
HP Unix administration
Hemnath R.
 
HP Superdome 2 Partitioning Administrator Guide HP-UX 11iv3(August 2010).PDF
E. Balauca
 
Basic config in Cisco router
Hemnath R.
 
Ignite ux-quickstart
Mohamed Kajamoideen
 
HP-UX 11iv3 Private Kernel Parameter nfile by Dusan Baljevic
Circling Cycle
 
Hp ux x_server
raviranchi02
 
Networking concepts and terms
Hemnath R.
 
Hp Integrity Servers
Eddy Jennekens
 
HP-UX RBAC Audsys Setup by Dusan Baljevic
Circling Cycle
 
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
Circling Cycle
 
Hp ux-11iv3-multiple-clones-with-dynamic-root-disks-dusan-baljevic-mar2014
Circling Cycle
 
Better Settings for /tmp Filesystem on HP-UX by Dusan Baljevic
Circling Cycle
 
Three CLI Methods to Find Console IP details on HP-UX by Dusan Baljevic
Circling Cycle
 
Superdome
santossskm2006
 
HP-UX 11i Log File Management with Logrotate by Dusan Baljevic
Circling Cycle
 
HP-UX 11i LVM Mirroring Features and Multi-threads by Dusan Baljevic
Circling Cycle
 
HP-UX with Rsync by Dusan Baljevic
Circling Cycle
 
Ad

More from Circling Cycle (6)

PPT
Brief summary-standard-password-hashes-Aix-FreeBSD-Linux-Solaris-HP-UX-May-20...
Circling Cycle
 
DOC
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
Circling Cycle
 
DOCX
Ovclusterinfo command by Dusan Baljevic
Circling Cycle
 
PPT
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Circling Cycle
 
PPT
HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...
Circling Cycle
 
PPT
Comparison of Unix and Linux Log File Management Tools by Dusan Baljevic
Circling Cycle
 
Brief summary-standard-password-hashes-Aix-FreeBSD-Linux-Solaris-HP-UX-May-20...
Circling Cycle
 
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
Circling Cycle
 
Ovclusterinfo command by Dusan Baljevic
Circling Cycle
 
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Circling Cycle
 
HP-UX Dynamic Root Disk vs Solaris Live Upgrade vs AIX Multibos by Dusan Balj...
Circling Cycle
 
Comparison of Unix and Linux Log File Management Tools by Dusan Baljevic
Circling Cycle
 
Ad

Recently uploaded (20)

PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 

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

  • 1. How to remove primary swap on HP-UX 11iv3 online By Dusan Baljevic ([email protected]) 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. 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