SAS Physical Disk Replacement Procedure With LVM Mirroring
HP-UX 11.23 Only
Send feedback to This technical work is published by Jay Duffield (jay.duffield@hp.com)
Overview
SAS controllers use a different addressing
scheme than parallel SCSI like U320 or SCSI-2. Where SCSI ID
and therefore disk slot numbers were important, SAS uses a unique
address of the disks themselves to identify the disks as part of a
LUN (logical unit) or an HP-UX special device file like
/dev/dsk/c0t0d0. You can take a disk out of one slot (referred
to as bays) and put it in a different slot or bay. The
controller finds it and presents the disk to the O/S with the same
special device file. This does complicate the procedure needed
for replacing a failed disk.
When a disk fails, and a new disk is put into the
same bay that the failed disk came out of, the SAS controller knows
it is a different disk by its SAS address. The O/S driver
assigns the next available target for the hardware path (viewed with
ioscan) and special device file if insf -e is executed. The sasmgr(1M)
command must be used with the replace_tgt command to replace the
special device file used by LVM with the hardware path to the new
disk.
Running sasmgr replace_tgt is very simple as long
as there are no I/Os pending or no I/O drivers that have the special
device file open for reading/writing. This is rarely the case
however, and LVM will continue to try to access that special device
file waiting for the failed disk to return.
You must stop all access to the special device
file first by executing pvchange to deactivate that physical
volume. Once the new disk is inserted, create the EFI
partitions, and vgcfgrestore the LVM information onto section
2. As an alternative, you can unmirror the volume group and
vgreduce the bad disk from the volume group. Following is the
procedure using pvchange and vgcfgrestore to replace a mirrored boot
disk in vg00. It is noted which steps are not necessary for
non-bootable volume groups.
#
ioscan -kfnH 0/4/1/0
Class
I H/W Path
Driver S/W State H/W
Type Description
===============================================================================
escsi_ctlr 0
0/4/1/0
sasd CLAIMED
INTERFACE HP PCI/PCI-X SAS MPT
Adapter
/dev/sasd0
ext_bus 1
0/4/1/0.0.0 sasd_vbus
CLAIMED INTERFACE SAS
Device Interface
target
2 0/4/1/0.0.0.2
tgt
CLAIMED DEVICE
disk
3 0/4/1/0.0.0.2.0 sdisk
CLAIMED DEVICE
HP
DG072A9BB7
/dev/dsk/c1t2d0
/dev/rdsk/c1t2d0
target
3 0/4/1/0.0.0.3
tgt
CLAIMED DEVICE
disk
4 0/4/1/0.0.0.3.0 sdisk
CLAIMED
DEVICE
HP DG072A9BB7
/dev/dsk/c1t3d0
/dev/rdsk/c1t3d0
target 4
0/4/1/0.0.0.4 tgt
CLAIMED DEVICE
disk
5 0/4/1/0.0.0.4.0 sdisk
CLAIMED
DEVICE
HP DG036A8B5B
/dev/dsk/c1t4d0
/dev/rdsk/c1t4d0
/dev/dsk/c1t4d0s1 /dev/rdsk/c1t4d0s1
/dev/dsk/c1t4d0s2 /dev/rdsk/c1t4d0s2
/dev/dsk/c1t4d0s3 /dev/rdsk/c1t4d0s3
target
5 0/4/1/0.0.0.7
tgt
CLAIMED DEVICE
disk
8 0/4/1/0.0.0.7.0 sdisk
CLAIMED
DEVICE
HP DG036A9BB6
/dev/dsk/c1t7d0
/dev/rdsk/c1t7d0
/dev/dsk/c1t7d0s1 /dev/rdsk/c1t7d0s1
/dev/dsk/c1t7d0s2 /dev/rdsk/c1t7d0s2
/dev/dsk/c1t7d0s3 /dev/rdsk/c1t7d0s3
target
6 0/4/1/0.0.0.10 tgt
CLAIMED DEVICE
disk
11 0/4/1/0.0.0.10.0 sdisk
CLAIMED
DEVICE
HP IR Volume
/dev/dsk/c1t10d0
/dev/rdsk/c1t10d0
#
sasmgr get_info -D /dev/sasd0 -q lun=all -q
lun_locate
/dev/rdsk/c1t2d0
0/4/1/0.0.0.2.0
1 3 OFF
/dev/rdsk/c1t3d0
0/4/1/0.0.0.3.0
1 4 OFF
/dev/rdsk/c1t4d0
0/4/1/0.0.0.4.0
1 5
OFF
/dev/rdsk/c1t7d0
0/4/1/0.0.0.7.0
1 8
OFF
RAID VOL ID is 4 :
/dev/rdsk/c1t10d0
0/4/1/0.0.0.10.0
Physical disks in volume are :
1 1
OFF
HP
DG072A9BB7
HPD0
1 2
OFF
HP
DG072A9BB7
HPD0
Turn on the disks locator LED to ensure the correct disk is
removed.
#
sasmgr set_attr -D /dev/sasd0 -q
lun=/dev/rdsk/c1t4d0 -q locate_led=on
Locate LED set to ON.
#
sasmgr get_info -D /dev/sasd0 -q lun=all -q
lun_locate
/dev/rdsk/c1t2d0
0/4/1/0.0.0.2.0
1 3 OFF
/dev/rdsk/c1t3d0
0/4/1/0.0.0.3.0
1 4 OFF
/dev/rdsk/c1t4d0
0/4/1/0.0.0.4.0
1 5
ON
/dev/rdsk/c1t7d0
0/4/1/0.0.0.7.0
1 8
OFF
RAID VOL ID is 4 :
/dev/rdsk/c1t10d0
0/4/1/0.0.0.10.0
Physical disks in volume are :
1 1
OFF
HP
DG072A9BB7
HPD0
1 2
OFF
HP
DG072A9BB7
HPD0
Procedure
At this point the disk in bay 5 fails or is
pulled out of the server to simulate a failure. A new disk is
inserted in the same bay. The server should not be rebooted or
taken down between the time the disk fails and the time the new disk
is inserted. If the server has been rebooted for any reason,
check to be sure you have at least revision B.11.23.03.01 of the
SerialSCSI-00 fileset. Click
here to jump to the bottom of this document for more
information.
1. Identify the location of the failed disk
highlighted in red, the mirror of
that disk in blue, and the new
replacement disk is in dark
red. Note below that NO_HW indicates a disk that is no
longer accessible to the O/S.
#
ioscan -fnH 0/4/1/0
Class
I H/W Path
Driver S/W State H/W
Type Description
===============================================================================
escsi_ctlr 0
0/4/1/0
sasd CLAIMED
INTERFACE HP PCI/PCI-X SAS MPT
Adapter
/dev/sasd0
ext_bus 1
0/4/1/0.0.0 sasd_vbus
CLAIMED INTERFACE SAS
Device Interface
target
2 0/4/1/0.0.0.2
tgt
CLAIMED DEVICE
disk
3 0/4/1/0.0.0.2.0 sdisk
CLAIMED
DEVICE
HP DG072A9BB7
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
target
3 0/4/1/0.0.0.3
tgt
CLAIMED DEVICE
disk
4 0/4/1/0.0.0.3.0 sdisk
CLAIMED
DEVICE
HP DG072A9BB7
/dev/dsk/c1t3d0 /dev/rdsk/c1t3d0
target 4
0/4/1/0.0.0.4 tgt
NO_HW DEVICE
disk
5 0/4/1/0.0.0.4.0 sdisk
NO_HW
DEVICE
HP DG036A8B5B
/dev/dsk/c1t4d0 /dev/rdsk/c1t4d0
/dev/dsk/c1t4d0s1 /dev/rdsk/c1t4d0s1
/dev/dsk/c1t4d0s2 /dev/rdsk/c1t4d0s2
/dev/dsk/c1t4d0s3 /dev/rdsk/c1t4d0s3
target 5
0/4/1/0.0.0.7 tgt
CLAIMED DEVICE
disk
8 0/4/1/0.0.0.7.0 sdisk
CLAIMED
DEVICE
HP DG036A9BB6
/dev/dsk/c1t7d0 /dev/rdsk/c1t7d0
/dev/dsk/c1t7d0s1 /dev/rdsk/c1t7d0s1
/dev/dsk/c1t7d0s2 /dev/rdsk/c1t7d0s2
/dev/dsk/c1t7d0s3 /dev/rdsk/c1t7d0s3
target
6 0/4/1/0.0.0.10 tgt
CLAIMED DEVICE
disk
11 0/4/1/0.0.0.10.0 sdisk
CLAIMED
DEVICE
HP IR Volume
/dev/dsk/c1t10d0
/dev/rdsk/c1t10d0
target
7 0/4/1/0.0.0.11 tgt
CLAIMED DEVICE
disk
12 0/4/1/0.0.0.11.0 sdisk
CLAIMED
DEVICE
HP DG036A8B5B
#
sasmgr get_info -D /dev/sasd0 -q lun=all -q
lun_locate
/dev/rdsk/c1t2d0
0/4/1/0.0.0.2.0
1 3 OFF
/dev/rdsk/c1t3d0
0/4/1/0.0.0.3.0
1 4 OFF
/dev/rdsk/c1t7d0
0/4/1/0.0.0.7.0
1 8 OFF
RAID VOL ID is 4 :
/dev/rdsk/c1t10d0
0/4/1/0.0.0.10.0
Physical disks in volume are :
1 1
OFF
HP
DG072A9BB7
HPD0
1 2
OFF
HP
DG072A9BB7
HPD0
#
sasmgr get_info -D /dev/sasd0 -q
raid
Thu Dec 14 14:59:28 2006
---------- PHYSICAL DRIVES ----------
LUN
dsf
SAS Address
Enclosure Bay
Size(MB)
/dev/rdsk/c1t2d0
0x500000e012691cb2
1
3 70007
/dev/rdsk/c1t3d0
0x500000e0126926d2
1
4 70007
/dev/rdsk/c1t7d0
0x500000e01263fcc2
1
8 34732
---------- LOGICAL DRIVE 4 ----------
Raid
Level
: RAID 1
Volume sas
address
:
0x611d224fa01c82
Device Special
File
: /dev/rdsk/c1t10d0
Raid
State
: OPTIMAL
Raid Status
Flag
: ENABLED
Raid
Size
: 34000
Rebuild
Rate
: 20.00 %
Rebuild
Progress
: 100.00 %
Participating Physical Drive(s) :
SAS
Address
Enc Bay
Size(MB)
Type
State
0x500000e01268e312
1 1
70007
SECONDARY ONLINE
0x500000e012691ee2
1 2
70007
PRIMARY
ONLINE
#
sasmgr replace_tgt -D /dev/sasd0 -q
old_dev=/dev/dsk/c1t4d0 -q
new_tgt_hwpath=0/4/1/0.0.0.11.0
WARNING: This is a DESTRUCTIVE operation.
This might result in failure of current I/O
requests.
Do you want to continue ?(y/n)
[n]...
ERROR: Unable to replace
target: Device busy
2. The reason this command fails is because
LVM is still trying to access /dev/dsk/c1t4d0s2, since it is part of
vg00.
#
vgdisplay -v vg00
--- Volume groups ---
VG
Name
/dev/vg00
VG Write
Access
read/write
VG
Status
available
Max
LV
255
Cur
LV
8
Open
LV
8
Max
PV
16
Cur
PV
2
Act
PV
2
Max PE per
PV
4238
VGDA
4
PE Size
(Mbytes)
8
Total
PE
8456
Alloc
PE
6008
Free
PE
2448
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)
304
Current
LE
38
Allocated
PE
76
Used
PV
2
LV
Name
/dev/vg00/lvol2
LV
Status
available/syncd
LV Size
(Mbytes)
4096
Current
LE
512
Allocated
PE
1024
Used
PV
2
LV Name
/dev/vg00/lvol3
LV
Status
available/stale
LV Size
(Mbytes)
560
Current
LE
70
Allocated
PE
140
Used
PV
2
LV
Name
/dev/vg00/lvol4
LV
Status
available/stale
LV Size
(Mbytes)
200
Current
LE
25
Allocated
PE
50
Used
PV
2
LV
Name
/dev/vg00/lvol5
LV
Status
available/stale
LV Size
(Mbytes)
24
Current
LE
3
Allocated
PE
6
Used
PV
2
LV Name
/dev/vg00/lvol6
LV
Status
available/stale
LV Size
(Mbytes)
6568
Current
LE
821
Allocated
PE
1642
Used
PV
2
LV
Name
/dev/vg00/lvol7
LV
Status
available/stale
LV Size
(Mbytes)
6584
Current
LE
823
Allocated
PE
1646
Used
PV
2
LV
Name
/dev/vg00/lvol8
LV
Status
available/stale
LV Size
(Mbytes)
5696
Current
LE
712
Allocated
PE
1424
Used
PV
2
--- Physical volumes ---
PV
Name
/dev/dsk/c1t7d0s2
PV
Status
available
Total
PE
4228
Free
PE
1224
Autoswitch
On
PV
Name
/dev/dsk/c1t4d0s2
PV
Status
unavailable
Total
PE
4228
Free
PE
1224
Autoswitch
On
3. The "PV Status" shows
it as "unavailable," but LVM is still waiting for that disk to
return. Therefore, it is necessary to stop access to the
special device file before the sasmgr replace_tgt command will
work. First pvchange -a n /dev/dsk/c1t4d0s2 to deactivate the
physical volume. Then use the sasmgr replace_tgt command to
switch the special device file to the new disk.
# pvchange -a n /dev/dsk/c1t4d0s2
Warning: Detaching a physical volume reduces the availability
of data
within the logical volumes residing on that disk.
Prior to detaching a physical volume or the last available
path to it,
verify that there are alternate copies of the data
available on other disks in the volume group.
If necessary, use pvchange(1M) to reverse this
operation.
Physical volume "/dev/dsk/c1t4d0s2" has been
successfully changed.
#
vgdisplay -v vg00
--- Volume groups ---
VG
Name
/dev/vg00
VG Write
Access
read/write
VG
Status
available
Max
LV
255
Cur
LV
8
Open
LV
8
Max
PV
16
Cur
PV
2
Act
PV
1
Max PE per
PV
4238
VGDA
2
PE Size
(Mbytes)
8
Total
PE
4228
Alloc
PE
3004
Free
PE
1224
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)
304
Current
LE
38
Allocated
PE
38
Used
PV
2
LV
Name
/dev/vg00/lvol2
LV
Status
available/syncd
LV Size
(Mbytes)
4096
Current
LE
512
Allocated
PE
512
Used
PV
2
LV
Name
/dev/vg00/lvol3
LV
Status
available/syncd
LV Size
(Mbytes)
560
Current
LE
70
Allocated
PE
70
Used
PV
2
LV
Name
/dev/vg00/lvol4
LV
Status
available/syncd
LV Size
(Mbytes)
200
Current
LE
25
Allocated
PE
25
Used
PV
2
LV
Name
/dev/vg00/lvol5
LV
Status
available/syncd
LV Size
(Mbytes)
24
Current
LE
3
Allocated
PE
3
Used
PV
2
LV
Name
/dev/vg00/lvol6
LV
Status
available/syncd
LV Size
(Mbytes)
6568
Current
LE
821
Allocated PE
821
Used
PV
2
LV
Name
/dev/vg00/lvol7
LV
Status
available/syncd
LV Size
(Mbytes)
6584
Current
LE
823
Allocated
PE
823
Used
PV
2
LV
Name
/dev/vg00/lvol8
LV
Status
available/syncd
LV Size
(Mbytes)
5696
Current
LE
712
Allocated
PE
712
Used
PV
2
--- Physical volumes ---
PV
Name
/dev/dsk/c1t7d0s2
PV
Status
available
Total
PE
4228
Free
PE
1224
Autoswitch
On
PV
Name
/dev/dsk/c1t4d0s2
PV
Status
unavailable
Total
PE
4228
Free
PE
1224
Autoswitch
On
4. Now /dev/dsk/c1t4d0 is free, and we can
assign the new disk to special device file /dev/dsk/c1t4d0. Be
sure you do not use the "-k" option to ioscan, so that the hardware
is rescanned for changes.
#
sasmgr replace_tgt -D /dev/sasd0 -q
old_dev=/dev/dsk/c1t4d0 -q
new_tgt_hwpath=0/4/1/0.0.0.11.0
WARNING: This is a DESTRUCTIVE operation.
This might result in failure of current I/O
requests.
Do you want to continue ?(y/n) [n]...
LUN has been replaced with new Target.
#
ioscan -fnC disk
Class
I H/W Path
Driver S/W
State H/W Type
Description
====================================================================================
disk
0 0/0/2/1.0.16.0.0
sdisk
CLAIMED
DEVICE TEAC
DV-28E-N
/dev/dsk/c0t0d0
/dev/rdsk/c0t0d0
disk
3 0/4/1/0.0.0.2.0
sdisk
CLAIMED
DEVICE
HP DG072A9BB7
/dev/dsk/c1t2d0
/dev/rdsk/c1t2d0
disk
4 0/4/1/0.0.0.3.0
sdisk
CLAIMED
DEVICE
HP DG072A9BB7
/dev/dsk/c1t3d0
/dev/rdsk/c1t3d0
disk
5 0/4/1/0.0.0.4.0
sdisk
CLAIMED
DEVICE
HP DG036A8B5B
/dev/dsk/c1t4d0
/dev/rdsk/c1t4d0
/dev/dsk/c1t4d0s1 /dev/rdsk/c1t4d0s1
/dev/dsk/c1t4d0s2 /dev/rdsk/c1t4d0s2
/dev/dsk/c1t4d0s3 /dev/rdsk/c1t4d0s3
disk
8 0/4/1/0.0.0.7.0
sdisk
CLAIMED
DEVICE
HP DG036A9BB6
/dev/dsk/c1t7d0
/dev/rdsk/c1t7d0
/dev/dsk/c1t7d0s1 /dev/rdsk/c1t7d0s1
/dev/dsk/c1t7d0s2 /dev/rdsk/c1t7d0s2
/dev/dsk/c1t7d0s3 /dev/rdsk/c1t7d0s3
disk
11 0/4/1/0.0.0.10.0
sdisk
CLAIMED
DEVICE
HP IR Volume
/dev/dsk/c1t10d0
/dev/rdsk/c1t10d0
disk
12 0/4/1/0.0.0.11.0
sdisk
NO_HW DEVICE
HP
DG036A8B5B
Notice that the S/W State of the H/W Path
0/4/1/0.0.0.4.0 changed to CLAIMED, and the S/W State of the H/W
Path 0/4/1/0.0.0.11.0 changed to NO_H/W. The hardware path
0/4/1/0.0.0.11.0 will remain in the ioscan output until the next
reboot.
5. Now you must restore LVM mirroring to
the new disk. If this is a bootable volume group, it involves
creating the EFI partitions and formatting partition 1; changing the
autoboot file if this was the mirror (not necessary for the primary
disk); and, restoring the LVM information to section 2 of the
disk.
If your volume group is NOT a bootable volume
group like vg00, skip
to step 12.
Note: Only necessary for vg00. This
confirms that no EFI partitions exist on the new disk.
#
idisk
/dev/rdsk/c1t4d0
idisk version: 1.31
idisk: Primary partition information not
valid.
Run idisk with -r option to
restore.
6. Note: Only necessary for vg00.
Create a template file of the EFI partition parameters.
#
cat <<EOF >
/tmp/partitionfile
> 3
> EFI
500MB
> HPUX
100%
> HPSP
400MB
> EOF
7. Note: Only necessary for vg00.
Create the EFI partitions using the template.
#
idisk -wf /tmp/partitionfile
/dev/rdsk/c1t4d0
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
= 0x39aa64b6
MyLbaLo
= 0x1
AlternateLbaLo
= 0x43d671f
FirstUsableLbaLo
= 0x22
LastUsableLbaLo
= 0x43d66fc
Disk
GUID
=
dfdf740c-8bb1-11db-8001-d6217b60e588
PartitionEntryLbaLo =
0x2
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x60502b29
Primary Partition Table (in 512 byte
blocks):
Partition 1 (EFI):
Partition Type GUID =
c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique
Partition GUID =
dfdf75a6-8bb1-11db-8002-d6217b60e588
Starting
Lba
= 0x22
Ending
Lba
= 0xfa021
Partition 2
(HP-UX):
Partition Type GUID =
75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique
Partition GUID =
dfdf75ec-8bb1-11db-8003-d6217b60e588
Starting
Lba
= 0xfa022
Ending
Lba
= 0x430e6fb
Partition 3
(HPSP):
Partition Type
GUID =
e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition
GUID =
dfdf7614-8bb1-11db-8004-d6217b60e588
Starting
Lba
= 0x430e6fc
Ending
Lba
=
0x43d66fb
EFI Alternate Header:
Signature
= EFI PART
Revision
= 0x10000
HeaderSize
= 0x5c
HeaderCRC32
= 0xedbd53ee
MyLbaLo
= 0x43d671f
AlternateLbaLo
= 0x1
FirstUsableLbaLo
= 0x22
LastUsableLbaLo
= 0x43d66fc
Disk
GUID
= dfdf740c-8bb1-11db-8001-d6217b60e588
PartitionEntryLbaLo =
0x43d66fe
NumberOfPartitionEntries = 0xc
SizeOfPartitionEntry = 0x80
PartitionEntryArrayCRC32 = 0x60502b29
Alternate Partition Table (in 512 byte
blocks):
Partition 1 (EFI):
Partition Type GUID =
c12a7328-f81f-11d2-ba4b-00a0c93ec93b
Unique
Partition GUID =
dfdf75a6-8bb1-11db-8002-d6217b60e588
Starting
Lba
= 0x22
Ending
Lba
= 0xfa021
Partition 2
(HP-UX):
Partition Type GUID =
75894c1e-3aeb-11d3-b7c1-7b03a0000000
Unique
Partition GUID =
dfdf75ec-8bb1-11db-8003-d6217b60e588
Starting
Lba
= 0xfa022
Ending
Lba
= 0x430e6fb
Partition 3
(HPSP):
Partition Type
GUID =
e2a1e728-32e3-11d6-a682-7b03a0000000
Unique Partition
GUID =
dfdf7614-8bb1-11db-8004-d6217b60e588
Starting
Lba
= 0x430e6fc
Ending
Lba
= 0x43d66fb
Legacy MBR (MBR Signatures in little
endian):
MBR Signature =
0x8a73dfdf
Protective MBR
8. Now the EFI partition is displayed when
the ioscan -e option is used. If the system was rebooted before
running the replace_tgt command, it will also be necessary to run
"insf -eC disk" to create the special device files for the
additional disk sections.
#
ioscan -fneC disk
Class
I H/W Path
Driver S/W
State H/W Type
Description
====================================================================================
disk
0 0/0/2/1.0.16.0.0
sdisk
CLAIMED
DEVICE TEAC
DV-28E-N
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
disk
3 0/4/1/0.0.0.2.0
sdisk
CLAIMED
DEVICE
HP DG072A9BB7
/dev/dsk/c1t2d0
/dev/rdsk/c1t2d0
Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Sas(Addr500000E012691CB2,
Lun0)
disk
4 0/4/1/0.0.0.3.0
sdisk
CLAIMED
DEVICE
HP DG072A9BB7
/dev/dsk/c1t3d0
/dev/rdsk/c1t3d0
Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Sas(Addr500000E0126926D2,
Lun0)
disk
5 0/4/1/0.0.0.4.0
sdisk
CLAIMED
DEVICE
HP DG036A8B5B
/dev/dsk/c1t4d0
/dev/rdsk/c1t4d0
/dev/dsk/c1t4d0s1 /dev/rdsk/c1t4d0s1
/dev/dsk/c1t4d0s2 /dev/rdsk/c1t4d0s2
/dev/dsk/c1t4d0s3 /dev/rdsk/c1t4d0s3
Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Sas(Addr500000E011A8D382,
Lun0)/HD(Part1,SigDFDF75A6-8BB1-11DB-8002-D6217B60E588)/\EFI\HPUX\HPUX.EFI
disk
8 0/4/1/0.0.0.7.0
sdisk
CLAIMED
DEVICE
HP DG036A9BB6
/dev/dsk/c1t7d0
/dev/rdsk/c1t7d0
/dev/dsk/c1t7d0s1 /dev/rdsk/c1t7d0s1
/dev/dsk/c1t7d0s2 /dev/rdsk/c1t7d0s2
/dev/dsk/c1t7d0s3 /dev/rdsk/c1t7d0s3
Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Sas(Addr500000E01263FCC2,
Lun0)/HD(Part1,SigCFBF8B12-42CC-11DB-8002-D6217B60E588)/\EFI\HPUX\HPUX.EFI
disk
11 0/4/1/0.0.0.10.0
sdisk
CLAIMED
DEVICE
HP IR Volume
/dev/dsk/c1t10d0
/dev/rdsk/c1t10d0
Acpi(HWP0002,PNP0A03,400)/Pci(1|0)/Scsi(Pun4,
Lun0)
disk
12 0/4/1/0.0.0.11.0
sdisk
NO_HW
DEVICE
HP DG036A8B5B
9. Note: Only necessary for vg00.
Format EFI partition #1.
#
efi_fsinit -d
/dev/rdsk/c1t4d0s1
10. Note: Only necessary for vg00.
Copy the bootable files to the EFI partition.
#
mkboot -e -l /dev/rdsk/c1t4d0
11. Note: Only necessary for the mirrored disk of
vg00 (listed as PV2 in lvdisplay -v output). Create and copy
the autofile to the EFI partition.
#
echo "boot vmunix -lq" >
/tmp/auto.lq
#
efi_cp -d /dev/rdsk/c1t4d0s1 /tmp/auto.lq
/EFI/HPUX/AUTO
#
efi_ls -d /dev/rdsk/c1t4d0s1
/EFI/HPUX
FileName
Last
Modified
Size
.
12/14/2006
0
..
12/14/2006
0
HPUX.EFI
12/14/2006
644703
NBP.EFI
12/14/2006
24576
AUTO
12/14/2006
16
total space 523251712 bytes, free space 519856128
bytes
12. Restore the LVM
information to section 2 of the disk with vgcfgrestore.
Section 2 is only used for EFI partitioned disks. If this is a
non-bootable, data volume group disk, the special device file to use
would simply be /dev/dsk/c1t4d0.
#
vgcfgrestore -n vg00
/dev/rdsk/c1t4d0s2
Volume Group configuration has been restored to
/dev/rdsk/c1t4d0s2
#
pvchange -a y
/dev/dsk/c1t4d0s2
Physical volume "/dev/dsk/c1t4d0s2" has been
successfully changed.
13. Wait a couple minutes to give /dev/vg00/lvol1
a chance to sync. (reimage the mirror), and vgdisplay now shows that
volume as "available/syncd" while the rest are still
"available/stale" until they have been sync'd. You must wait
until all logical volumes are sync'd before attempting to reboot to
test the mirror boot disk.
#
vgdisplay -v vg00
--- Volume groups ---
VG Name
/dev/vg00
VG Write
Access
read/write
VG
Status
available
Max
LV
255
Cur
LV
8
Open
LV
8
Max
PV
16
Cur
PV
2
Act
PV
2
Max PE per
PV
4238
VGDA
4
PE Size
(Mbytes)
8
Total
PE
8456
Alloc PE
3004
Free
PE
5452
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)
304
Current
LE
38
Allocated
PE
38
Used
PV
2
LV
Name
/dev/vg00/lvol2
LV
Status
available/stale
LV Size
(Mbytes)
4096
Current
LE
512
Allocated
PE
512
Used
PV
2
LV
Name
/dev/vg00/lvol3
LV
Status
available/stale
LV Size
(Mbytes)
560
Current
LE
70
Allocated
PE
70
Used
PV
2
LV
Name
/dev/vg00/lvol4
LV
Status
available/stale
LV Size
(Mbytes)
200
Current
LE
25
Allocated
PE
25
Used
PV
2
LV
Name
/dev/vg00/lvol5
LV
Status
available/stale
LV Size
(Mbytes)
24
Current
LE
3
Allocated
PE
3
Used
PV
2
LV
Name
/dev/vg00/lvol6
LV
Status
available/stale
LV Size
(Mbytes)
6568
Current LE
821
Allocated
PE
821
Used
PV
2
LV
Name
/dev/vg00/lvol7
LV
Status
available/stale
LV Size
(Mbytes)
6584
Current
LE
823
Allocated
PE
823
Used
PV
2
LV
Name
/dev/vg00/lvol8
LV
Status
available/stale
LV Size
(Mbytes)
5696
Current
LE
712
Allocated
PE
712
Used
PV
2
--- Physical volumes ---
PV
Name
/dev/dsk/c1t7d0s2
PV Status
available
Total
PE
4228
Free
PE
1224
Autoswitch
On
PV
Name
/dev/dsk/c1t4d0s2
PV
Status
available
Total
PE
4228
Free
PE
1224
Autoswitch
On
14. Note: Only necessary for vg00. Rewrite
the boot information to the EFI Boot Menu so the system will be able
to boot from the new path.
# setboot
Primary bootpath : 0/4/1/0.0.0.7.0
HA Alternate bootpath : <none>
Alternate bootpath : <none>
Autoboot is ON (enabled)
# setboot -h 0/4/1/0.0.0.4.0
# setboot
Primary bootpath : 0/4/1/0.0.0.7.0
HA Alternate bootpath : 0/4/1/0.0.0.4.0
Alternate bootpath : 0/0/2/0
Autoboot is ON (enabled)
15. Note: Only necessary for vg00. After
all mirrored volumes are sync'd, reboot from the new disk to make
sure everything works. Interrupt the auto boot process and
select the Alternate path from the EFI Boot Menu.
#
cd /
#
shutdown -r 0
SHUTDOWN PROGRAM
12/14/06 16:48:59 EST
Broadcast Message from LOGIN (console) Thu Dec 14
16:48:59...
SYSTEM BEING BROUGHT DOWN NOW ! ! !
.
.
.
Loading.: HP-UX HA Alternate Boot:
0/4/1/0.0.0.4.0
Starting: HP-UX HA Alternate Boot:
0/4/1/0.0.0.4.0
(C) Copyright 1999-2006 Hewlett-Packard
Development Company, L.P.
All rights reserved
HP-UX Boot Loader for IPF -- Revision
2.028
Press Any Key to interrupt Autoboot
\EFI\HPUX\AUTO ==> boot vmunix -lq
Seconds left till autoboot -
0
16. Note: Only necessary for vg00. The boot
device is listed in /var/adm/syslog/syslog.log, so confirm that the
system was booted from the new path.
#
grep "Boot device"
/var/adm/syslog/syslog.log
Dec 14 16:53:40 hprx6600 vmunix: Boot device's
HP-UX HW path is: 0/4/1/0.0.0.4.0
#
sasmgr get_info -D /dev/sasd0 -q
raid
Thu Dec 14 16:56:20 2006
---------- PHYSICAL DRIVES ----------
LUN
dsf
SAS Address
Enclosure Bay
Size(MB)
/dev/rdsk/c1t2d0
0x500000e012691cb2
1
3 70007
/dev/rdsk/c1t3d0
0x500000e0126926d2
1
4 70007
/dev/rdsk/c1t4d0
0x500000e011a8d382
1
5 34732
/dev/rdsk/c1t7d0
0x500000e01263fcc2
1
8 34732
---------- LOGICAL DRIVE 4 ----------
Raid
Level
: RAID 1
Volume sas
address
: 0x611d224fa01c82
Device Special
File
: /dev/rdsk/c1t10d0
Raid
State
: OPTIMAL
Raid Status
Flag
: ENABLED
Raid
Size
:
34000
Rebuild
Rate
: 20.00 %
Rebuild
Progress
: 100.00 %
Participating Physical Drive(s) :
SAS
Address
Enc Bay
Size(MB)
Type
State
0x500000e01268e312
1 1
70007
SECONDARY
ONLINE
0x500000e012691ee2
1 2
70007
PRIMARY
ONLINE
End of Procedure
If the server has been
rebooted for any reason, the special device file is stale and is no
longer visible with ioscan, and the sasmgr replace_tgt will not work
unless you have at least B.11.23.03.01 of the driver released
January 2007. Use swlist to check the software driver
revision, and upgrade to B.11.23.03.01 or later.
# swlist -l bundle CommonIO
# Initializing...
# Contacting target "hprx6600"...
#
# Target: hprx6600:/
#
CommonIO B.11.23.03.01 CommonIO
# swlist -l bundle SerialSCSI-00
# Initializing...
# Contacting target "hprx6600"...
#
# Target: hprx6600:/
#
SerialSCSI-00 B.11.23.03.01 PCI-X SerialSCSI
This software can be
obtained free from http://software.hp.com/.
>>HP-UX 11i
general
-
HP-UX Common Bundle
-
HP-UX Serial SCSI
Driver
Use swinstall(1M) to
install the CommonIO bundle first which does not require a
reboot. Then install the SerialSCSI-00 driver which does
require a reboot. Once this is completed the sasmgr
replace_tgt command will work, and the rest of the procedure can be
followed from step
3.
Last updated: February 5,
2007
No comments:
Post a Comment