Operating System - HP-UX
1838192 Members
4292 Online
110125 Solutions
New Discussion

Unable to mirror swap logical volume

 
SOLVED
Go to solution
Jorge Fabregas
Regular Advisor

Unable to mirror swap logical volume

Hello everyone,

I'm trying to mirror the whole root volume group (vg00) and I had success with all lv's inside of it except lvol2 (swap). I get this error:

lvsync: Couldn't re-synchronize stale partitions of the logical volume:
I/O error
lvsync: Couldn't resynchronize logical volume "/dev/vg00/lvol2".

This is the error when I performed lvsync /dev/vg00/lvol2. I also had the same error when I tried initially to create the mirror (lvextend -m ....).

Is there another way to mirror a logical-volume when it is swap?

I have a bag full of poitns :)

Thanks!
Jorge


8 REPLIES 8
Fabian Briseño
Esteemed Contributor

Re: Unable to mirror swap logical volume

Hello jorge.

I have attached the method I use to make mirror installations hope this helps.
Knowledge is power.
Rajeev  Shukla
Honored Contributor

Re: Unable to mirror swap logical volume

What command are you using to mirror...i am sure it would be lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/?????
Now if you are getting lvsync error and complains about some stale extents then you might be getting into problem.
Check the swap for stale extents using
lvdisplay -v /dev/vg00/lvol2|grep stale

Jorge Fabregas
Regular Advisor

Re: Unable to mirror swap logical volume

Thanks Fabian for the document.

Rajeev: Yes, that's what I'm using to create the mirror but you can only use that command once. After you create the initial mirror, after that you need to use lvsync.... This is what I get when I do the lvdisplay -v:

LV Status available/stale
00504 /dev/dsk/c0t0d0 00542 current /dev/dsk/c4t0d0 00542 stale
00508 /dev/dsk/c0t0d0 00546 current /dev/dsk/c4t0d0 00546 stale

I have more spare disks...I could easy remove the disk and put a new one and resync the vg complete...the problem is that ALL the vg is already synced EXCEPT the swap logical-volume (or at least part of the swap). I'm wondering if I would end up with errors while trying to resync back after placing new disk....

Thanks,
Jorge
Mel Burslan
Honored Contributor

Re: Unable to mirror swap logical volume

Jorge,

More than likely, you have a disk device with bad sectors on it and your swap space was being mirrored over these sectors. I/O error usually means something deep down inside the hardware is bad.

try this command :

mirrdisk=/dev/dsk/c0t20 # modify according to your device driver of the mirror disk you are using
dd if=${mirrdisk} of=/dev/null

see if it bums out somewhere in the process. Be forewarned, this command may take hours to run if your disk device is big, so run it sometime late at night and leave. Come back the next day to see the results.

hope this helps
________________________________
UNIX because I majored in cryptology...
Rajeev  Shukla
Honored Contributor

Re: Unable to mirror swap logical volume

Yes thats right you surely have disk with bad sector and its better to replace now before you end up in trouble in future.

lvreduce all the mirrored lv and detach the disk and add new disk and then carry the process again.

It would be work doing a dd on the disk before you carry on mirroring (if its not a new disk) coz you might end up with stale extents again
Adisuria Wangsadinata_1
Honored Contributor
Solution

Re: Unable to mirror swap logical volume

Hi Jorge,

Based on this output :
00504 /dev/dsk/c0t0d0 00542 current /dev/dsk/c4t0d0 00542 stale
00508 /dev/dsk/c0t0d0 00546 current /dev/dsk/c4t0d0 00546 stale

I'm sure about the problem on /dev/dsk/c4t0d0. The disk need to replace immediate, since the disk is the mirror of the primary disk (/dev/dsk/c0t0d0).

To check the disk, you can run the command below :

# dd if=/dev/rdsk/c4t0d0 of=/dev/null bs=1024k

If you see any I/O error comes from the disk, the disk is absolutely have a problem.

Can check also with the command below :

# ioscan -nfCdisk
# diskinfo -v /dev/rdsk/c4t0d0

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Jorge Fabregas
Regular Advisor

Re: Unable to mirror swap logical volume

Thanks Adisuria! You're right on! I was thinking all the time that the affected disk was the primary...but as you point out it is clear that is the MIRROR the one affected. It's now more easier to replace disk.

Also thanks to the others!
Jorge Fabregas
Regular Advisor

Re: Unable to mirror swap logical volume

Thanks, I'm going to replace disk right away and follow standard procedure to resync mirrored lv's.