Mirror Disk

 
Learn_1
Regular Advisor

Mirror Disk

running HP-UX11i on rp7410.local system disks are mirrored.My question is when I remove system disk from which system has booted and start sam and check swap info. the system just keep checking for swap or any other info for quite a long time.i want to ask will i have to run any command so that everything goes fine or anything else.
11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: Mirror Disk

What should happen is that the second disk, the mirror disk gets completely rebuilt.

You can check that this as true as follows:

lvlnboot -v

pvdisplay -v /dev/dsk/c#t#d#

put in real disk numbers.

lvdisplay -v /dev/vg00/lvol#

put in a real lvol

You should have to do nothing other than give the mirrors a few minutes to synch.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Eugeny Brychkov
Honored Contributor

Re: Mirror Disk

First of all, it's very good idea to keep system/root disk mirrored. If it's not mirrored and disk fails then system crashes. If mirrored, then mirror buddy disk takes over. Of course, if it's configured properly.
If disk fails (or you simply remove it) system waits for some time (let's say, for default timeout 30 sec), and then switches to mirror disk. About swap - it's vital for system, and if it's only at one disk and this disk fails then system will crash. Thus you need swap to be mirrored also (although no need to mirror dump area if there's additional one).
If you replace disk with new one then you need to follow standard restoration process ('ioscan -f', 'pvcreate -B', 'mkboot', 'vgcfgrestore' etc) and after all LVM areas are restored you run 'vgsync'. Remember: if rebooting system on bootup it checks mirror for consistency and may run 'vgsync' also. The difference is that you'll not be able to get rid of it (only may be able to interrupt it ungracefully - not sure if it's possible) and your production may hold on until it will finish. Thus do 'vgsync' when system at low activity (idle) and up at level 3 and above (application level)
Eugeny
Learn_1
Regular Advisor

Re: Mirror Disk

Thanks for the reply.
Just wanted to confirm that what would be the procedure when one of the system mirror disk fail and we do not have a spare one at the moment.the buddy mirror disk takes over the system and system is working.But when we go to check the disk via ioscan or go for swap info it just keep looking these things. i wanted to know whether we will have to run any command or procedure so that system just keep working accordingly till we have the spare disk to replace it with the failed mirror disk.similarly if we reboot the system with the one mirror system disk failed the system boots properly and shows everthing according i.e. the result of the ioscan and swapinfo command.we have 2 swap partitions on the system disk and are mirrored.
So the real question is whether i will have to run aany command to stabilize the system to keep functioning in case when one mirror disk fail from which system was booted up.
Michael Steele_2
Honored Contributor

Re: Mirror Disk

No. Shouldn't.

But it sounds like you're having other problems.

Can you post and 'vmunix' messages or errors in:

syslog.log

/var/adm/messages

Also run these commands:

dmesg

ioscan -fnk | grep -v CLAIMED

lvlnboot -v

swapinfo -tam
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: Mirror Disk

Also run :

vgsync vg00
vgsync vg01, etc.
Support Fatherhood - Stop Family Law
Steven E. Protter
Exalted Contributor

Re: Mirror Disk

If the primary boot disk fails, you may be forced to do a boot alt at the console.

Depends on how you set things up.

lvlnboot -v

A word of advice.

Whatever your configuration. Test it. Don't even rely on the lvlnboot output. Test it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Learn_1
Regular Advisor

Re: Mirror Disk

Thanks Michael & Steven,
Michael i have run the vgsycn and ioscan command.in the result of ioscan i shows both disk(ran simple ioscan command.similarly if i go the have status of the swap partion from SAM,it just keep retreiving the info for long time.i will try to have the syslog as the system is at the client end.according to steven if we'll have to reboot the system from alt path then what is the benefit of the mirrordisk.Just to have system disk copy!!.it should be like if the system disk fails from which system is booted up,the buddy disk should take over till the failed disk is not replaced and mirror copy is not generated.
so pleasecorrect me if i am wrong and suggest any process to solve this problem.this system can not be rebooted as its a main database server and before testing any further i want to have complete info to reduce the downtime and do exact what needs to be done.
Tim D Fulford
Honored Contributor

Re: Mirror Disk

Errrrr...

If your root mirror/primary truly fails then simply replacing the disk will not re-build it (as the above implies). If you re-insert the original disk the it is true that lvsync on each of the LVs will do some synching, but vgsync needs to be done with the volume group OFF LINE. I've not actually sucessfully replaced a root mirror without further problems, so I cannot put my hand on my heart & say this is so, but theoretically......

Shutdown system (shutdown -h -y 0)
Replace broken mirror/primary disk
boot into LVM maintanance mode (hpux -lm -is)
# /etc/vgcfgrestore -n vg00 /dev/dsk/????
# vgsync vg00
# vgchange -a y vg00
# init 3 (or reboot -r)

Regards

Tim
-
Pete Randall
Outstanding Contributor

Re: Mirror Disk

Tim,

I would have to recommend not doing init 3 from LVM maintenance mode - that's how the / file system ends up getting mounted as /dev/root. Reboot would be much better.


Pete


Pete