1834814 Members
2827 Online
110070 Solutions
New Discussion

Re: Can't change lv

 
SOLVED
Go to solution
Derrick Martin_1
Occasional Advisor

Can't change lv

I am trying to setup a mirror of my root disk. I think I got everything correct, but on one lv I'm also mirroring the swap and dump. I read that I should do a lvchange -M n -c n /dev/vg/lv to turn off some of the mirror caching and what not. I also understand I need to be in lm mode to make this change. So, I rebooted, and interupted the process to get to ISL I then chose my pri to boot from then chose "y" to get to the prompt. At the prompt I entered hpux -lm. once booted I tried lvchange -M n /dev/vg00/lvol2, I got the following error message "lvchange: Couldn't query from the LVM device driver the current settings were not updated." Any ideas what I'm forgetting to do?
10 REPLIES 10
Vincente Fernandes
Valued Contributor

Re: Can't change lv

First of all you don't have to reboot the server to mirror root disk. It can be done when the server is up and running. I have mirrored hundred of systems online without even performing a lvchange on the logical volume. Also never turned off mirroring cache. swap and dump can be mirrored online also. Make sure you use pvcreate -fB /dev/dsk/cxtxdx to make the disk bootable before adding to volume group.
I would suggest to reboot the server and bring it up normal and mirror the drive or the lv again.
Patrick Wallek
Honored Contributor
Solution

Re: Can't change lv

You probably need to activate the VG first.

What happens if you do a 'vgchange -a y vg00' and then do your lvchange?

Vincente Fernandes
Valued Contributor

Re: Can't change lv

Here are the steps i use
pvcreate -B -f /dev/rdsk/cxtxdx
vgextend /dev/vg00 /dev/dsk/cxtxdx
mkboot /dev/dsk/cxtxdx
mkboot -a "hpux -lq" /dev/rdsk/cxtxdx
print "/dev/dsk/cxtxdx" >>/stand/bootconf
lvextend -m 1 /dev/vg00/lvol? /dev/dsk/cxtxdx

for the lvextend for all the logical volume on the primary root drive.
Performa a "vgsync /dev/vg00" to make sure the both the drive are synced
Reboot the server and boot from the mirror disk to test mirroring if you want.
Devender Khatana
Honored Contributor

Re: Can't change lv

Hi,

You are not doing it right way. Reboot is not required and in LVM maintenance mode I think VG is not activated. Attached is the root mirroring procedure with some detailed information for HPUX11i . Once done do not forget to check it with booting from alternate disk.

HTH,
Devender
Impossible itself mentions "I m possible"
Patrick Wallek
Honored Contributor

Re: Can't change lv

Actually what he is doing is correct if you want to turn off Mirror Write Cache and Mirror Consistency Recovery for your dump volume.

Since most people leave vg00/lvol2 as both swap and dump turning those OFF is a good idea.

When the system starts up, especially after a crash, you don't want your dump volume to do a Mirror Consistency Recovery because you could very well overwrite your crash dump which is not a good thing.

Also, if you just reboot normally, you don't want the swap/dump to go through this procedure because it's just a waste of CPU cycles. You really don't care on boot if your swap/dump is consistent as there shouldn't be anything there (unless you've just crashed).

So, this is a good procedure to do. And yes, you do have to be in LVM maintenance mode to do it.
Derrick Martin_1
Occasional Advisor

Re: Can't change lv

The part I'm trying to do is the "NOTE" in that document right after the part where it shows to boot from the alt... where it talks about swap and dump being on the same lv...
Patrick Wallek
Honored Contributor

Re: Can't change lv

Have you tried activating the VG before trying the lvchange? Also, if I recall correctly, you must do each command on a separate command line. So once in LVM Maint mode:

# vgchange -a y vg00
# lvchange -M n /dev/vg00/lvol2
# lvchange -c n /dev/vg00/lvol2

And see if that works better for you.

Patrick Wallek
Honored Contributor

Re: Can't change lv

Did you ever get this to work?

It happens that I'm in the process of rebuilding a machine this week and I had forgotten to do the steps you mention. I just did them this morning as I outlined in my previous post and they worked great.

Activate the VG and then do the lvchange command twice as I did above and in that order. You must do the '-M n' before you do the '-c n'.

Derrick Martin_1
Occasional Advisor

Re: Can't change lv

I'm going to be giving it a try shortly. Had a fire to put out and haven't had a chance to try it with the activation. I'll post the results in a few
Derrick Martin_1
Occasional Advisor

Re: Can't change lv

Thanks! Activating the vg first did the trick.