How to check root partation is mirrored or not? (31 Views)
Reply
Super Advisor
bullz
Posts: 209
Registered: ‎08-11-2009
Message 1 of 27 (31 Views)
Accepted Solution

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.
Please use plain text.
Esteemed Contributor
Prashanth Waugh
Posts: 620
Registered: ‎05-17-2007
Message 2 of 27 (31 Views)

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
Please use plain text.
Valued Contributor
sen_ux
Posts: 166
Registered: ‎10-01-2008
Message 3 of 27 (31 Views)

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
Please use plain text.
Super Advisor
Fedon Kadifeli
Posts: 291
Registered: ‎06-09-1998
Message 4 of 27 (31 Views)

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).
Please use plain text.
Trusted Contributor
Stephan._1
Posts: 90
Registered: ‎10-31-2002
Message 5 of 27 (31 Views)

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.
Please use plain text.
Honored Contributor
R.K. #
Posts: 705
Registered: ‎05-20-2008
Message 6 of 27 (31 Views)

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 that what ain't broke
Please use plain text.
Esteemed Contributor
Prashanth Waugh
Posts: 620
Registered: ‎05-17-2007
Message 7 of 27 (31 Views)

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
Please use plain text.
Respected Contributor
Lijeesh N G_1
Posts: 187
Registered: ‎07-20-2009
Message 8 of 27 (31 Views)

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

Please use plain text.
Respected Contributor
Lijeesh N G_1
Posts: 187
Registered: ‎07-20-2009
Message 9 of 27 (31 Views)

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
Please use plain text.
Respected Contributor
Lijeesh N G_1
Posts: 187
Registered: ‎07-20-2009
Message 10 of 27 (31 Views)

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
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,253
Registered: ‎10-02-2001
Message 11 of 27 (31 Views)

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

The modern servers can also use hardware mirrors, so LVM is not aware of this.

Because different controllers are using different commands, you should consider to post an "ioscan -fn" here to clarify.

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
Super Advisor
fizan
Posts: 455
Registered: ‎05-06-2009
Message 12 of 27 (31 Views)

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

LV Name /dev/vg01/lvol3
LV Status available/syncd
LV Size (Mbytes) 40960
Current LE 10240
Allocated PE 20480
Used PV 4
---------------------------------------------
so how to find in which 4 pv its logical extents are spread?
Please use plain text.
Super Advisor
fizan
Posts: 455
Registered: ‎05-06-2009
Message 13 of 27 (31 Views)

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

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c2t1d0s2 (0/1/1/0.1.0) -- Boot Disk
/dev/dsk/c2t0d0s2 (0/1/1/0.0.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c2t1d0s2
/dev/dsk/c2t0d0s2
Root: lvol3 on: /dev/dsk/c2t1d0s2
/dev/dsk/c2t0d0s2
Swap: lvol2 on: /dev/dsk/c2t1d0s2
/dev/dsk/c2t0d0s2
Dump: lvol2 on: /dev/dsk/c2t1d0s2, 0

its mirored, primary is /dev/dsk/c2t1d0s2 ,
secondary mirror is /dev/dsk/c2t0d0s2 ...
Please use plain text.
Super Advisor
bullz
Posts: 209
Registered: ‎08-11-2009
Message 14 of 27 (31 Views)

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

Hello Guruz,

Thanks all for ur views.. But i am bit confused :(

Finlay seeing all the above comments i came to know that my root partation is not mirrored :)

/dev/vg00/lvol3 589824 382256 206008 65% /

bash-4.0# lvdisplay -v /dev/vg00/lvol3 | more
--- Logical volumes ---
LV Name /dev/vg00/lvol3
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 576
Current LE 18
Allocated PE 18
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t0d0 18 18

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c2t0d0 00138 current
00001 /dev/dsk/c2t0d0 00139 current
00002 /dev/dsk/c2t0d0 00140 current
00003 /dev/dsk/c2t0d0 00141 current
00004 /dev/dsk/c2t0d0 00142 current
00005 /dev/dsk/c2t0d0 00143 current
00006 /dev/dsk/c2t0d0 00144 current
00007 /dev/dsk/c2t0d0 00145 current
00008 /dev/dsk/c2t0d0 00146 current
00009 /dev/dsk/c2t0d0 00147 current
00010 /dev/dsk/c2t0d0 00148 current
00011 /dev/dsk/c2t0d0 00149 current
00012 /dev/dsk/c2t0d0 00150 current
00013 /dev/dsk/c2t0d0 00151 current
00014 /dev/dsk/c2t0d0 00152 current
00015 /dev/dsk/c2t0d0 00153 current
00016 /dev/dsk/c2t0d0 00154 current
00017 /dev/dsk/c2t0d0 00155 current


1) after seeing mirror copies 0, Since vol3 is part of vg00 i need to mirror entire vg00 for root mirroring, if i am not worng.

2) However, i could see disk c2t0d0 is a primary disk, how can i see the other alternative disk for mirroring?

bash-4.0# ioscan -C disk
H/W Path Class Description
=====================================================
0/0/2/0.0.0.0 disk TEAC DV-28E-N
0/1/1/0.0.0 disk HP 146 GMAW3147NC
0/1/1/0.1.0 disk HP 146 GMAW3147NC


3) In case if i found a new disk, how could i do root mirroring?
Please use plain text.
Respected Contributor
Lijeesh N G_1
Posts: 187
Registered: ‎07-20-2009
Message 15 of 27 (31 Views)

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

Hi,


Finlay seeing all the above comments i came to know that my root partation is not mirrored :)

/dev/vg00/lvol3 589824 382256 206008 65% /

