Operating System - HP-UX
1833437 Members
3376 Online
110052 Solutions
New Discussion

replace new disk with swap

 

replace new disk with swap

Hi All,

I am going to replace a disk on a test system and I was after some advice. The disk is not mirrored. The old physical volume had the following structure:

/dev/vg02/lvol1 - 75 (Data)
/dev/vg02/lvol2 - 100 (Secondary swap)
/dev/vg02/lvol3 - 125 (Data)
/dev/vg02/lvol4 - 208 (Data)

I know that when I replace the disk I have to restore the LVM header (vgcfgrestore) to get the same structure on the new disk. I will then have to newfs the data file systems to restore the data from my backups. My question is how do I handle swap? Executing a vgcfgrestore will show me that /dev/vg02/lvol2 appears on the disk, however is it a case of simply running swapon, or is there another step involved.

Thanks
AC
2 REPLIES 2
S.K. Chan
Honored Contributor

Re: replace new disk with swap

Yes running swapon will do .. for example ..

# swapon -p 1 /dev/vg02/lvol2
==> assuming priority 1
Clemens van Everdingen
Honored Contributor

Re: replace new disk with swap

Hi,

Running swapon will be sufficient.
No further steps required.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !