1831891 Members
3109 Online
110031 Solutions
New Discussion

remove primary swap

 
SOLVED
Go to solution
yulianto piyut
Valued Contributor

remove primary swap

guys,

I have primary disk stale (unavailable in vgdisplay -v vg00). all lvol is mirrored but there are 2 lvol (/dev/vg00/lvol2 & /dev/vg00/lvol2copy) that doesn't mirrored.
/dev/vg00/lvol2 use /dev/dsk/c0t6d0
/dev/vg00/lvol2copy use /dev/dsk/c2t6d0

I want to replace primary disk (c0t6d0) online! can I remove (reduce) primary swap (/dev/vg00/lvol2) and reduce all volume from disk that stale and replace with new disk ??

bash-2.04# vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 8
Total PE 8680
Alloc PE 8680
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/stale
LV Size (Mbytes) 1000
Current LE 125
Allocated PE 250
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 10720
Current LE 1340
Allocated PE 1340
Used PV 1

LV Name /dev/vg00/lvol3
LV Status available/stale
LV Size (Mbytes) 2000
Current LE 250
Allocated PE 500
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/stale
LV Size (Mbytes) 1000
Current LE 125
Allocated PE 250
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/stale
LV Size (Mbytes) 4000
Current LE 500
Allocated PE 1000
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/stale
LV Size (Mbytes) 4000
Current LE 500
Allocated PE 1000
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/stale
LV Size (Mbytes) 4000
Current LE 500
Allocated PE 1000
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/stale
LV Size (Mbytes) 8000
Current LE 1000
Allocated PE 2000
Used PV 2

LV Name /dev/vg00/lvol2copy
LV Status available/syncd
LV Size (Mbytes) 10720
Current LE 1340
Allocated PE 1340
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c0t6d0
PV Status unavailable
Total PE 4340
Free PE 0
Autoswitch On

PV Name /dev/dsk/c2t6d0
PV Status available
Total PE 4340
Free PE 0
Autoswitch On
13 REPLIES 13
Peter Godron
Honored Contributor

Re: remove primary swap

Adisuria Wangsadinata_1
Honored Contributor

Re: remove primary swap

Hi Bantul,

First thing before you replace your harddisk online is to make sure that your system have patches for Enable Online LVM Disk Replacement. Beside that, your harddisk must hot plugable.

Check the url below :
http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

FYI, the mirror configuration on your boot disk is a bad example since didnt include the primary swap. Better you think how to solve it in the future.

Meanwhile, you can try to create another swap space as secondary swap on c2t6d0 with high priority. After that you can safely to replace the unavailable harddisk.

The recommended way is to use Ignite/UX to restore the system and to make lvol2 mirrored also in c2t6d0.

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
yulianto piyut
Valued Contributor

Re: remove primary swap

hmmm...

I don't have OLR installed in my system. i already tested in my testing server that don't have OLR and success(all lvol is mirrored). for this case, my production server have swap that don't mirrored. i want to erase swap in primary disk ( bad disk) and replace with new disk ( disk is hot-swapable).
can I do this ??
freddy_21
Respected Contributor

Re: remove primary swap

hello bantul

i saw your vg00 configuration. what happen with your lvol2 or lvol2copy. This is not mirror disk. Please give me swapinfo output.

if you want to remove lvol2 swap, i think if you have free space at alternate disk, you can mirror lvol2 to alternate disk and remove mirror at primary disk.

to remove lvol2 i think you need restart for do that.

thanks
freddy
yulianto piyut
Valued Contributor

Re: remove primary swap

freddy,

lvol2 and lvol2copy are not mirrored and both use as swap. I have no free space in secondary disk. u can check in vgdisplay output.

$ sudo /usr/sbin/lvlnboot -v
lvlnboot: LIF information corrupt or not present on "/dev/dsk/c0t6d0".
Use the "mkboot" command to initialize the LIF area.
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (0/0/0/2/0.6.0)
/dev/dsk/c2t6d0 (0/0/0/3/0.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c2t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c2t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

Current path "/dev/dsk/c10t0d0" is an alternate link, skip.
lvlnboot: Volume group not activated.
Cannot display volume group "/dev/vgs1".
lvlnboot: Volume group not activated.
Cannot display volume group "/dev/vgs2".
Current path "/dev/dsk/c8t0d3" is an alternate link, skip.
Current path "/dev/dsk/c10t0d4" is an alternate link, skip.

$ sudo /usr/sbin/swapinfo -atm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 10720 0 10720 0% 0 - 1 /dev/vg00/lvol2
dev 10720 0 10720 0% 0 - 1 /dev/vg00/lvol2copy
reserve - 6328 -6328
memory 13020 6435 6585 49%
total 34460 12763 21697 37% - 0 -

$ sudo strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t6d0
/dev/dsk/c2t6d0
/dev/vgs0
/dev/dsk/c8t0d0
/dev/dsk/c10t0d0
/dev/vgs1
/dev/dsk/c10t0d1
/dev/dsk/c8t0d1
/dev/vgs2
/dev/dsk/c8t0d2
/dev/dsk/c10t0d2
/dev/vg01
/dev/dsk/c10t0d3
/dev/dsk/c8t0d3
/dev/vg02
/dev/dsk/c8t0d4
/dev/dsk/c10t0d4
freddy_21
Respected Contributor

Re: remove primary swap

I think you need restart to remove the swap.

Strange for your configuration why your lvol2 and lvol2copy not in mirror.

I suggest you to restart the server replace the primary disk and fix your swap.


thanks
freddy
yulianto piyut
Valued Contributor

Re: remove primary swap

hi fred,

can you give me suggestions why we must restart this server to remove swap in primary disk?
if we remove lvol2, OS will panic or crash ? u know, system still have swap in lvol2copy if lvol2 is removed.
Adisuria Wangsadinata_1
Honored Contributor

Re: remove primary swap

Hi Bantul,

Any other space on other VG that can allocate the lvol2 & lvol2copy ? If yes, you can create it first temporary on other VG.

For me, put 2 big lvol on 1 disk is not good, since the load on particular disk will be more. And put 2 big swap lvols on 1 disk and not mirror this lvols makes a future headache :-). So it's better you solve this one once for all.

Cheers,
AW

PS : Bantul near Jogjakarta, isnt it ? :-)
now working, next not working ... that's unix
yulianto piyut
Valued Contributor

Re: remove primary swap

hi adi,

bantul is near jogjakarta..;) remember earthquake last month ? :(

we have no free space in other VG. i know, lvol2 and lvol2copy is strange, i think my friend do it for add swapspace.no, we got a problem coz of this.we want to replace bad disk online. is it possible to do this with existing environment?? with not mirrored swap??

plz, give a best solution and good document to support it.

Adisuria Wangsadinata_1
Honored Contributor
Solution

Re: remove primary swap

Hi Bantul,

Good day to you !
It's better you perform the replacement with downtime; cause when you replace the c0t6d0 the system will looking for the swap and since the swap is not there, the problem might be raise when you replace this harddisk.

Try get the latest Ignite/UX backup AND/OR do the Ignite/UX backup first. At least you have a backup on your OS if worse scenario happened.

The last but not least, good luck and the force always be with you.

Cheers,
AW
now working, next not working ... that's unix
freddy_21
Respected Contributor

Re: remove primary swap

I agree with adi surya. contact your technical support to replace your vg00 disk.

To troubleshooting this case, you need downtime. And fix your swap problem.

yulianto piyut
Valued Contributor

Re: remove primary swap

hi adi and dear freddy,

thx for your kindness give me solutions and suggestions. finally, to replace bad disk, we must takes time to restart server and will be reschedule next time depend on applications.
yulianto piyut
Valued Contributor

Re: remove primary swap

need reboot