Operating System - HP-UX
1751763 Members
5957 Online
108781 Solutions
New Discussion юеВ

Re: How to check root partation is mirrored or not?

 
SOLVED
Go to solution
bullz
Super Advisor

How to check root partation is mirrored or not?

Hello Guruz,

I am new to HP-UX, how can i check whether my root partation is mirrored (or) not, If not how i mirror it?

Thanks in advance.
26 REPLIES 26
Prashanth Waugh
Esteemed Contributor
Solution

Re: How to check root partation is mirrored or not?

Hi

U can check using #lvlnboot -v


Reagrds
Prashant
For success, attitude is equally as important as ability
sen_ux
Valued Contributor

Re: How to check root partation is mirrored or not?

Check with lvlnboot -v.If shows two boot disks if it is mirrored.

What is your server model.?PA or IA.Mirroring procedure differs for both.

Thanks
Fedon Kadifeli
Super Advisor

Re: How to check root partation is mirrored or not?

The root volume group (vg) (not partition) generally contains more than one logical volume (lv). You have to check each lv in root vg. For example,

# bdf
/dev/vg00/lvol3 ... 13% /
...
# lvdisplay -v /dev/vg00/lvol3 | more
...
You should see two columns in "Logical extents" section, one for each PV (physical volume).
Stephan._1
Trusted Contributor

Re: How to check root partation is mirrored or not?

Hi,
as usual it would be really helpful to get some basic configuration information about your system to give you an answer.

I guess Itanium box, hp-ux 11.23 +, using LVM?

Please Check the Scripts from SEP

http://www.hpux.ws/?p=42
http://www.hpux.ws/?p=21
Share what you know, learn what you don't.
R.K. #
Honored Contributor

Re: How to check root partation is mirrored or not?

Hello Bullz,

# lvdisplay -v /dev/vg00/lvol1 | more

Look for the line "Mirror Copies".
If it is 0 then that lvol is NOT mirrored.
If it is 1 or 2 then that lvol is mirrored.

Similarly you have to check for all lvols 1 through 8.

Don't fix what ain't broke
Prashanth Waugh
Esteemed Contributor

Re: How to check root partation is mirrored or not?

Hi,

Note the following example is using the disk c1t6d0 as the
mirrored boot disk and c0t6d0 as the boot disk.

1) Initialize the disk and make it bootable
pvcreate -B /dev/rdsk/c1t6d0
Note: the -B parameter tell pvcreate that this will be a
bootable disk.
2) Add the physical volume to the volume group
vgextend /dev/vg01 /dev/dsk/c1t6d0
3) Use mkboot to place the boot utilities in the boot area and add
the AUTO file.
mkboot /dev/dsk/c1t6d0
mkboot -a "hpux -lq" /dev/rdsk/c1t6d0
4) Use mkboot to update the AUTO file on the primary boot
disk.
mkboot -a "hpux -lq" /dev/rdsk/c0t6d0
5) Mirror the stand, root and swap logical volumes
lvextend -m 1 /dev/vg00/lvol1
lvextend -m 1 /dev/vg00/lvol2
lvextend -m 1 /dev/vg00/lvol3
Note: LVM will resynchronize the new mirror copies. This step will
takes several minutes

Repeat the lvextend for all other logical volumes on the boot
mirror.
6) Modify your alternate boot path to point to the mirror copy of the
boot disk.
setboot -a 8/8.6.0 # Use the Hardware path for your new
boot disk.

Regards
prashant
For success, attitude is equally as important as ability
Lijeesh N G_1
Respected Contributor

Re: How to check root partation is mirrored or not?

Hi,

1) how can i check whether my root partition is mirrored??
==>
#lvdisplay -v
Check for "Mirror copies" entry.
==>If the value of "Mirror copies" is "0" means,the specified logical volume is not mirrored.
==>If it is "1 or more" means,the specified logical volume is mirrored.
If it is 1 means, the LV has one copy of mirror,
If it is "2" means , it has two mirror copies.

For example.

# lvdisplay /dev/vg00/lvol1
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1 <<<<<=============== Means It has one mirror*****
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 576
Current LE 18
Allocated PE 36
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default


==> You can verify with, lvlnboot command as well.

2) how i mirror it?
==>Mirroring in PA-RISC and Itanium based systems are different.Can you share your system model?
#uname -a

Regards,
LIJEESH N G

Lijeesh N G_1
Respected Contributor

Re: How to check root partation is mirrored or not?

Hi,

Here is the procedure for mirroring Itanium servers.

Mirroring in Itanium servers
==============================

1) Create partition file
#cat /tmp/partitionfile
>3
>EFI 500MB
>HPUX 100%
>HPSP 400MB
>EOF

2) Create EFI partitions
In this eg. /dev/rdsk/c3t2d0 is disk, you may replace with your disk.

#idisk -wf /tmp/partitionfile dev/rdsk/c3t2d0

