Operating System - HP-UX
1830898 Members
3281 Online
110017 Solutions
New Discussion

Mirror disk on itanium-- unexpected results

 
SOLVED
Go to solution
Shea Sullivan
Occasional Advisor

Mirror disk on itanium-- unexpected results

Hi,
I have recently set up mirrorDisk on an 11.23 itanium server, using the document here:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=00089099cee021109099cee02110275d6e10RCRD

The process seemed to work fine; until I "broke" the mirrors using lvreduce -m 0 for each lvol. I expected the data on the primary to be different from the mirror. For example, I write a file while booted to the primary; then I use setboot to swap the primary and the mirror, and shutdown -r 0, so the system boots to the mirror. But the file still exists, even on the mirrored disk. Does setboot work properly for Itanium? Unfortunately, I don't have console access, but when I
grep "Boot device" /var/adm/syslog/syslog.log it confirms my setboot command.
Any suggestions?

BTW, I have attached some relevant output.
Thanks,

Shea
11 REPLIES 11
James R. Ferguson
Acclaimed Contributor

Re: Mirror disk on itanium-- unexpected results

Hi Shea:

When you did yur 'lvreduce' you eliminated the mirror. To tempoarily "break" the mirror (e.g. for a backup action) you would use 'lvsplit'. The later operation, however, does *not* survice a reboot. See the manpages for 'lvsplit(1M)'.

Regards!

...JRF...
tkc
Esteemed Contributor

Re: Mirror disk on itanium-- unexpected results

try lvextend the lvol to increase the size to use up the free space. i am sure after this, the file will be gone already.
jmreyes
Occasional Advisor

Re: Mirror disk on itanium-- unexpected results

hi Shea,

i hope it will help this procedure regarding the mirroring of itatium server..


joey

Shea Sullivan
Occasional Advisor

Re: Mirror disk on itanium-- unexpected results

Hi All,
Thanks for the quick responses. Let me clarify what I'm trying to do here. I would like to create a backup environment for an upgrade, using mirror-disk to "back up" the root disk. Then I want to break the mirrors, and upgrade the primary disk without affecting the secondary disk. I think my mirror process works properly.

So I tried to do lvsplit for each lvol; then I swapped the primary boot path, using setboot; then I rebooted (shutdown -r 0). What I expect is to have two separate boot environments, but when I write a file to the primary, the same file persists to the secondary disk. Again, I don't have console access so I'm trying to do this with software only.

Thanks,

Shea
Mike Shilladay
Esteemed Contributor

Re: Mirror disk on itanium-- unexpected results

Hi Shea,

Not wanting to state the obvious, but wouldn't it be easier to use Ignite/UX and use this as a backup ?

Mike
Shea Sullivan
Occasional Advisor

Re: Mirror disk on itanium-- unexpected results

Hi, Mike--
What I'm shooting for here is a bootable, hot backup, so that if something goes wrong I can just boot to the alternate disk and come up running in < 10 minutes. As far as I know, ignite would take much longer (?)

Thanks,

Shea
Tim Nelson
Honored Contributor
Solution

Re: Mirror disk on itanium-- unexpected results

Shea,

If you split a mirror and then reboot from the other you need to watch for the following.

1) lvlnboot still points to the other disk
2) /etc/fstab points to old lvols as well.

In the past I have done a split but then you must mount the split filesytem /dev/vg00/lvol1b and edit the /etc/fstab. I think you have to also boot the second disk to single user and modify the lvlnboot info. Then reboot from the second again.

A better approach might be to simply pull the second disk out when the system is down. Do the upgrade to the first. If you want to go back then pull the first and boot the second. Then remirror in the reverse.

James R. Ferguson
Acclaimed Contributor

Re: Mirror disk on itanium-- unexpected results

Hi (again) Shea:

You might want to try the Dynamic Root Disk product available for 11.23.

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=DynRootDisk

Regards!

...JRF...
Shea Sullivan
Occasional Advisor

Re: Mirror disk on itanium-- unexpected results

Thanks, All.
Great suggestions. Since I have a mix of 11.11 and 11.23 servers, I will use a combination of the solutions provided (pulling the disk where I can, and use DRD on the 11.23 boxes). Thanks for the excellent help.

Cheers,

Shea
Edward Finneran
Advisor

Re: Mirror disk on itanium-- unexpected results

Just to clarify a previous response:

- if you look at the lvlnboot output you attached, some of the information is key.

You'll notice the lvol1, 2 and 3 are specified as existing only on /dev/dsk/c2t1d0s2, or NOT the drive you are booted from.

The thing to remember is that in the BDRA (if they still call it that, Boot Data Reserved Area), when you boot from a drive, it looks in the area to determine where to find the filesystem containing the kernel, where primary swap is, etc. So, whether you boot from your primary drive or your secondary drive, the BDRA data is the same - namely, go look at lvol1 2 and 3 in vg00, wherever that is. So vg00, with both drives, gets activated, and hp-ux looks at lvol1, 2, 3 on c2t1d0s2, regardless of which boot drive you booted from.

So, it's not a question of some type of mirroring copying that new file you created on c2t1d0s2 to c2t0ds2 and you see it over there - you're actually looking at the data on c2t1d0s2 itself.

But they're right - try out DRD.
Shea Sullivan
Occasional Advisor

Re: Mirror disk on itanium-- unexpected results

Great catch, Edward.
This caused me a lot of trouble yesterday, as I forgot to setboot back to the primary disk. After I broke the mirrors, the system was still booting to the alternate disk and putting that kernel into memory. But the root filesystem (from lvlnboot) remained on the primary disk.

When I tried to update the kernel in this environment, the changes never took effect (using SAM, or building it manually with mk_kernel). Also, it broke dmesg, lanscan, and wreaked havoc on my server! I think its because it was still grabbing the old kernel from the boot area on the second disk. When I corrected setboot to the primary disk, the kernel in memory matched the kernel on the disk, and everything went back to normal.

In short, I learned to use caution with setboot and mirror-disk!