bash-4.0# lvdisplay -v /dev/vg00/lvol3 | more
--- Logical volumes ---
LV Name /dev/vg00/lvol3
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0 <<<<<===========Its not mirrored
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 576
Current LE 18
Allocated PE 18
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t0d0 18 18 <<<==========Its not mirrored

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c2t0d0 00138 current
00001 /dev/dsk/c2t0d0 00139 current



1) after seeing mirror copies 0, Since vol3 is part of vg00 i need to mirror entire vg00 for root mirroring, if i am not worng??
==>If you want to make it as a alternate boot volume, you should mirror entire VG00,otherwise no use for mirroring.\
So you shoul mirror entire volume group.


2) However, i could see disk c2t0d0 is a primary disk, how can i see the other alternative disk for mirroring?

bash-4.0# ioscan -C disk
H/W Path Class Description
=====================================================
0/0/2/0.0.0.0 disk TEAC DV-28E-N
0/1/1/0.0.0 disk HP 146 GMAW3147NC <<<<====This is your primary disk
0/1/1/0.1.0 disk HP 146 GMAW3147NC <<<<====Alternate disk

==>use
#ioscan -fnC disk
and find the disk with hardware path 0/1/1/0.1.0, this is your alternate disk.Ensure that this disk is not used for any other volume group or any application before mirroring.


3) In case if i found a new disk, how could i do root mirroring?
==>With above output, I could tell it is PA-RISC based server, so follow steps for "Mirroring in PA-RISC servers" which I provided above, replace the actuall disk with your alternate disk.

Regards,
LIJEESH N G
Please use plain text.
Super Advisor
bullz
Posts: 209
Registered: ‎08-11-2009
Message 16 of 27 (31 Views)

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

Hello... Souds gr8...

I could able to compleate half of this..
When i trying to extend my logical volume, i am geting the below error.

bash-4.0# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t1d0
Usage: lvextend
[-A Autobackup]
{-l LogicalExtentsNumber |
-L LogicalVolumeSize}
LogicalVolumePath [ PhysicalVolumePath... | PhysicalVolumeGroupName... ]
"m": Illegal option.

Any idea?
Please use plain text.
Super Advisor
bullz
Posts: 209
Registered: ‎08-11-2009
Message 17 of 27 (31 Views)

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

Additionaly is it wen can do it onlie (or) we have to perform this in Single user mode..
Please use plain text.
Respected Contributor
Lijeesh N G_1
Posts: 187
Registered: ‎07-20-2009
Message 18 of 27 (31 Views)

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

Hi,

There is no Mirror software installed on your system.

Check the below command output,
#swlist -l product|grep -i mirror

You have to install the product to enable the mirroring.

Regards,
LIJEESH N G
Please use plain text.
Honored Contributor
R.K. #
Posts: 705
Registered: ‎05-20-2008
Message 19 of 27 (31 Views)

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

Hello Bullz,

For mirroring there is no need to go into Single User Mode.

You need to install mirror disk ux software which you need to BUY from HP.

Regds..
Don't fix that what ain't broke
Please use plain text.
Super Advisor
bullz
Posts: 209
Registered: ‎08-11-2009
Message 20 of 27 (31 Views)

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

Thanks folks...

Could some one tell me from where i can download this mirror?
Please use plain text.
Acclaimed Contributor
Torsten.
Posts: 23,253
Registered: ‎10-02-2001
Message 21 of 27 (31 Views)

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

The software is on your install media, but you need to buy a license to get a codeword.

There is only a download for 11.31, because it is already included in base OS.

Hope this helps!
Regards
Torsten.

__________________________________________________

There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________

No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! star in the left column!   
Please use plain text.
Super Advisor
bullz
Posts: 209
Registered: ‎08-11-2009
Message 22 of 27 (31 Views)

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

Hello All,

Just one Final qus...

bash-4.0# swlist -l product|grep -i mirror
Show nothing in my server, is any way even in single user mode i could achive it?

Plz let me know.
Please use plain text.
Honored Contributor
Raj D.
Posts: 2,624
Registered: ‎06-12-2004
Message 23 of 27 (31 Views)

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

bultz,
Once you entered the codeword and the CD serial number in the swinstall menu :the "mirror UX " software will be visible and will be get installed.

Check this out:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1250516348689+28353475&...



Also if you have MCOE (Misson Critical OE) or DCOE (DataCenter OE), Mirror-UX is bundled with it. and no need to worry.


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Please use plain text.
Honored Contributor
R.K. #
Posts: 705
Registered: ‎05-20-2008
Message 24 of 27 (31 Views)

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

Hi Again,

As said you will need Mirror UX software to mirror your disk.

Again, Single user mode will not work as you do NOT have the software installed.

If just to have a backup of your root disk is ok, then we can copy main disk onto another so that for worst case you will have a boot disk ready.

This will done by copying one to the other:

# dd if=/dev/rdsk/cXtXdX of=/dev/rdsk/cYtYdY bs=1024k

/dev/rdsk/cXtXdX ==> Original/Input Disk

Do NOT reverse the order.

Hope this helps..
Don't fix that what ain't broke
Please use plain text.
Respected Contributor
Lijeesh N G_1
Posts: 187
Registered: ‎07-20-2009
Message 25 of 27 (31 Views)

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

Hi,

bash-4.0# swlist -l product|grep -i mirror
Show nothing in my server, is any way even in single user mode i could achive it???
==> No,
better you may contact HP for getting the license(Code word) and install it.

Once you apply that , you can verify it with above command, it will show you the details of the product.

Regards,
LIJEESH N G
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation