Tuesday, September 1, 2009

root disk or root mirror disk with Veritas Volume Manager (tm) 3.5 and above on HP-UX 11i

1. Remove the disk with option 3 of vxdiskadm

Volume Manager Support Operations
Menu: VolumeManager/Disk

1 Add or initialize one or more disks
2 Remove a disk
3 Remove a disk for replacement
4 Replace a failed or removed disk
5 Mirror volumes on a disk
6 Move volumes from a disk
7 Enable access to (import) a disk group
8 Remove access to (deport) a disk group
9 Enable (online) a disk device
10 Disable (offline) a disk device
11 Mark a disk as a spare for a disk group
12 Turn off the spare flag on a disk
13 Remove (deport) and destroy a disk group
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
list List disk information

? Display help about menu
?? Display help about the menuing system
q Exit from menus

Select an operation to perform:
3

Remove a disk for replacement
Menu: VolumeManager/Disk/RemoveForReplace

Use this menu operation to remove a physical disk from a disk
group, while retaining the disk name. This changes the state
for the disk name to a "removed" disk. If there are any
initialized disks that are not part of a disk group, you will be
given the option of using one of these disks as a replacement.

Enter disk name [,list,q,?] list

Disk group: rootdg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

dm rootdisk01 c0t1d0 simple 1024 4188096 -
dm rootdisk02 c0t2d0 simple 1024 4188096 -

Enter disk name [,list,q,?]
rootdisk01

The following volumes will lose mirrors as a result of this
operation:

rootvol standvol swapvol

No data on these volumes will be lost.

The following devices are available as replacements:

c0t3d0

You can choose one of these disks now, to replace rootdisk01.
Select "none" if you do not wish to select a replacement disk.

Choose a device, or select "none"
[,none,q,?] (default: c0t3d0)
none


The requested operation is to remove disk rootdisk01 from disk group
rootdg. The disk name will be kept, along with any volumes using
the disk, allowing replacement of the disk.

Select "Replace a failed or removed disk" from the main menu
when you wish to replace the disk.

Continue with operation? [y,n,q,?] (default: y) y

Removal of disk rootdisk01 completed successfully.

Remove another disk? [y,n,q,?] (default: n) n


2. Rescan the devices and initialize the replaced disk:

# vxdctl enable
# /etc/vx/bin/vxdiskunsetup -C

For VxVM 3.5 on HP-UX 11iv1:

# /etc/vx/bin/vxdisksetup -iB

For VxVM 4.1/5.0 on HP-UX 11iv2 and 11iv3:

# /etc/vx/bin/vxdisksetup -iB format=hpdisk


Note: The -B option is necessary to initialize the bootable Veritas Volume Manager (VxVM) disk. Refer to the
vxdisksetup man page for details


3. Replace the failed disk with option 4
of vxdiskadm

Menu: VolumeManager/Disk

1 Add or initialize one or more disks
2 Remove a disk
3 Remove a disk for replacement
4 Replace a failed or removed disk
5 Mirror volumes on a disk
6 Move volumes from a disk
7 Enable access to (import) a disk group
8 Remove access to (deport) a disk group
9 Enable (online) a disk device
10 Disable (offline) a disk device
11 Mark a disk as a spare for a disk group
12 Turn off the spare flag on a disk
13 Remove (deport) and destroy a disk group
14 Unrelocate subdisks back to a disk
15 Exclude a disk from hot-relocation use
16 Make a disk available for hot-relocation use
17 Prevent multipathing/Suppress devices from VxVM's view
18 Allow multipathing/Unsuppress devices from VxVM's view
19 List currently suppressed/non-multipathed devices
20 Change the disk naming scheme
list List disk information

? Display help about menu
?? Display help about the menuing system
q Exit from menus

Select an operation to perform:
4

Replace a failed or removed disk
Menu: VolumeManager/Disk/ReplaceDisk

Use this menu operation to specify a replacement disk for a disk
that you removed with the "Remove a disk for replacement" menu
operation, or that failed during use. You will be prompted for
a disk name to replace and a disk device to use as a replacement.
You can choose an uninitialized disk, in which case the disk will
be initialized, or you can choose a disk that you have already
initialized using the Add or initialize a disk menu operation.

Select a removed or failed disk [,list,q,?] list

Disk group: rootdg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

dm rootdisk01 - - - - REMOVED

Select a removed or failed disk [,list,q,?]
rootdisk01

The following devices are available as replacements:

c0t1d0 c0t3d0

You can choose one of these disks to replace rootdisk01.
Choose "none" to initialize another disk to replace rootdisk01.

Choose a device, or select "none"
[,none,q,?] (default: c0t1d0)
c0t1d0

The requested operation is to use the initialized device c0t1d0
to replace the removed or failed disk rootdisk01 in disk group rootdg.

Continue with operation? [y,n,q,?] (default: y) y

Use a default private region length for the disk?
[y,n,q,?] (default: y) y

