Operating System - HP-UX
1748151 Members
3747 Online
108758 Solutions
New Discussion

Re: mirroring root disk before making the mirror bootable?

 
EU-Admins-UNIX
Regular Advisor

mirroring root disk before making the mirror bootable?

Hello

 

Our VG00 has 2 disks in it, disk1 & disk2.

 

disk1 has all the os volumes on it, and for some reason, some non os volumes.  these non os volumes span across disk1 and disk2.

 

My question is this:

 

Can I mirror the OS volumes onto the spare space on disk2, and when external capacity becomes available, move the non os volumes oout of vg00, and only then make disk2 bootable?

 

I treid to make disk2 bootable before any mirroring, and got this:

 

root@server at / =>mkboot -l /dev/rdisk/disk230
There appear to be non-boot logical volumes on this device.
Overwriting them could destroy all the data on this device
Should the logical volumes be overwritten [y/n]? n

vgdisplay -v below:

 

root@server at / =>vgdisplay -v vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      12
Open LV                     12
Max PV                      16
Cur PV                      2
Act PV                      2
Max PE per PV               4479
VGDA                        4
PE Size (Mbytes)            64
Total PE                    8940
Alloc PE                    7187
Free PE                     1753
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  1.0
VG Max Size                 4479g
VG Max Extents              71664

   --- 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)            2048
   Current LE                  32
   Allocated PE                32
   Used PV                     1

   LV Name                     /dev/vg00/build
   LV Status                   available/syncd
   LV Size (Mbytes)            30720
   Current LE                  480
   Allocated PE                480
   Used PV                     1

   LV Name                     /dev/vg00/UK-Database-Backup
   LV Status                   available/syncd
   LV Size (Mbytes)            204800
   Current LE                  3200
   Allocated PE                3200
   Used PV                     2

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

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

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

   LV Name                     /dev/vg00/lvol7
   LV Status                   available/syncd
   LV Size (Mbytes)            4096
   Current LE                  64
   Allocated PE                64
   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/swap2
   LV Status                   available/syncd
   LV Size (Mbytes)            16384
   Current LE                  256
   Allocated PE                256
   Used PV                     1

   LV Name                     /dev/vg00/IRE-Database-Backup
   LV Status                   available/syncd
   LV Size (Mbytes)            153600
   Current LE                  2400
   Allocated PE                2400
   Used PV                     1


   --- Physical volumes ---
   PV Name                     /dev/disk/disk49
   PV Status                   available
   Total PE                    4470
   Free PE                     0
   Autoswitch                  On
   Proactive Polling           On

   PV Name                     /dev/disk/disk230
   PV Status                   available
   Total PE                    4470
   Free PE                     1753
   Autoswitch                  On
   Proactive Polling           On

 

Regards

 

Tariq

 

5 REPLIES 5
Torsten.
Acclaimed Contributor

Re: mirroring root disk before making the mirror bootable?

Please do

 

# lvlnboot -v

 

If the disk was "pvcreate"'d without the "-B" option, you cannot make this disk bootable without another pvcreate - this will delete the data on the disk.


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!   
EU-Admins-UNIX
Regular Advisor

Re: mirroring root disk before making the mirror bootable?

root@server at / =>lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/disk/disk49 -- Boot Disk
        /dev/disk/disk230
Boot: lvol1     on:     /dev/disk/disk49
Root: lvol3     on:     /dev/disk/disk49
Swap: lvol2     on:     /dev/disk/disk49
Dump: lvol2     on:     /dev/disk/disk49, 0

 

So what you're syaing is I cannot mirror the LV's in VG00, as when it came making disk2 bootable, I could lose all the data?

 

I thought instead of pvcreate -B, I could just do a mkboot -l and mkboot -a "hpux -lq" on disk2.


Thanks

 

Tariq

Torsten.
Acclaimed Contributor

Re: mirroring root disk before making the mirror bootable?

When creating a physical volume with out the "-B" in pvcreate the systems reserves space for PVRA and VGRA on the disk - only!
With "-B" it reserves additional space for LIF and BDRA.
Without having this additional space, you cannot populate the LIF (mkboot), hence you cannot make this disk bootable.

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!   
Torsten.
Acclaimed Contributor

Re: mirroring root disk before making the mirror bootable?

The layout of a non-bootable disk looks like this (pvcreate without -B):

 

PVRA

VGRA

DATA

...

 

a bootable disk (pvcreate -B ...) looks like this

 

LIF header

PVRA

BDRA

LIF

VGRA

DATA

...

 

While making the disk bootable, you populate LIF and BDRA by using mkboot and lvlnboot.

 

If you try this on a non-bootable disk, the system may overwrite the data area (or just give an error - I did never try).


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!   
Henry Fauni
Valued Contributor

Re: mirroring root disk before making the mirror bootable?

My question is this:

 

Can I mirror the OS volumes onto the spare space on disk2, and when external capacity becomes available, move the non os volumes oout of vg00, and only then make disk2 bootable?

 

- You might as well wait until external capacity becomes available

1. Copy all the non-os volumes to it

2. Using "lvremove", remove all the non-os logical volumes on vg00 after successful copy of non-os volumes.

3. Using "pvdisplay -v", verify /dev/disk/disk49 has all the vg00 data and nothing left on /dev/disk/disk230. If not, you can use "pvmove" to accomplish this.

4. Remove /dev/disk/disk230 from vg00 using vgreduce

5. Re-initialize  /dev/disk/disk230 the way it was described in the above post.

6. Extend vg00 to  /dev/disk/disk230, and start mirroring each logical volume to it.