1822895 Members
3863 Online
109645 Solutions
New Discussion юеВ

pvcreate -B

 
SOLVED
Go to solution
Ceesjan van Hattum
Esteemed Contributor

pvcreate -B

Hi,
The -B lets me create a bootable physical volume (i.e. system disk). Fine.
But is there a way to see if a disks really was created with the -B option?
Maybe pvdisplay has some features? I cannot use lvlnboot -v and my LVs and VGs are not realiable or stale.
Regards,
Ceesjan
18 REPLIES 18
harry d brown jr
Honored Contributor

Re: pvcreate -B

like this?

# lifls /dev/dsk/c1t6d0
ODE MAPFILE SYSLIB CONFIGDATA SLMOD2
SLDEV2 SLDRV2 SLSCSI2 MAPPER2 IOTEST2
PERFVER2 PVCU SSINFO ISL AUTO
HPUX LABEL
#


live free or die
harry
Live Free or Die
RAC_1
Honored Contributor

Re: pvcreate -B

lifls is the commad you can check.
man lifls.

Regards,
There is no substitute to HARDWORK
Ceesjan van Hattum
Esteemed Contributor

Re: pvcreate -B

Using lifls, i get some output on bootable disks, and not on the data disks. Okay!

But will i see the differences the same way when i have 1 disks made with:
pvcreate and mkboot -l and mkboot -a
and a second disk with only mkboots (and no pvcreate?).

The question rephrased:
does mkboot make lif-headers as well or is it just only pvcreate -B making this?

Regards,
Ceesjan
James R. Ferguson
Acclaimed Contributor

Re: pvcreate -B

Hi Ceesjan:

Examining a disk with 'lifls' is only going to show that 'mkboot' deposited information on the disk, *not* whether it was 'pvcreate'ed to be a bootable disk or not.

To ascertain whether or not the disk is bootable, 'vgextend' it into vg00. If the disk *is* bootable, it will show "Boot Disk" in an 'lvlnboot -v' output, indicating that it was created with 'pvcreate -B'. Otherwise the disk will be listed in the 'lvlnboot -v' output but *not* be flagged with "Boot Disk".

Regards!

...JRF...
Ceesjan van Hattum
Esteemed Contributor

Re: pvcreate -B

Hi James,
Thank you for pointing out that lif-headers are put by mkboot.
Unfortunately, my old unpatched hpux 10.20 system has a corruption in lvlnboot.
Therefor i cannot use this command, because it corrupts all LVM-informationfiles (like lvmtab and vg00.conf etcetera).
Ofcourse i will patch the system and correct all.
But before doing this, i want to know what disk has real bootable partitions (pvcreate -B).
There should be a substantional difference of sectors to be seen on which lvlnboot -v can see as well wheter or not the partition is there or not.
So.. i'm in search of something like a low level scan to read the partition without performing a vgextend.

Anyone has any suggestions?
Regards,
Ceesjan
Eugeny Brychkov
Honored Contributor

Re: pvcreate -B

Ceesjan,
as remember 'pvcreate -B' simply reserves space on the disk for boot area. Then 'mkboot' initializes structures and copies executables to this area.
Eugeny
Clemens van Everdingen
Honored Contributor

Re: pvcreate -B

Hi,

pvcreate -B just reserves space on the disk to use for boot related data.

mkboot puts the things in place, so then you will be able to see if it's really bootable.

see man pvcreate...

I will check a bit further...

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Eugeny Brychkov
Honored Contributor

Re: pvcreate -B

In addition, you can check if the disk is/was bootable by running "xd -c /dev/dsk/c0t5d0 | more". If you'll see in its output word "ISL" (offset=2) then it can be a bootable disk.
Eugeny
Clemens van Everdingen
Honored Contributor

Re: pvcreate -B

Hi,

I have attached a script.
lvm.10 (for 10.20)

usage: ./lvm.10 ? --> gives usage overview.
Might be helping you out.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
George Petrides_1
Honored Contributor

Re: pvcreate -B

The -B option only provides the functionality of the disk being able to be activated during boot time. If you have ever added in the previous OS versions (9.04 for example, I don't know if this is still an issue today) a disk to vg00 without the -B option, the system couldn't boot in regular mode and you had to boot with the -lm option and correct it. If the -B option worked OK, can be seen with the
lvlnboot -v /dev/vg00 and the disk will have a 'boot' label next to it. The LIF area is created with the mkboot command and the mkboot -a "hpux..." places the executables you need to boot in the LIF area. If you try to reboot from a mirror that was not correctly setup, then if you have another server you can connect the vg00 disks to the other server and import them as vgXX, execute the commands on the other server and then bring back the disks to the original machine and boot.
Hope this helps,
George
Clemens van Everdingen
Honored Contributor

Re: pvcreate -B

Hi,

If the disk is not created with -B the following will be the output:

/* Length of the BDRA */ 0

If pvcreate -B used you will see

* Length of the BDRA */ 16

used this:

lvm -l -d /dev/rdsk/cXtXdX|pg

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Ceesjan van Hattum
Esteemed Contributor

Re: pvcreate -B

Eugeny: I can see with xd the ISL bytes on some of disks. So far so good. But if mkboot makes the ISL (like lifls), it does not tell me if pvcreate reserved the space or not.

Clemens: I cannot open the attachement: /cm/components/FileAttachment/0,,0x7e1c06350fe2d61190050090279cd0f9,00.10 does not exist or is not retrievable.

George: as already reported, i cannot use lvlnboot and i cannot just boot my productionsystem. I need to have the information before the planned reboot during maintance window.

Clemens(2): The output is exactly what i want to have!! But is 'lvm -l -d' really the command? (lvm - command not found).

Please help me to retrieve the reserved bootspace of existing disks... please...
Clemens van Everdingen
Honored Contributor

Re: pvcreate -B

Ceesjan,

If the attachment is not readable, sent me an e-mail to cvanever@cmve.net, and I will sent you the file.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Clemens van Everdingen
Honored Contributor

Re: pvcreate -B

Ceesjan,

See your mail !

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
harry d brown jr
Honored Contributor

Re: pvcreate -B


Just get the latest version of ignite and rebuild your system!

http://www.software.hp.com/products/IUX/index.html

live free or die
harry
Live Free or Die
Clemens van Everdingen
Honored Contributor
Solution

Re: pvcreate -B

Ceesjan,

Did the script help you out ?
Let us know ?

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Ceesjan van Hattum
Esteemed Contributor

Re: pvcreate -B

The script works!
The output tells me pvcreate was run (see output).
Thanks a lot ! (case closed)
Regards,
Ceesjan

LVMREC fields
PSN == Physical Sector Number == DEV_BSIZE Units == Kb's
All units are Kb's except where specified
/* LVM ID */LVMREC01
/* The physical volume ID. */ 2140000543 1030627738
i.e. pvcreate(1m) was run on CPU with ID 2140000543 at Thu Aug 29 15:28:58 20
02
/* The volume group ID. */ 2140000543 898699126
i.e. vgcreate(1m) was run on CPU with ID 2140000543 at Wed Jun 24 16:38:46 19
98
/* Last physical sector number. */ 8891555
/* Physical Volume Number in VG */ 2
/* Length of the VGRA. */ 336
/* PSN of the VGRA. */ 2144
/* Length of the VGDA. */ 150
/* Length of the VGSA. */ 10
/* PSN of the primary VGDA. */ 2144
/* PSN of the secondary VGDA. */ 2312
/* Length of the mirror */ 8
/* PSN of the primary MCR. */ 2304
/* PSN of the secondary MCR. */ 2472
/* Length of the user data. */ 8884224
/* The start of the user data. */ 2912
/* Size of each physical extent.*/ 22 bytes
/* Size of physical space. */ 4096 bytes
/* Alternate block pool length. */ 4419
/* Alternate block pool start. */ 8887136
/* max no. of defects expected */ 1085
/* IO timeout */ 0
/* Length of the BDRA */ 16
/* PSN of the BDRA */ 128
/* Length of Boot Data Record */ 2
/* PSN of primary Boot Data Rec.*/ 128
/* PSN of 2nd Boot Data Rec. */ 136
/* Length of PV list area. */ 6
/* PSN of primary PV list area */ 130
/* PSN of 2nd PV list area */ 138
/* Cluster-lock flags. */
/* Cluster-lock area start. */ 0
/* Cluster that can use this vg */ 0
/* Configured activation Modes */ 0
Ceesjan van Hattum
Esteemed Contributor

Re: pvcreate -B

Just for the record: difference between 'pvcreate' and 'pvcreate -B' can be found in
/* Length of Boot Data Record */ 0
/* PSN of primary Boot Data Rec.*/ 0
/* PSN of 2nd Boot Data Rec. */ 0

.. versus ..

/* Length of Boot Data Record */ 2
/* PSN of primary Boot Data Rec.*/ 128
/* PSN of 2nd Boot Data Rec. */ 136

Regards,
Ceesjan