3) Create device files needed for the new partitions.
#insf -eC disk

4) Verify with idisk and ioscan command.
#idisk dev/rdsk/c3t2d0
#ioscan -efnC disk

5) Initialize the efi partition for use,
# efi_fsinit -d dev/rdsk/c3t2d0s1

6) Populate the /efi/hpux/ directory in the new EFI system partition.
# mkboot -e -l dev/rdsk/c3t2d0

7) Change the auto file for the mirror to boot without quorum.
NOTE: Using "s1"
# echo "boot vmunix -lq" > /tmp/AUTO.lq
# efi_cp -d /dev/rdsk/c3t2d0s1 /tmp/AUTO.lq /EFI/HPUX/AUTO

NOTE: We assume that if we boot from the primary, the mirror is fully
functional and therefore we don't need to override quorum. Your site
might require that both disks override quorum.

8) Verify the contents of the auto file on the primary and the mirror.
NOTE: Using "s1"

# efi_cp -d /dev/rdsk/c2t1d0s1 -u /EFI/HPUX/AUTO /tmp/AUTO.pri
# efi_cp -d /dev/rdsk/c3t2d0s1 -u /EFI/HPUX/AUTO /tmp/AUTO.alt
# cat /tmp/AUTO.pri
# cat /tmp/AUTO.alt

9) Create PV,
NOTE: Using "s2"
#pvcreate -fB /dev/rdsk/c3t2d0s2

10) Extend vg00
#vgextend vg00 /dev/dsk/c3t2d0s2

11) 11. Mirror all logical volumes in vg00.
NOTE: Using "s2"

# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t2d0s2
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t2d0s2
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t2d0s2
# lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t2d0s2
# lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t2d0s2
# lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t2d0s2
# lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t2d0s2
# lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t2d0s2

12) Add the new disk to /stand/bootconf.
NOTE: Using "s2"
# echo "l /dev/dsk/c3t2d0s2" >> /stand/bootconf

13) Verify that the new disk was added to vg00, and the lv's are in sync.
#vgdisplay -v vg00

14) Verify that the BDRA was updated properly.
#lvlnboot -v

15) Update NVRAM for the alternate/high availability boot disk and verify,
#setboot -h
#setboot

16) Test the new mirror by booting from that.

# shutdown -r -y 0

17) Select "HP-UX HA Alternate Boot" to test the mirror.

EFI Boot Manager ver 1.10 [14.61] Firmware ver 2.21 [4334]
Please select a boot option
HP-UX Primary Boot: 0/1/1/0.1.0
HP-UX HA Alternate Boot: 0/1/1/1.2.0
EFI Shell [Built-in]

18) Verify which disk/kernel you booted from.

#grep "Boot device" /var/adm/syslog/syslog.log
vmunix: Boot device's HP-UX HW path is: 0.1.1.1.2.0
or
#dmesg|grep -i boot
Boot device's HP-UX HW path is: 0/1/1/1.2.0

19) Remove temporary files.
# rm /tmp/partitionfile /tmp/AUTO*


Regards,
LIJEESH N G
Lijeesh N G_1
Respected Contributor

Re: How to check root partation is mirrored or not?

Hi,

Here is the procedure for mirroring PA-RISC servers,

Mirroring in PA-RISC servers.
==============================

1. Create a bootable LVM disk to be used for the mirror.
In this eg. /dev/rdsk/c3t6d0 is disk, you may replace with your disk.

#pvcreate -B /dev/rdsk/c3t6d0

2. Add this disk to the current root volume group.
#vgextend /dev/vg00 /dev/dsk/c3t6d0

3. Make the new disk a boot disk.
#mkboot -l /dev/rdsk/c3t6d0

4. Copy the correct AUTO file into the new LIF area.
#mkboot -a "hpux -lq (;0)/vmunix" /dev/rdsk/c3t6d0

5. Mirror the boot, root and primary swap logical volumes to the new
bootable disk. Ensure that all devices in vg00, such as /usr, /swap,
etc., are mirrored.
The following is an example of mirroring the boot logical volume:

#lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0

#lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0

#lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0

#lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t6d0

#lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t6d0

#lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0

#lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t6d0

#lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t6d0

6. Update the boot information contained in the BDRA for the mirror
copies of boot, primary swap and root.
#/usr/sbin/lvlnboot -b /dev/vg00/lvol1
#/usr/sbin/lvlnboot -s /dev/vg00/lvol2
#/usr/sbin/lvlnboot -r /dev/vg00/lvol3

7. Check if the BDRA is correct.
/usr/sbin/lvlnboot -R /dev/vg00

8. Verify that the mirrors were properly created.
#lvlnboot -v /dev/vg00

The output of this command is shown in a display like the following:

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


#vgdisplay -v vg00

9) Update NVRAM for the alternate/high availability boot disk and verify,
#setboot -h
#setboot


Regards,
LIJEESH N G