Operating System - HP-UX
1748267 Members
3549 Online
108760 Solutions
New Discussion

moving swap file to new disks

 
SOLVED
Go to solution
La_4
Advisor

moving swap file to new disks

Hi,

we're in the process replacing old xp1024 to new SAN env.

this is an VM machine with OS 11iv3.
the current swap has two disks 36G each and is mirrored.

i would like to know how to proceed with this step by step.

below is the output of my swap lvol2:

thank you in advance.

root@server18:/home/root$ strings /etc/lvmtab
/dev/vg00
/dev/disk/disk103_p2
/dev/disk/disk104_p2



LV Name VG Type Use Size Mirrors Mount Dir
------------------------------------------------------------------------------------------------------------------
/dev/vg00/lvol1 /dev/vg00 LVM vxfs 1024 1 /stand
/dev/vg00/lvol2 /dev/vg00 LVM swap/dump 4096 1 -
/dev/vg00/lvol3 /dev/vg00 LVM vxfs 1024 1 /
/dev/vg00/lvol4 /dev/vg00 LVM vxfs 656 1 /home
/dev/vg00/lvol5 /dev/vg00 LVM vxfs 9000 1 /opt
/dev/vg00/lvol6 /dev/vg00 LVM vxfs 656 1 /tmp
/dev/vg00/lvol7 /dev/vg00 LVM vxfs 6600 1 /usr
/dev/vg00/lvol8 /dev/vg00 LVM vxfs 9000 1 /var


Logical Volume /dev/vg00/lvol2
------------------------------------------------------------------------------------------------------------------
VG Name /dev/vg00
Type LVM
Cur LV 8
Open LV 8
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4238
VGDA 4
PE Size (Mbytes) 8
Total PE 8456
Alloc PE 8014
Free PE 442
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 542464m
VG Max Extents 67808



Logical Volume /dev/vg00/lvol2
------------------------------------------------------------------------------------------------------------------
LV Name /dev/vg00/lvol2
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 4096
Current LE 512
Allocated PE 1024
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default
Type LVM
Use swap/dump
Mount Directory -



Logical Volume /dev/vg00/lvol2
------------------------------------------------------------------------------------------------------------------
PV Name /dev/disk/disk103_p2
PV Status available
PV Size 33.03 GB
Free 1.73 GB
Allocated 94.77 %
LE on PV 512
PE on PV 512

PV Name /dev/disk/disk104_p2
PV Status available
PV Size 33.03 GB
Free 1.73 GB
Allocated 94.77 %
LE on PV 512
PE on PV 512

1 REPLY 1
Bulent ILIMAN
Trusted Contributor
Solution

Re: moving swap file to new disks

first create your new lvol to be used as swap
set it contiguous with "-C contiguous" option

then
remove your old swap/dump with
lvrmboot -s /dev/vg00
lvrmboot -d /dev/vg00/lvol2

then set you new lvol as swap and dump
lvlnboot -s /dev/vgxx/lvolyy
lvlnboot -d /dev/vgxx/lvolyx

boot and swap volumes can be same or different

see if settings are OK?

lvlnboot -v /dev/vgxx

reboot

swapinfo should show you the new swap volume