Operating System - HP-UX
1833452 Members
3157 Online
110052 Solutions
New Discussion

how to make the disk bootable?

 
SOLVED
Go to solution
praveen..
Super Advisor

how to make the disk bootable?

Hi,
PV status of one disk under vg00 was unavailable.
so i replaced the disk.

and after booting the server,
1. vgcfgrestore -n /dev/vg00 /dev/rdsk/c3t6d0
2. vgchange -a y /dev/vg00
3. vgsync vg00
4. mkboot /dev/rdsk/c2t6d0 (makes it bootable)

then I am getting this error:

# mkboot /dev/rdsk/c3t6d0
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

I typed "n" and made it exit?

should i proceed it using "y"?
will i losse the data, this is my production server and this disk is under vg00.

please suggest what to do?
how to make this disk bootable?

21 REPLIES 21
nanan
Trusted Contributor
Solution

Re: how to make the disk bootable?

Hi parveen

Your procedure was wrong.
First you should do pvcreate -B and then should vgcfgrestore.

1. pvcreate -B /dev/rdsk/cXtYdZ
2. mkboot -l /dev/rdsk/cXtYdZ
3. vgcfgrestore

Regards
nanan
Robert-Jan Goossens_1
Honored Contributor

Re: how to make the disk bootable?

Hi Praveen,

Your steps are correct according to the OLR (Online Disk Replacement). Check if you have next patches installed on your system.

The LVM OLR feature is enabled with the following patches:

HP-UX 11.11:
PHKL_31216 s700_800 11.11 LVM Cumulative Patch; LVM OLR; SLVM 16 Node
PHCO_30698 s700_800 11.11 LVM commands cumulative patch; LVM OLR

HP-UX 11.23:
PHKL_32095 s700_800 11.23 LVM Cumulative Patch; OLdR enablement
PHCO_31709 s700_800 11.23 LVM commands patch

Note: Apply these patches and any required dependencies. These patches, as with any patch, may be superseded. Please check for the latest patches at HP's IT Resource Center (ITRC) at the following web site:

http://www.itrc.hp.com

Best regards,
Robert-Jan
Robert-Jan Goossens_1
Honored Contributor

Re: how to make the disk bootable?

add on,

to make your mirror disk bootable, go to the appendix A of this doc.

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

RJ
praveen..
Super Advisor

Re: how to make the disk bootable?

I think I dont have OLR (Online Disk Replacement
# swlist | grep -i PHKL_31216
#

This was the detail of my vg00:

#vgdisplay -v /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 13
Open LV 13
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4384
VGDA 4
PE Size (Mbytes) 16
Total PE 8748
Alloc PE 7890
Free PE 858
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/stale
LV Size (Mbytes) 128
Current LE 8
Allocated PE 16
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 24576
Current LE 1536
Allocated PE 3072
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/stale
LV Size (Mbytes) 256
Current LE 16
Allocated PE 32
Used PV 2

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

LV Name /dev/vg00/lvol5
LV Status available/stale
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/stale
LV Size (Mbytes) 2320
Current LE 145
Allocated PE 290
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/stale
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/stale
LV Size (Mbytes) 3072
Current LE 192
Allocated PE 384
Used PV 2

LV Name /dev/vg00/lvol9
LV Status available/stale
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/oracle
LV Status available/stale
LV Name /dev/vg00/oracle
LV Status available/stale
LV Size (Mbytes) 8192
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg00/ora
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 2

LV Name /dev/vg00/laoracle
LV Status available/syncd
LV Size (Mbytes) 8192
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg00/home
LV Status available/stale
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c0t6d0
PV Status available
Total PE 4374
Free PE 429
Autoswitch On

PV Name /dev/dsk/c3t6d0
PV Status unavailable
Total PE 4374
Free PE 429
Autoswitch On

It was showing PV status unavailable.


so i replaced the disk and gave these commands:
1. vgcfgrestore -n /dev/vg00 /dev/rdsk/c3t6d0
2. vgchange -a y /dev/vg00
3. vgsync vg00

and now the present status is :

# vgdisplay -v /dev/vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 13
Open LV 13
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4384
VGDA 4
PE Size (Mbytes) 16
Total PE 8748
Alloc PE 7890
Free PE 858
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) 128
Current LE 8
Allocated PE 16
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 24576
Current LE 1536
Allocated PE 3072
Used PV 2

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

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

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

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 2320
Current LE 145
Allocated PE 290
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 3072
Current LE 192
Allocated PE 384
Used PV 2

