- Heraus Konfigurieren von Defekte Disk rootmirror
# vxdiskadm -v
Select an operation to perform: 4
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 [<disk>,list,q,?] list
Disk group: rootdg
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
dm rootdisk c0t0d0s2 sliced 2888 71127179 -
dm rootmirror - - - - NODEVICE
Disk group: dri_infdg01
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
dm c2t7d0s2 c2t7d0s2 sliced 4455 35358848 -
dm c3t7d0s2 c3t7d0s2 sliced 4455 35358848 -
dm inf_disk01 c2t10d0s2 sliced 4455 35358848 -
dm inf_disk02 c2t16d0s2 sliced 4455 35358848 -
dm inf_disk03 c2t19d0s2 sliced 4455 35358848 -
dm inf_disk04 c2t22d0s2 sliced 4455 35358848 -
dm inf_disk05 c2t26d0s2 sliced 4455 35358848 -
dm inf_disk06 c3t22d0s2 sliced 4455 35358848 -
dm inf_mirr01 c3t10d0s2 sliced 4455 35358848 -
dm inf_mirr02 c3t16d0s2 sliced 4455 35358848 -
dm inf_mirr03 c3t19d0s2 sliced 4455 35358848 -
dm inf_mirr04 c3t24d0s2 sliced 4455 35358848 -
dm inf_mirr05 c3t26d0s2 sliced 4455 35358848 -
Enter disk name [<disk>,list,q,?] rootmirror
The following volumes will lose mirrors as a result of this
operation:
rootvol swapvol
No data on these volumes will be lost.
The requested operation is to remove disk rootmirror 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
! vxdg -g rootdg -k rmdisk rootmirror
Removal of disk rootmirror completed successfully.
Remove another disk? [y,n,q,?] (default: n) n
Select an operation to perform: q
----- Change corrupt Disk ------
- Neuen Disk in Veritas Volume Manager einbinden.
# vxdiskadm
Select an operation to perform: 5
! /usr/lib/vxvm/voladm.d/bin/disk.repl -v
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 [<disk>,list,q,?] list
Disk group: rootdg
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
dm rootmirror - - - - REMOVED
Disk group: dri_infdg01
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
Select a removed or failed disk [<disk>,list,q,?] rootmirror
Select disk device to initialize [<address>,list,q,?] list
DEVICE DISK GROUP STATUS
c0t0d0 rootdisk rootdg online
c0t1d0 - - error
c2t0d0 - - online
c2t3d0 - - online
c2t5d0 - - online
c2t7d0 c2t7d0s2 dri_infdg01 online
c2t10d0 inf_disk01 dri_infdg01 online
c2t16d0 inf_disk02 dri_infdg01 online
c2t19d0 inf_disk03 dri_infdg01 online
c2t22d0 inf_disk04 dri_infdg01 online
c2t24d0 - - online
c2t26d0 inf_disk05 dri_infdg01 online
c3t0d0 - - online
c3t5d0 - - online
c3t7d0 c3t7d0s2 dri_infdg01 online
c3t10d0 inf_mirr01 dri_infdg01 online
c3t16d0 inf_mirr02 dri_infdg01 online
c3t19d0 inf_mirr03 dri_infdg01 online
c3t22d0 inf_disk06 dri_infdg01 online
c3t24d0 inf_mirr04 dri_infdg01 online
c3t26d0 inf_mirr05 dri_infdg01 online
Select disk device to initialize [<address>,list,q,?] c0t1d0
! vxdisk online c0t1d0s2
The following disk device has a valid VTOC, but does not appear to have
been initialized for the Volume Manager. If there is data on the disk
that should NOT be destroyed you should encapsulate the existing disk
partitions as volumes instead of adding the disk as a new disk.
Output format: [Device_Name]
c0t1d0
Encapsulate this device? [y,n,q,?] (default: y) n
c0t1d0
Instead of encapsulating, initialize? [y,n,q,?] (default: n) y
The requested operation is to initialize disk device c0t1d0 and
to then use that device to replace the removed or failed disk
rootmirror in disk group rootdg.
Continue with operation? [y,n,q,?] (default: y) y
! vxdisksetup -if c0t1d0 old_layout
Use fastresync for plex synchronization? [y,n,q,?] (default: n) n
! vxdisksetup -if c0t1d0 old_layout
! vxdg -g rootdg -k adddisk rootmirror=c0t1d0s2
! vxbootsetup -v rootmirror
! vxmksdpart -f -v -g rootdg rootmirror-01 0 0x2 0x200
! vxpartadd /dev/rdsk/c0t1d0s2 0 0x2 0x200 2889 50153040
! /usr/sbin/installboot /usr/platform/SUNW,Ultra-4/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
! vxeeprom devalias vx-rootmirror /dev/dsk/c0t1d0s0
! vxmksdpart -f -v -g rootdg rootmirror-02 1 0x3 0x201
! vxpartadd /dev/rdsk/c0t1d0s2 1 0x3 0x201 50155929 20971251
! vxrecover -sb -g rootdg rootmirror
Replacement of disk rootmirror in group rootdg with disk device
c0t1d0 completed successfully.
Replace another disk? [y,n,q,?] (default: n) n
Select an operation to perform: q
- Monitoring auf Command Line
root@ffzj0xfd:~# vxtask list
TASKID PTID TYPE/STATE PCT PROGRESS
166 PARENT/R 0.00% 2/0(1) VXRECOVER rootmirror
167 167 ATCOPY/R 29.71% 0/50153040/14899200 PLXATT rootvol rootvol-02