Operating System - HP-UX
1833304 Members
2898 Online
110051 Solutions
New Discussion

Re: LVM boot disk from scratch

 
borut kurnik_1
Frequent Advisor

LVM boot disk from scratch

Hi!

I've got rx1600 with two 36GB disks
dual channel Ultra320 SCSI controller.

c2t0d0 is VxVM managed current boot disk and
I'm trying to configure c2t1d0 as second boot
disk with LVM.

Everything seem to be ok, but when I try to
boot, loader starts but doesn't find the kernel. Looks that it cannot recognize
the LVM disk layout...

Would anybody be so kind and take a look
at my procedure and maybe give me a hint
what I'm missing...

Thanks,

Borut


Procedure:

[root@gremlin bin]# bash -x mklvmbd.sh c2t1d0
++ basename mklvmbd.sh
+ SYNTAX='mklvmbd.sh '
+ '[' 1 -ne 1 ']'
++ basename c2t1d0
+ RDEV=/dev/rdsk/c2t1d0
++ basename c2t1d0
+ CDEV=/dev/dsk/c2t1d0
++ basename mklvmbd.sh
+ IDF=/tmp/mklvmbd.sh_idisk.inp
+ cat
+ idisk -w -f /tmp/mklvmbd.sh_idisk.inp /dev/rdsk/c2t1d0
idisk version: 1.31
********************** WARNING ***********************
If you continue you may destroy all data on this disk.
Do you wish to continue(yes/no)? yes

EFI Primary Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0x76909836
MyLbaLo = 0x1
AlternateLbaLo = 0x43d635f
FirstUsableLbaLo = 0x22
LastUsableLbaLo = 0x43d633c
Disk GUID = ccf56e0e-6c2b-11dc-8001-d6217b60e588
PartitionEntryLbaLo = 0x2
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0xf1a2652b

Primary Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = ccf571c4-6c2b-11dc-8002-d6217b60e588
Starting Lba = 0x22
Ending Lba = 0xc8021
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = ccf571ec-6c2b-11dc-8003-d6217b60e588
Starting Lba = 0xc8022
Ending Lba = 0x43d633b

EFI Alternate Header:
Signature = EFI PART
Revision = 0x10000
HeaderSize = 0x5c
HeaderCRC32 = 0xab0e7132
MyLbaLo = 0x43d635f
AlternateLbaLo = 0x1
FirstUsableLbaLo = 0x22
LastUsableLbaLo = 0x43d633c
Disk GUID = ccf56e0e-6c2b-11dc-8001-d6217b60e588
PartitionEntryLbaLo = 0x43d633e
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0xf1a2652b

Alternate Partition Table (in 512 byte blocks):
Partition 1 (EFI):
Partition Type GUID = c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique Partition GUID = ccf571c4-6c2b-11dc-8002-d6217b60e588
Starting Lba = 0x22
Ending Lba = 0xc8021
Partition 2 (HP-UX):
Partition Type GUID = 75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique Partition GUID = ccf571ec-6c2b-11dc-8003-d6217b60e588
Starting Lba = 0xc8022
Ending Lba = 0x43d633b

Legacy MBR (MBR Signatures in little endian):
MBR Signature = 0x466df5cc

Protective MBR

+ ioscan -C disk
H/W Path Class Description
=====================================================
0/0/2/0.0.0.0 disk TEAC DV-28E-C
0/1/1/0.0.0 disk HP 36.4GST336607LC
0/1/1/0.1.0 disk COMPAQ BD036635C5
+ insf -e -C disk
insf: Installing special files for sdisk instance 0 address 0/0/2/0.0.0.0
insf: Installing special files for sdisk instance 1 address 0/1/1/0.0.0
insf: Installing special files for sdisk instance 2 address 0/1/1/0.1.0
+ mkboot -e -l /dev/rdsk/c2t1d0
+ efi_ls -d /dev/rdsk/c2t1d0s1
FileName Last Modified Size
EFI/ 9/26/2007 0
STARTUP.NSH 9/26/2007 296

total space 418598912 bytes, free space 415420416 bytes

