You are here

Replace a scsi disk in solaris under veritas(vxvm)

Here is a little how to replace a disk in solaris under veritas control that Juan sent via mail, nothing new, but just in case it helps someone:

Vamos a cambiar el disco c4t4d0s2 datadg01m del dg datadg:

root@Down2earth:/>vxdisk list | grep -i datadg
c1t5d2s2 sliced datadg01 datadg2 online
c4t4d0s2 sliced datadg01 datadg online <--este
c4t5d0s2 sliced datadg02 datadg online
c4t6d0s2 sliced datadg03 datadg online

Lanzamos el vxdiskadm y selecionamos la opcion 4

#vxdiskadm
Volume Manager Support Operations
Menu: VolumeManager/Disk

1 Add or initialize one or more disks
2 Encapsulate one or more disks
3 Remove a disk
4 Remove a disk for replacement
5 Replace a failed or removed disk
6 Mirror volumes on a disk
7 Move volumes from a disk
8 Enable access to (import) a disk group
9 Remove access to (deport) a disk group
10 Enable (online) a disk device
11 Disable (offline) a disk device
12 Mark a disk as a spare for a disk group
13 Turn off the spare flag on a disk
list List disk information

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

Select an operation to perform:

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.

Listamos los discos:

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

Disk group: rootdg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

dm disk02 c0t2d0s2 sliced 3590 17678493 -
dm disk03 c0t3d0s2 sliced 3590 17678493 -

Disk group: datadg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

dm datadg01 c4t4d0s2 sliced 2888 71124291 -
dm datadg02 c4t5d0s2 sliced 2888 71124291 -
dm datadg03 c4t6d0s2 sliced 2888 71124291 -

Disk group: datadg2

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

dm datadg01 c1t5d2s2 sliced 4095 70578176 -

Tenemos 2 discos que se llaman igual pero en distintos DGs por eso tenemos que especificar el nuestro

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

There is a disk named datadg01 in each of the following disk groups:
datadg datadg2

Enter the disk group to use [group,q,?] (default: datadg) datadg

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

volraid

No data on these volumes will be lost.

The following volumes will be disabled as a result of this
operation:

testvol

These volumes will require restoration from backup.

Are you sure you want do do this? [y,n,q,?] (default: n) y

The requested operation is to remove disk datadg01 from disk group
datadg. 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 datadg01 completed successfully.

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

Comprobamos que el disco esta en el estado removed:

root@Down2earth:/>vxdisk list | grep remove
- - datadg01 datadg removed was:c4t4d0s2
root@Down2earth:/>

Ahora ya podemos reemplazar fisicamente el disco(cfgadm/luxadm), en este caso son discos scsi usamos cfgadm:

Use cfgadm to remove disk

cfgadm -al (buscamos nuestros disco c4t4d0)
cfgadm -c unconfigure c2::dsk/c4t4d0

Phisically replace the defective disk

Use cfgadm to insert disk

cfgadm -c configure c2::dsk/c4t4d0
cfgadm -al (comprobar que el disco esta ok)

Check new disks

echo | format | grep c4t4d0
6. c4t4d0

Rescanemos los discos, para que los detecte veritas:

vxdctl enable

Ya podemos reemplazarlo en veritas usando vxdiskadm y selecionamos la opcion 5:

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

Disk group: datadg

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

dm datadg01 - - - - REMOVED

Disk group: datadg2

DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE

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

There is a disk named datadg01 in each of the following disk groups:
datadg datadg2

Enter the disk group to use [group,q,?] (default: datadg) datadg

The following devices are available as replacements:

c4t4d0s2

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

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

Please choose a device from the following list:

c4t4d0s2

Choose "none" to initialize another disk to replace datadg01.

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

The requested operation is to use the initialized device c4t4d0s2
to replace the removed or failed disk datadg01 in disk group datadg.

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

Replacement of disk datadg01 in group datadg with disk device
c4t4d0s2 completed successfully.

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

Comprobamos que el disco esta online:

root@Down2earth:/>vxdisk list | grep datadg
c1t5d2s2 sliced datadg01 datadg2 online
c4t4d0s2 sliced datadg01 datadg online
c4t5d0s2 sliced datadg02 datadg online
c4t6d0s2 sliced datadg03 datadg online

Comprobamos que el raid/mirror esta sincronizando o ha termiando ok , como en este caso:

root@Down2earth:/>vxprint -g datadg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg datadg datadg - - - - - -

dm datadg01 c4t4d0s2 - 71124291 - - - -
dm datadg02 c4t5d0s2 - 71124291 - - - -
dm datadg03 c4t6d0s2 - 71124291 - - - -

v testvol fsgen DISABLED 2097152 - ACTIVE - -
pl testvol-01 testvol DISABLED 2097414 - RECOVER - -
sd datadg01-01 testvol-01 ENABLED 2097414 0 - - -

v volraid raid5 ENABLED 4194304 - ACTIVE - -
pl volraid-01 volraid ENABLED 4194816 - ACTIVE - -
sd datadg02-01 volraid-01 ENABLED 2097414 0 - - -
sd datadg03-01 volraid-01 ENABLED 2097414 0 - - -
sd datadg01-02 volraid-01 ENABLED 2097414 0 - - -

El volumen testvol al no tener mirror se tendra que recrear y restaurar sus datos.

Unix Systems: 

Comments

Here the procedure for replacing a scsi disk in solaris under veritas is explained in simple steps! The procedure won't be that much complex as many thinks! After reading this, i am sure you can finish the above task within five minutes without any professional assistance
windows 7 problems

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.
Error | HP-UX Tips & Tricks Site

Error

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /homepages/37/d228974590/htdocs/includes/common.inc:2567) in drupal_send_headers() (line 1207 of /homepages/37/d228974590/htdocs/includes/bootstrap.inc).
  • PDOException: SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT command denied to user 'dbo229817041'@'217.160.155.192' for table 'watchdog': INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => cron [:db_insert_placeholder_2] => Attempting to re-run cron while it is already running. [:db_insert_placeholder_3] => a:0:{} [:db_insert_placeholder_4] => 4 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://hpuxtips.es/?q=comment/1849 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 54.90.207.75 [:db_insert_placeholder_9] => 1513505058 ) in dblog_watchdog() (line 157 of /homepages/37/d228974590/htdocs/modules/dblog/dblog.module).
The website encountered an unexpected error. Please try again later.