Operating System - HP-UX
1748204 Members
4159 Online
108759 Solutions
New Discussion юеВ

Re: Root volume group Mirror

 
rescuehp17
Frequent Advisor

Root volume group Mirror

I am planning to migrate the data from one storage to another due to end of support. With data volume groups, I was able to migrate fine however, with the root volume group, I see the settings different and I inherited this environment recently. 

(root) @/> vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 10
Open LV 10
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 2500
VGDA 2
PE Size (Mbytes) 64
Total PE 1217
Alloc PE 743
Free PE 474
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 1.0
VG Max Size 2500g
VG Max Extents 40000

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 1792
Current LE 28
Allocated PE 28
Used PV 1

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 8192
Current LE 128
Allocated PE 128
Used PV 1

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 16
Allocated PE 16
Used PV 1

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 16
Allocated PE 16
Used PV 1

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 8
Allocated PE 8
Used PV 1

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 10368
Current LE 162
Allocated PE 162
Used PV 1

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 5696
Current LE 89
Allocated PE 89
Used PV 1

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 8704
Current LE 136
Allocated PE 136
Used PV 1

LV Name /dev/vg00/lvdb04
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0

LV Name /dev/vg00/commvault
LV Status available/syncd
LV Size (Mbytes) 10240
Current LE 160
Allocated PE 160
Used PV 1


--- Physical volumes ---
PV Name /dev/disk/disk761_p2
PV Status available
Total PE 1217
Free PE 474
Autoswitch On
Proactive Polling On

(root)@/> lvdisplay -v /dev/vg00/lvol1|more
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 1792
Current LE 28
Allocated PE 28
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/disk/disk761_p2 28 28

=================

Question is, what is this Allocation for logical volume as strict/contiguous? What are the steps and how can I do this? I am thinking of adding a new disk of the same size, mirror and while unmirroring, I do lvreduce with the old disk and should be all set.

Also, what is this layout?

/dev/rdisk/disk761 /dev/rdsk/c54t12d4
/dev/rdsk/c55t12d4
/dev/rdsk/c53t12d4
/dev/rdsk/c56t12d4
/dev/rdisk/disk761_p1 /dev/rdsk/c54t12d4s1
/dev/rdsk/c55t12d4s1
/dev/rdsk/c53t12d4s1
/dev/rdsk/c56t12d4s1
/dev/rdisk/disk761_p2 /dev/rdsk/c54t12d4s2
/dev/rdsk/c55t12d4s2
/dev/rdsk/c53t12d4s2
/dev/rdsk/c56t12d4s2
/dev/rdisk/disk761_p3 /dev/rdsk/c54t12d4s3
/dev/rdsk/c55t12d4s3
/dev/rdsk/c53t12d4s3
/dev/rdsk/c56t12d4s3

My goal is to move all the data from disk761. But not sure what is this disk761_p1, disk761p2 and disk761p3. Please help!

 

 

7 REPLIES 7
Torsten.
Acclaimed Contributor

Re: Root volume group Mirror

the lvm adminitrator guide will provide you all the steps needed to mirror vg00 - including create the partitions 1,2 and 3.

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! thumb below!   
Bill Hassell
Honored Contributor

Re: Root volume group Mirror

>> what is this Allocation for logical volume as strict/contiguous?

Strict allocation means that disk extents for mirroring must be allocated from different disks. This prevents using extra extents on the same disk for a mirror.

Based on the disk name in vg00, this appears to be HP-UX 11.31 running on IA64 hardware. The two different disk device naming conventions are agile (ie, /dev/rdisk/disk761) and legacy (ie, /dev/rdsk/c55t12d4). They point to the same physical disk but are handled differently for load balancing. Agile is preferred which is what you have. To see the mapping, use ioscan -m dsf

The _p1 _p2 _p3 tags on the file names refer to EFI partitions that must be created for the boot disk on Integrity (aka, IA64 or Itanium) servers.

The first step is to present a disk LUN from the new storage  where the size is the same as the current boot disk. Run this command to see the size of the current disk:

      diskinfo /dev/rdisk/disk761

Once presented to HP-UX, run insf to create the new device files:

      insf -eC disk

You should see the new device names from insf. This will be the new miror.

Here is an example of the steps needed. In this case, the old disk is disk11 and the new disk is disk41.

Example:

Mirror disk11 to disk41

Find the legacy paths for each disk:
ioscan -m dsf | grep -e "disk11 " -e "disk41 "
/dev/rdisk/disk11 /dev/rdsk/c0t4d0
/dev/rdisk/disk41 /dev/rdsk/c0t3d0

Make note of the lunpath for each disk:
lssf /dev/rdisk/disk41 /dev/rdsk/c0t3d0
(address 64000/0xfa00/0x8 and address 0/1/1/0.0.0.3.0)
lssf /dev/rdisk/disk11 /dev/rdsk/c0t4d0
(address 64000/0xfa00/0x9 and address 0/1/1/0.0.0.4.0)

