Operating System - HP-UX
1834789 Members
2814 Online
110070 Solutions
New Discussion

Re: How was my disk pvcreated?

 
SOLVED
Go to solution
Ian Killer_1
Regular Advisor

How was my disk pvcreated?

Hi there...

I am wondering if anyone knows a way to determine if a disk was pvcreated with the -B option.

Ian
Where ever the gypsies rome.
5 REPLIES 5
harry d brown jr
Honored Contributor
Solution

Re: How was my disk pvcreated?

# lifls -C /dev/rdsk/c1t6d0
ODE MAPFILE SYSLIB CONFIGDATA SLMOD2
SLDEV2 SLDRV2 SLSCSI2 MAPPER2 IOTEST2
PERFVER2 PVCU SSINFO ISL AUTO
HPUX LABEL
# lifls -C /dev/rdsk/c2t6d0
lifls: Can't list /dev/rdsk/c2t6d0; not a LIF volume
#


live free or die
harry
Live Free or Die
Ashwani Kashyap
Honored Contributor

Re: How was my disk pvcreated?

THere you go Ian . Harry got it all .

IF lifls is successful then you know it was created with a -B option , other wise no .
Ian Killer_1
Regular Advisor

Re: How was my disk pvcreated?

Perfectamundo... Here is my output...

# lifls -C /dev/rdsk/c0t9d0
ISL AUTO HPUX PAD LABEL
Where ever the gypsies rome.
James R. Ferguson
Acclaimed Contributor

Re: How was my disk pvcreated?

Hi Ian:

Interrogating a disk for the presence of LIF header is NOT an indication that the disk was 'pvcreate'd with the '-B' option. The LIF is deposited by 'mkboot'. It can be placed on a disk regardless of the 'pvcreate' used to initialize it.

You can verify this by first overwriting the beginning of the disk with zeros so as not to pick up stale information from a previous use of the disk:

# dd if=/dev/zero of=/dev/rdsk/c0t6d3 count=10 bs=1024
10+0 records in
10+0 records out
# lifls /dev/rdsk/c0t6d3
lifls: Can't list /dev/rdsk/c0t6d3; not a LIF volume
# pvcreate -B /dev/rdsk/c0t6d3
Physical volume "/dev/rdsk/c0t6d3" has been successfully created.
# lifls /dev/rdsk/c0t6d3
lifls: Can't list /dev/rdsk/c0t6d3; not a LIF volume


For a disk to be bootable it must have been created with the '-B' option of 'pvcreate' to establish an area of boot-relevant information known as the BDRA (Boot Data Reserved Area).

A disk with a valid BDRA will show as a "boot disk" when a 'lvlnboot ???v' is issued. A disk initialized with a simple 'pvcreate' will not.

For example:

# pvcreate /dev/rdsk/c0t6d3
Physical volume "/dev/rdsk/c0t6d3" has been successfully created.
# vgextend -A n /dev/vg00 /dev/dsk/c0t6d3
Volume group "/dev/vg00" has been successfully extended.
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t6d0 (52.6.0) -- Boot Disk
/dev/dsk/c0t6d0 (8.6.0) -- Boot Disk
/dev/dsk/c0t6d3 (8.6.3)

Note that disk c0t6d3 is NOT a boot disk. It was NOT created with ???pvcreate ???B???.

On the other hand, when initialized correctly:

# pvcreate -B /dev/rdsk/c0t6d3
Physical volume "/dev/rdsk/c0t6d3" has been successfully created.
# vgextend -A n /dev/vg00 /dev/dsk/c0t6d3
Volume group "/dev/vg00" has been successfully extended.
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t6d0 (52.6.0) -- Boot Disk
/dev/dsk/c0t6d0 (8.6.0) -- Boot Disk
/dev/dsk/c0t6d3 (8.6.3) -- Boot Disk

Now note that c0t6d3 shows as a boot disk.

If you prefer to test to see whether or not a disk was created with a BBRA, you can create a dummy volume group consisting of the single physical disk and use 'lvlnboot ???v /dev/vgXX' to interrogate it:

# pvcreate -B /dev/rdsk/c0t6d3
Physical volume "/dev/rdsk/c0t6d3" has been successfully created.
# vgcreate /dev/vg01 /dev/dsk/c0t6d3
Volume group "/dev/vg01" has been successfully created.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
# lvlnboot -v /dev/vg01
lvlnboot: The Boot Data Area is empty.
Boot Definitions for Volume Group /dev/vg01:
The Boot Data Area is empty.

The same 'lvlnboot ???v' run against a disk 'pvcreate'd without the '-B' option will return a null response.

Regards!

...JRF...
Sridhar Bhaskarla
Honored Contributor

Re: How was my disk pvcreated?

I agree with JRF..

As per the scope of your question "lifls" does not give you if the disk was pvcreated with -B option.

#pvcreate -B /dev/rdsk/c1t0d0
#lifls /dev/dsk/c1t0d0
lifls: Can't list /dev/dsk/c1t0d0: not a LIF volume

mkboot actually writes the lifarea.
#mkboot /dev/dsk/c1t0d0
#lifls /dev/dsk/c1t0d0
ISL AUTO HPUX PAD LABEL

However, we need too go beyond scope of the question. So, Harry and others are correct as well :-).

-Sri
You may be disappointed if you fail, but you are doomed if you don't try