Replacement of disk rootdisk01 in group rootdg with disk device
c0t1d0 completed successfully.

Replace another disk? [y,n,q,?] (default: n) n


Now
vxrecover is in process ...

You can find out the remaining
vxrecover run time with the follow command:

# vxtask -l list

Task: 164 RUNNING
Type: PARENT
Operation: VXRECOVER DM rootdisk01
Started: Mon Sep 2 12:59:24 2002
Progress: 0.00% (1 job active)

Task: 165 RUNNING (Parent: 164)
Type: ATCOPY
Operation: PLXATT Vol rootvol Plex rootvol-01
Started: Mon Sep 2 12:59:24 2002
Throttle: 0
Progress: 63.52% 2182784 of 3436544 Blocks
Work time: 20 minutes, 50 seconds (11:57 remaining)


4. Verify the status of all volumes:

# vxprint -g rootdg -ht

dm rootdisk01 c0t1d0 simple 1024 4188096 -
dm rootdisk02 c0t2d0 simple 1024 4188096 -

v rootvol - ENABLED ACTIVE 3436544 SELECT - root
pl rootvol-01 rootvol ENABLED ACTIVE 3436544 CONCAT - RW
sd rootdisk01-03 rootvol-01 rootdisk01 729088 3436544 0 c0t1d0 ENA
pl rootvol-02 rootvol ENABLED ACTIVE 3436544 CONCAT - RW
sd rootdisk02-03 rootvol-02 rootdisk02 729088 3436544 0 c0t2d0 ENA

v standvol - ENABLED ACTIVE 204800 SELECT - fsgen
pl standvol-01 standvol ENABLED ACTIVE 204800 CONCAT - RW
sd rootdisk01-01 standvol-01 rootdisk01 0 204800 0 c0t1d0 ENA
pl standvol-02 standvol ENABLED ACTIVE 204800 CONCAT - RW
sd rootdisk02-01 standvol-02 rootdisk02 0 204800 0 c0t2d0 ENA

v swapvol - ENABLED ACTIVE 524288 SELECT - swap
pl swapvol-01 swapvol ENABLED ACTIVE 524288 CONCAT - RW
sd rootdisk01-02 swapvol-01 rootdisk01 204800 524288 0 c0t1d0 ENA
pl swapvol-02 swapvol ENABLED ACTIVE 524288 CONCAT - RW
sd rootdisk02-02 swapvol-02 rootdisk02 204800 524288 0 c0t2d0 ENA


5. Verify the Logical Interchange Format (LIF) and Volume Manager label information on the replaced disk:

# lifls -l /dev/rdsk/c0t1d0
lifls: Can't list /dev/rdsk/c0t1d0; not a LIF volume

# vxvmboot -v /dev/rdsk/c0t1d0
vxvmboot: Disk /dev/rdsk/c0t1d0 does not contain a valid LIF volume.


6. Write Volume Manager volume information to the
LABEL file:

# /opt/VRTS/bin/vxbootsetup rootdisk01


7. Display the LIF and Volume Manager label information:

# vxvmboot -v /dev/rdsk/c0t1d0

LIF Label File @ (1k) block # 1178 on VxVM Disk /dev/rdsk/c0t1d0:
Label Entry: 0, Boot Volume start: 3168; length: 200 MB
Label Entry: 1, Root Volume start: 732256; length: 3356 MB
Label Entry: 2, Swap Volume start: 207968; length: 512 MB
Label Entry: 3, Dump Volume start: 207968; length: 512 MB

# lifls -l /dev/rdsk/c0t1d0
volume ISL10 data size 7984 directory size 8 02/05/10 16:25:44
filename type start size implement created
===============================================================
ODE -12960 584 848 0 02/07/08 12:33:46
MAPFILE -12277 1432 128 0 02/07/08 12:33:46
SYSLIB -12280 1560 353 0 02/07/08 12:33:46
CONFIGDATA -12278 1920 235 0 02/07/08 12:33:46
SLMOD2 -12276 2160 141 0 02/07/08 12:33:46
SLDEV2 -12276 2304 135 0 02/07/08 12:33:46
SLDRV2 -12276 2440 205 0 02/07/08 12:33:46
SLSCSI2 -12276 2648 131 0 02/07/08 12:33:46
MAPPER2 -12279 2784 142 0 02/07/08 12:33:46
IOTEST2 -12279 2928 411 0 02/07/08 12:33:46
PERFVER2 -12279 3344 124 0 02/07/08 12:33:46
PVCU -12801 3472 64 0 02/07/08 12:33:46
SSINFO -12286 3536 2 0 02/07/08 12:33:46
ISL -12800 3544 306 0 02/05/10 16:25:44
HPUX -12928 3856 848 0 02/05/10 16:25:44
AUTO -12289 4704 1 0 02/05/10 16:25:44
LABEL BIN 4712 8 0 02/09/02 10:38:27


8. Boot the machine off the replaced disk

No comments:

Post a Comment