Create a temporary partition layout file:
echo "3\nEFI 500MB\nHPUX 100%\nHPSP 400MB" > /tmp/EFItemp
Clear the partition table CMD: idisk -Rw /dev/rdisk/disk41 Create the partitions CMD: idisk -qwf /tmp/EFItemp /dev/rdisk/disk41 Validate the partitions CMD: idisk -v /dev/rdisk/disk41 Create device files for new partitions CMD: insf -eH 0/1/1/0.0.0.3.0 CMD: insf -eH 64000/0xfa00/0x8 Initialize EFI partition 1 CMD: efi_fsinit -d /dev/rdisk/disk41_p1 Initialize EFI partition 3 (HPSP) CMD: efi_fsinit -d /dev/rdisk/disk41_p3 LVM initialize partition 2 CMD: pvcreate -f -B /dev/rdisk/disk41_p2 Make the boot area CMD: mkboot -e -l /dev/rdisk/disk41 Create the AUTO file on mirror CMD: mkboot -a boot vmunix /dev/rdisk/disk41 Extend vg00 CMD: vgextend vg00 /dev/disk/disk41_p2 Mirror all lvols in vg00 CMD: lvextend -m 1 /dev/vg00/lvol1 /dev/disk/disk41_p2 CMD: lvextend -m 1 /dev/vg00/lvol2 /dev/disk/disk41_p2 CMD: lvextend -m 1 /dev/vg00/lvol3 /dev/disk/disk41_p2 CMD: lvextend -m 1 /dev/vg00/lvol4 /dev/disk/disk41_p2 CMD: lvextend -m 1 /dev/vg00/lvol5 /dev/disk/disk41_p2 CMD: lvextend -m 1 /dev/vg00/lvol6 /dev/disk/disk41_p2 CMD: lvextend -m 1 /dev/vg00/lvol7 /dev/disk/disk41_p2 CMD: lvextend -m 1 /dev/vg00/lvol8 /dev/disk/disk41_p2 Backup vg00 LVM information CMD: vgcfgbackup vg00 Create vg00 mapfile CMD: vgexport -m /etc/lvmconf/vg00.mapfile -s -p -v vg00 Record the BDRA/LVM headers CMD: lvlnboot -b /dev/vg00/lvol1 /dev/vg00 CMD: lvlnboot -s /dev/vg00/lvol2 /dev/vg00 CMD: lvlnboot -d /dev/vg00/lvol2 /dev/vg00 CMD: lvlnboot -r /dev/vg00/lvol3 /dev/vg00 CMD: lvlnboot -R CMD: lvlnboot -v

 Be sure to include all the lvols for mirroring (ie, lvdb04 and commvault). Once mirrored, you can then go through each lvol and reduce the original disk761_p2. Once the old disk761_p2 reports no extents are in use, you can use vgreduce to take the disk out of vg00.



Bill Hassell, sysadmin
rescuehp17
Frequent Advisor

Re: Root volume group Mirror

Thank you so much, Bill. I will implement these steps and keep you posted. Really appreciate for your help.

rescuehp17
Frequent Advisor

Re: Root volume group Mirror

Ok I thought to give an update on this. I was about to migrate rootvg and waiting for the disk from san team and guess what? they deleted by accident the rootvg lun. bhoom....gone! :-( so i have restore the server. 

rescuehp17
Frequent Advisor

Re: Root volume group Mirror

Hi Bill, Getting error on this command, please suggest. Since a rootvg, I am nervous to try anything.

(root) @/tmp> mkboot -a boot vmunix /dev/rdisk/disk186
Illegal number of arguments specified
usage: mkboot [ -b boot_file_path ] [-c [-u] | -f | -h | -u]
[-i included_lif_file] [-p preserved_lif_file]
[-l | -H | -W] [-v] device

or: mkboot -a auto_file_string [-v] device

or: mkboot -e [-s EFI_source_path] [-v] [-W] device

where: -b select a boot file path
-c check boot path for fit
-e create ia64 (EFI) boot disk
-f force an update of the boot programs
-h modify only the lif header
-u specifies update mode
-i include only specified file
-p preserve specified lif file on device
-l treat device as an LVM physical volume
-H treat device as 800 hard partition
-W treat device as whole disk
-s select an EFI source path
-v specifies verbose mode
-a modifies the autoboot file
device is special file for boot program installation
(root) @/tmp>

 

Matti_Kurkela
Honored Contributor

Re: Root volume group Mirror

If you want your auto_file_string to be:

boot vmunix

then you'll need to put quotes around it:

mkboot -a "boot vmunix" /dev/rdisk/disk186
MK
rescuehp17
Frequent Advisor

Re: Root volume group Mirror

Thank you very much, MK