+ lifls -l /dev/rdsk/c2t1d0s2
volume ISL10 data size 7984 directory size 8 03/08/29 23:48:24
filename type start size implement created
===============================================================
ISL -12800 584 242 0 03/08/29 23:48:24
AUTO -12289 832 1 0 03/08/29 23:48:24
HPUX -12928 840 848 0 03/08/29 23:48:24
PAD -12290 1688 1644 0 03/08/29 23:48:24
LABEL BIN 3336 8 0 07/09/26 14:27:26
+ mkboot -a 'boot vmunix' /dev/dsk/c2t1d0
+ efi_cp -d /dev/rdsk/c2t1d0s1 -u /EFI/HPUX/AUTO /tmp/x
+ cat /tmp/x
boot vmunix
+ pvcreate -B /dev/rdsk/c2t1d0s2
Physical volume "/dev/rdsk/c2t1d0s2" has been successfully created.
+ rm -fR /dev/vg00
+ mkdir -p /dev/vg00
+ mknod /dev/vg00/group c 64 0x010000
+ vgcreate -s 8 /dev/vg00 /dev/dsk/c2t1d0s2
Increased the number of physical extents per physical volume to 4291.
Volume group "/dev/vg00" has been successfully created.
Volume Group configuration for /dev/vg00 has been saved in
/etc/lvmconf/vg00.conf
+ lvcreate -C y -r n -L 1024 -n lvol1 /dev/vg00
Logical volume "/dev/vg00/lvol1" has been successfully created with
character device "/dev/vg00/rlvol1".
Logical volume "/dev/vg00/lvol1" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in
/etc/lvmconf/vg00.conf
+ lvcreate -C y -r n -L 2048 -n lvol3 /dev/vg00
Logical volume "/dev/vg00/lvol3" has been successfully created with
character device "/dev/vg00/rlvol3".
Logical volume "/dev/vg00/lvol3" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in
/etc/lvmconf/vg00.conf
+ vgdisplay -v
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 2
Open LV 2
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4291
VGDA 2
PE Size (Mbytes) 8
Total PE 4290
Alloc PE 384
Free PE 3906
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

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

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

--- Physical volumes ---
PV Name /dev/dsk/c2t1d0s2
PV Status available
Total PE 4290
Free PE 3906
Autoswitch On


++ vgdisplay -v
++ grep -i 'free pe'
++ head -n 1
++ awk '{ print $3; }'
+ FPE=3906
+ lvcreate -C y -r n -l 3906 -n lvol2 /dev/vg00
Logical volume "/dev/vg00/lvol2" has been successfully created with
character device "/dev/vg00/rlvol2".
Logical volume "/dev/vg00/lvol2" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in
/etc/lvmconf/vg00.conf
+ lvlnboot -r /dev/vg00/lvol2
lvlnboot: WARNING !! Creating a separate root volume, Use the -b option to the
lvlnboot command to create a separate boot volume
Volume Group configuration for /dev/vg00 has been saved in
/etc/lvmconf/vg00.conf
+ lvlnboot -b /dev/vg00/lvol1
Volume Group configuration for /dev/vg00 has been saved in
/etc/lvmconf/vg00.conf
+ lvlnboot -s /dev/vg00/lvol3
Volume Group configuration for /dev/vg00 has been saved in
/etc/lvmconf/vg00.conf
+ lvlnboot -d /dev/vg00/lvol3
Volume Group configuration for /dev/vg00 has been saved in
/etc/lvmconf/vg00.conf
+ mkfs -F vxfs /dev/vg00/lvol1
version 6 layout
1048576 sectors, 1048576 blocks of size 1024, log size 16384 blocks
largefiles supported
+ mkfs -F vxfs /dev/vg00/lvol2
version 6 layout
31997952 sectors, 31997952 blocks of size 1024, log size 16384 blocks
largefiles supported

+ mount -F vxfs /dev/vg00/lvol1 /t1
+ cd /stand; find . | cpio -pudm /t1
+ mount -F vxfs /dev/vg00/lvol2 /t2
+ cd /; find `cat /tmp/root.lst` | \
cpio -pudm/t2
13 REPLIES 13
J. Bravo
Respected Contributor

Re: LVM boot disk from scratch

I think you should create de lvols in the correct way (lvol1, lvol2 and lvol3) and use the following commands:

# lvlnboot -r /dev/vg00/lvol3 /dev/vg00
# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00
J. Bravo
Respected Contributor

Re: LVM boot disk from scratch

The equivalent commands for itanium architecture for lifls/lifcp are:

# efi_ls -d /dev/rdsk/c2t1d0s1

edit the AUTO file so we can boot when one disk is missing:

# efi_cp -d /dev/rdsk/c2t0d0s1 -u /EFI/HPUX/AUTO /tmp/AUTO

# vi /tmp/AUTO

modify "boot vmunix" to "boot vmunix -lq"

then put back the file on both EFI partitions with:

# efi_cp -d /dev/rdsk/c2t1d0s1 /tmp/AUTO /EFI/HPUX/AUTO

# efi_cp -d /dev/rdsk/c2t0d0s1 /tmp/AUTO /EFI/HPUX/

Regards.
Aussan
Respected Contributor

Re: LVM boot disk from scratch

take a look at the document attached,
it should help you