LV Name /dev/vg00/lvol9
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg00/oracle
LV Status available/syncd
LV Size (Mbytes) 8192
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg00/ora
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 2

LV Name /dev/vg00/laoracle
LV Status available/syncd
LV Size (Mbytes) 8192
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg00/home
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 64
Allocated PE 128
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c0t6d0
PV Status available
Total PE 4374
Free PE 429
Autoswitch On

PV Name /dev/dsk/c3t6d0
PV Status available
Total PE 4374
Free PE 429
Autoswitch On



please let me know what should i do now?
how to make it bootable?

Thanks

nanan
Trusted Contributor

Re: how to make the disk bootable?

Praveen

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk


Post the output of lvlnboot -v
Did you do pvcreate -B ??

Regrads
nanan
praveen..
Super Advisor

Re: how to make the disk bootable?

No, I did not do pvcreate.

and after booting the server, i did only..
1. vgcfgrestore -n /dev/vg00 /dev/rdsk/c3t6d0
2. vgchange -a y /dev/vg00
3. vgsync vg00
4. mkboot /dev/rdsk/c2t6d0 (makes it bootable)

then I am getting this error:

# mkboot /dev/rdsk/c3t6d0
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

I typed "n" and made it exit?

should i proceed it using "y"?
will i losse the data, this is my production server and this disk is under vg00.

please suggest what to do?
how to make this disk bootable?
nanan
Trusted Contributor

Re: how to make the disk bootable?

You should do that command before do vgcfgrestore

You have to do again

The first Remove the pv from vg00

vgreduce vg00 /dev/dsk/c3t6d0

and then start from pvcreate -B


good luck

nanan
Trusted Contributor

Re: how to make the disk bootable?

Praveen !
I missed one
before do vgreduce
do lvreduce -m 0

Sorry

praveen..
Super Advisor

Re: how to make the disk bootable?

please check volume group vg00 configuration which i posted above.

so now should i give these commands:
1. vgreduce /dev/vg00 /dev/dsk/c3t6d0
2. pvcreate -B /dev/rdsk/c3t6d0
or #pvcreate -Bf /dev/rdsk/c3t6d0
3. vgcfgrestore -n /dev/vg00 /dev/rdsk/c3t6d0
4. vgchange -a y /dev/vg00
5. vgsync vg00
6. mkboot -l /dev/rdsk/c3t6d0
7. mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c3t6d0
8. lvlnboot -Rv

or should i use these commands:

1. vgreduce /dev/vg00 /dev/dsk/c3t6d0
2. pvcreate -B /dev/rdsk/c3t6d0
or #pvcreate -Bf /dev/rdsk/c3t6d0
3. vgcfgrestore -n /dev/vg00 /dev/rdsk/c3t6d0
4. vgchange -a y /dev/vg00
5. vgsync vg00
6. mkboot -l /dev/rdsk/c3t6d0
7. mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c3t6d0
8. lvlnboot -r /dev/vg00/lvol3 /dev/vg00
9. lvlnboot -b /dev/vg00/lvol1 /dev/vg00
10. lvlnboot -s /dev/vg00/lvol2 /dev/vg00
11. lvlnboot -d /dev/vg00/lvol2 /dev/vg00
12. lvlnboot -R
13. lvlnboot -v

at present, my system is in multi user mode, should i give these commands in multi user mode

or should i boot the server into LVM Maintenance Mode, if yes, how can i ?

server is very far from physically.

Thanks


nanan
Trusted Contributor

Re: how to make the disk bootable?

At the most you have to lvreduce as i stated
and then
choose secand one you posted above.

you can do this multi-mode don't worry

good luck!!
nanan
Trusted Contributor

Re: how to make the disk bootable?

At the most you have to lvreduce as i stated
and then
choose second one you posted above.

you can do this multi-mode don't worry

good luck!!
praveen..
Super Advisor

Re: how to make the disk bootable?

which logical volume should i reduce?

please tell me the full command.

these disks are mirrored to first disk, i think no need to reduce the LV.


at present, my system is in multi user mode, should i give these commands in multi user mode

or should i boot the server into LVM Maintenance Mode, if yes, how can i ?

server is very far from physically.

please suggest
Thanks
nanan
Trusted Contributor

Re: how to make the disk bootable?

copy and paste on your prompt
lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol3 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/oracle /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/ora /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/laoracle /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/home /dev/dsk/c3t6d0


praveen..
Super Advisor

Re: how to make the disk bootable?

does it will effect on LV size/confoguration or not?

this is production and running server..
nanan
Trusted Contributor

