Operating System - HP-UX
1830350 Members
2550 Online
110001 Solutions
New Discussion

Check disk mirror on the HPUX server

 
SOLVED
Go to solution
ASH_27
Valued Contributor

Check disk mirror on the HPUX server

Hi

Disk mirroring is enabled on our HP-UX server running 11.11 U 9000/785. How do I test mirroring ? Basically to check both the disk has same data and other disk can boot incase of primary fails.

Thanks
14 REPLIES 14
Bill Thorsteinson
Honored Contributor

Re: Check disk mirror on the HPUX server

Do a vgdisplay -v on the volume which contains
the mirrored disks. Mirrored logical volumes should show 2 used disks.
Do a lvdisplay -f on the logicial volume. It will list the logical blocks of the volume,
physicial mapping on each disk, and
syncronization status.
Sanjay_6
Honored Contributor

Re: Check disk mirror on the HPUX server

Hi,

the only way you can verify that the mirroring is going to work or is okay is by rebooting the server with your mirror disk and make sure the primary is out of the slot.

Hope this helps.

regds
Geoff Wild
Honored Contributor

Re: Check disk mirror on the HPUX server

Here's a handy script called chkdisks...

Output like:

# chkdisks
Logical Volume Filesystem Mirrored?
-------------- ---------- ---------
/dev/vg00/lvol1 /stand yes
/dev/vg00/lvol2 yes
/dev/vg00/lvol3 / yes
/dev/vg00/lvol4 /tmp yes
/dev/vg00/lvol5 /home yes
/dev/vg00/lvol6 /opt yes
/dev/vg00/lvol7 /usr yes
/dev/vg00/lvol8 /var yes
/dev/vg00/lvol9 /app yes
/dev/vg00/lvol10 /ops yes
/dev/vg00/lvol11 /data yes
/dev/vg00/lvol12 /opt/cctool yes
/dev/vg00/lvol13 /var/opt/perf/datafiles yes
/dev/vg00/lvol14 /usr/openv yes
/dev/vg00/lvpub yes
/dev/vg01/lvol2 /var/adm/crash yes
/dev/vg01/swap yes


lvlnboot -v to check if disk is bootable:


# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c20t5d0 (0/0/0/3/0.5.0) -- Boot Disk
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c20t5d0
/dev/dsk/c0t6d0
Root: lvol3 on: /dev/dsk/c20t5d0
/dev/dsk/c0t6d0
Swap: lvol2 on: /dev/dsk/c20t5d0
/dev/dsk/c0t6d0
Dump: lvol2 on: /dev/dsk/c20t5d0, 0


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Victor BERRIDGE
Honored Contributor

Re: Check disk mirror on the HPUX server

Hi,
About booting:
be sure you put both disks in the boot search path:
$ setboot
Primary bootpath : 0/0/1/1.2.0
Alternate bootpath : 0/0/2/0.2.0

Autoboot is ON (enabled)
Autosearch is OFF (disabled)


Do a man of setboot...


All the best
Victor
DCE
Honored Contributor

Re: Check disk mirror on the HPUX server

one additional command that will help

lvlnboot -v

This will tell ypu if the boot partition has been installed on both disks.
ASH_27
Valued Contributor

Re: Check disk mirror on the HPUX server

Thanks for all reply.
Can you let me know
--- Physical volumes ---
PV Name /dev/dsk/c3t6d0
PV Status available
Total PE 4340
Free PE 674
Autoswitch On

PV Name /dev/dsk/c3t5d0
PV Status available
Total PE 4340
Free PE 674
Autoswitch On

What does it mean?
Geoff Wild
Honored Contributor

Re: Check disk mirror on the HPUX server

That is 2 physical volumes of a volume group - PE = Physical Extents...

Multiply the PE by PE Size (Mbytes) to get space in MB.

IE - if youe PE Size is 8, then your disk are 34720 MB in size with 5392 MB free.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor

Re: Check disk mirror on the HPUX server

The fields displayed are the output of pvdisplay and, thusly, are explained (quite well) in the man page for pvdisplay. I started out to quote them in here, but it was taking too long to reformat - you can look them up.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Check disk mirror on the HPUX server

Sorry - disregard that last. I was replying to another question, got the "Internal System Error" message and when I went back to post again, I ended up in this thread - weird!.


Pete

Pete
ASH_27
Valued Contributor

Re: Check disk mirror on the HPUX server

Geoff Thanks for reply.

So in this scenario I have 5GB of free space, to make use of it I need to mount it as LV correct as another partition ?

Rgds...ASH
Pete Randall
Outstanding Contributor

Re: Check disk mirror on the HPUX server

I'll take that back. Right thread. I was responding to the author's last question.

I hope quitting time gets here soon!


Pete

Pete
James R. Ferguson
Acclaimed Contributor
Solution

Re: Check disk mirror on the HPUX server

Hi:

To use the additional physical disk extents that yuo have free, you can either 'lvextend' an existing logical volume, thus adding them to it or 'lvcreate' a new logical volume.

In either case, the logical volume is only a container for a file system. Thus, if you 'lvextend' an existing logical volume, you will want to follow that with an enlargement of the file system contained therein. Assuming a JFS (VxFS) filesystem, you would use 'fsadm' to grow the filesystem.

If you are creating a new logical volume, then you follow that with the creation of a new filesystem within it, with 'newfs'.

An excellent manual section for you to read is chapter-6 of the "Magaging Systems and Workgroups" guide:

http://docs.hp.com/en/B2355-90912/B2355-90912.pdf

Regards!

...JRF...
Geoff Wild
Honored Contributor

Re: Check disk mirror on the HPUX server

That is correct, and James provided you with a link to a good doc with steps to add a lvol.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jason S. Bailey
New Member

Re: Check disk mirror on the HPUX server

If you want to change the boot device and make sure the system will boot off the mirrored disk... (note: this assumes you mirrored the disk properly and have the lif area all set up with mkboot and whatnot):

1. vi /stand/bootconf - make sure both discs are listed.

2. ioscan -fnC disk - look at the hardware path for each disk, then run. setboot -p 0/0/0/0.0.0 (substitute hw path for primary boot drive) and setboot -a 0/0/0/0.0.0 (hw path for secondary boot drive).

3. lvlnboot -R. this updates the boot area on the drives.

4. reboot & interrupt the boot process when prompted. at the prompt, type boot alt then say no to interact and it should boot off the second disk.

5. once you're up and running, type this:

echo boot_string/S | adb /stand/vmunix /dev/kmem

this should return the hardware path of the system you're booted off of. make sure it says the hw path for your second device. to go back, shutdown -ry 0, interrupt, boot pri and it should come back up on the original disk.