Regards

Aussan
The tongue weighs practically nothing, but so few people can hold it
borut kurnik_1
Frequent Advisor

Re: LVM boot disk from scratch

Hi again.

Thanks four you quick replies.

J.Bravo,

lvol3 is definitely swap & lvol2 is
root volume, as I explicitely specified that
with '-n' qualivier.

AUTO seems to be ok, loader just cannot
find the kernel (vmunix), but I don't
think this is a problem here.

Aussan,

I'll dig into that document right away.

Thanks again,

Borut


J. Bravo
Respected Contributor

Re: LVM boot disk from scratch

Hi, it´s possible that if you have a 11.23 system, you need three partitions in the file for use with idisk command:

# vi /tmp/partitionfile
3
EFI 500MB
HPUX 100%
HPSP 400MB

Regards.
J. Bravo
Respected Contributor

Re: LVM boot disk from scratch

Do you have updated the /etc/fstab file on your LVM boot disk to reflect the new lvols?

Regards.

Torsten.
Acclaimed Contributor

Re: LVM boot disk from scratch

I never "cloned" a vxvm disk to lvm this way, but

- use the default order
lvol1 /stand
lvol2 swap
lvol3 /

Some commands are missing, like
efi_fsinit -d /dev/rdsk/...
...
echo "l /dev/dsk/..." >> /stand/bootconf
...
lvlnboot -r /dev/vg00/lvol3
lvlnboot -b /dev/vg00/lvol1
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2


From EFI, go to the disk and start hpux loader - interrupt the autoboot.

Run "hpux ls" or ll - what can you see?


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!   
borut kurnik_1
Frequent Advisor

Re: LVM boot disk from scratch

Hi!

Yes, tried everything (3 partitions & had fstab on target disk updated from the begining, updated /stand/bootconfig, ...), but loader just doesn't recognize the new boot disk.

HPUX>boot
Could not open file vmunix to check for directory
Could not open vmunix

Kernel loading failed

HPUX>ls
Could not open dir:

Regards,

Borut
J. Bravo
Respected Contributor

Re: LVM boot disk from scratch

Good morning:

Try to format the first partition to FAT after the creation of the 3 partitons (idisk) with:

efi_fsinit -d /dev/rdsk/c2t1d0s1


and then repeat the rest of your procedure.

Hope it helps.

Regards.
borut kurnik_1
Frequent Advisor

Re: LVM boot disk from scratch

Hi!

Although 'mkboot -e -l ...' is suppose to
do that ('efi_ls' shows EFI fs after it
just fine), I tried that too, same story.

Thanks anyways,

Borut
J. Bravo
Respected Contributor

Re: LVM boot disk from scratch

Hello!

Could you attach the output of the following commands, please?

efi_ls -d /dev/rdsk/c2t1d0s1 /EFI/
efi_ls -d /dev/rdsk/c2t1d0s1 /EFI/HPUX
lvlnboot -v

Regards;

J. Bravo.
borut kurnik_1
Frequent Advisor

Re: LVM boot disk from scratch

Hi!

Thanks for your help, J.Bravo.

I will but in a few hours time (don't know
exactly) as I'm out of firm today.

However it will be /dev/rdsk/c2t0d0s1 as I
temporarily gave up and installed
LVM managed boot disk from inst. CD to
/dev/rdsk/c2t1d0s1 .

I've already prepared a script,
so it will only take me a few minutes to
get to the problematic part and send
you efi_ls output imediately.

Regards,

Borut








borut kurnik_1
Frequent Advisor

Re: LVM boot disk from scratch

Hello!

/dev/[r]dsk/c2t1d0 is now my LVM boot
device (DVD installed, boots ok) and
I used the same procedure to create
bootable LVM layout on /dev/[r]dsk/c2t0d0.

Result is the same, of course :-/

Here you go:

[root@gremlin /]# efi_ls -d /dev/rdsk/c2t0d0s1 /EFI
FileName Last Modified Size
. 9/29/2007 0
.. 9/29/2007 0
HPUX/ 9/29/2007 0
Intel_Firmware/ 9/29/2007 0
DIAG/ 9/29/2007 0
HP/ 9/29/2007 0
TOOLS/ 9/29/2007 0

total space 523251712 bytes, free space 519856128 bytes

[root@gremlin /]# efi_ls -d /dev/rdsk/c2t0d0s1 /EFI/HPUX
FileName Last Modified Size
. 9/29/2007 0
.. 9/29/2007 0
HPUX.EFI 9/29/2007 644703
NBP.EFI 9/29/2007 24576
AUTO 9/29/2007 12

total space 523251712 bytes, free space 519856128 bytes

Regards,

Borut