Re: how to make the disk bootable?

No, just split the mirror copy disk(c3t6d0)

praveen..
Super Advisor

Re: how to make the disk bootable?

I gave these commands:

lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol3 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/oracle /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/ora /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/laoracle /dev/dsk/c3t6d0
lvreduce -m 0 /dev/vg00/home /dev/dsk/c3t6d0

# vgreduce /dev/vg00 /dev/dsk/c3t6d0
# pvcreate -B /dev/rdsk/c3t6d0
#

and when i give this command:
# vgcfgrestore -n /dev/vg00 /dev/rdsk/c3t6d0
Configuration info for Physical Volume "/dev/rdsk/c3t6d0" not found
in "/etc/lvmconf/vg00.conf" :
Character-special file for PV not supplied on command line, OR
PV did not belong to Volume Group /dev/vg00 when configuration file was created.


what should i do?
nanan
Trusted Contributor

Re: how to make the disk bootable?

Praveen!
Good job. until now
It is no wonder you got the mesages because you remove the device name from lvmtab and your vgcfgbackup file no more containing the device on vg00.
Now, Let's start mirror OS

1. pvcreate -Bf/dev/rdsk/c3t6d0
2. vgextend vg00 /dev/dsk/c3t6d0
3. lvextend
all of the lvols
lvreduce -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/oracle /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/ora /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/laoracle /dev/dsk/c3t6d0
lvreduce -m 1 /dev/vg00/home /dev/dsk/c3t6d0

As you know these command is syncing for mirror volume.
it will take so long time depend on the disk size.

You can confirm whether or not that is normal with lvdisplay -v /dev/vg00/lvol1

After finish this. do lvlnboot you stated
and mkboot -l

Regards
nanan
praveen..
Super Advisor

Re: how to make the disk bootable?

Hi sanan,
Thanks for your help, now the present status is:

#pvcreate -B /dev/rdsk/c3t6d0
#vgextend /dev/vg00 /dev/dsk/c3t6d0
# lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0
# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol1" has been successfully extended.
lvlnboot: Boot volume should be the first logical volume on the physical volume
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0

# mkboot -l /dev/rdsk/c3t6d0
# mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c3t6d0
# lvlnboot -r /dev/vg00/lvol3 /dev/vg00
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
lvlnboot: Boot volume should be the first logical volume on the physical volume

# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

# lvlnboot -b /dev/vg00/lvol1 /dev/vg00
lvlnboot: Boot volume should be the first logical volume on the physical volume
# lvlnboot -R
lvlnboot: Boot volume should be the first logical volume on the physical volume
Volume Group configuration for /dev/vg09 has been saved in /etc/lvmconf/vg09.conf
Volume Group configuration for /dev/vg08 has been saved in /etc/lvmconf/vg08.conf
Volume Group configuration for /dev/vg07 has been saved in /etc/lvmconf/vg07.conf
Volume Group configuration for /dev/vg06 has been saved in /etc/lvmconf/vg06.conf
Volume Group configuration for /dev/vg05 has been saved in /etc/lvmconf/vg05.conf
Volume Group configuration for /dev/vg04 has been saved in /etc/lvmconf/vg04.conf
Volume Group configuration for /dev/vg03 has been saved in /etc/lvmconf/vg03.conf
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf


# lvlnboot -v | more
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

Current path "/dev/dsk/c31t0d2" is an alternate link, skip.
Current path "/dev/dsk/c31t0d3" is an alternate link, skip
:::::
:::::


now i am extending other lV size using lvextend command.


i want to know that is there any problem with # lvlnboot -b /dev/vg00/lvol1 /dev/vg00 this command,
because i got this message" lvlnboot: Boot volume should be the first logical volume on the physical volume"
and but with lvol2 & lvol3 , i got this message "Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf"

Please suggest

is this problem due to "first i extend lvol6 size" or not?

please suggest and thanks in advance

praveen..
Super Advisor

Re: how to make the disk bootable?

One more thing:


# lvlnboot -v | more
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

Current path "/dev/dsk/c31t0d2" is an alternate link, skip.
:::::::::::::::::::::::
:::::::::::::::::::::::

why it showing in Dump "/dev/dsk/c0t6d0, 0".

is there any problem with this?
nanan
Trusted Contributor

Re: how to make the disk bootable?

Never, lvol2 is swap insn't it?
and configuerd for crash dump area.

Bye~~

Regards
nanan
praveen..
Super Advisor

Re: how to make the disk bootable?

Thanks
It works

Thank you very much