Un disk group non è altro che un contenitore dove sono presenti delle entità, nel caso concreto queste entità sono dei dischi.

All'interno del diskgroup è possibile definire dei volumi, parti del diskgroup, utilizzandoli poi per la memorizzazione dei dati.

Dapprima vanno individuati i dischi con cui creare il diskgroup.

Supponiamo di avere quindi 4 dischi da poter utilizzare.  Per verificare i dischi presenti sulla macchina possiamo utilizzare il comando "vxdisk list".

Nell'esempio seguente ho utilizzato il comando nella seguente sintassi: "vxdisk -o alldgs list", che permette di visualizzare anche i diskgroup, che in quel momento non appartengono  al server; ci troviamo in un'architettura in cluster.

c3t32d0s2    sliced    -            -            online
c3t33d0s2    sliced    -            -            online

c9t32d0s2    sliced    -            -            online
c9t33d0s2    sliced    -            -            online

Lanciamo quindi il comando vxdiskadm, si presenterà un'interfaccia testuale del genere:

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:

selezionare 1(uno) per l'inizializzazione dei dischi, tenete presente che se i disk group non è presente ne verrà creato uno nuovo con il nome specificato.

Add or initialize disks
Menu: VolumeManager/Disk/AddDisks

  Use this operation to add one or more disks to a disk group.  You can
  add the selected disks to an existing disk group or to a new disk group
  that will be created as a part of the operation. The selected disks may
  also be added to a disk group as spares. The selected disks may also
  be initialized without adding them to a disk group leaving the disks
  available for use as replacement disks.

  More than one disk or pattern may be entered at the prompt.  Here are
  some disk selection examples:

  all:          all disks
  c3 c4t2:      all disks on both controller 3 and controller 4, target 2
  c3t4d2:       a single disk

Select disk devices to add: [<pattern-list>,all,list,q,?] c3t32d0 c3t33d0 c9t32d0 c9t33d0

  Here are the disks selected.  Output format: [Device_Name]

  c3t32d0 c3t33d0 c9t32d0 c9t33d0

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

  You can choose to add these disks to an existing disk group, a
  new disk group, or you can leave these disks available for use
  by future add or replacement operations.  To create a new disk
  group, select a disk group name that does not yet exist.  To
  leave the disks available for future use, specify a disk group
  name of "none".

Which disk group [<group>,none,list,q,?] (default: rootdg) testdg

  There is no active disk group named testdg.

Create a new group named testdg? [y,n,q,?] (default: y)

Use default disk names for these disks? [y,n,q,?] (default: y)

Add disks as spare disks for testdg? [y,n,q,?] (default: n)

  A new disk group will be created named testdg and the selected disks
  will be added to the disk group with default disk names.

  c3t32d0 c3t33d0 c9t32d0 c9t33d0

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

  The following disk devices appear to have been initialized already.
  The disks are currently available as replacement disks.
  Output format: [Device_Name]

  c3t32d0 c3t33d0 c9t32d0 c9t33d0

Use these devices? [Y,N,S(elect),q,?] (default: Y)

  The following disks you selected for use appear to already have
  been initialized for the Volume Manager.  If you are certain the
  disks already have been initialized for the Volume Manager, then
  you do not need to reinitialize these disk devices.
  Output format: [Device_Name]

  c3t32d0 c3t33d0 c9t32d0 c9t33d0

Reinitialize these devices? [Y,N,S(elect),q,?] (default: Y)

  Initializing device c3t32d0.

  Initializing device c3t33d0.

  Initializing device c9t32d0.

  Initializing device c9t33d0.

  Creating a new disk group named testdg containing the disk
  device c3t32d0 with the name testdg01.

  Adding disk device c3t33d0 to disk group testdg with disk
  name testdg02.

  Adding disk device c9t32d0 to disk group testdg with disk
  name testdg03.

  Adding disk device c9t33d0 to disk group testdg with disk
  name testdg04.

Add or initialize other disks? [y,n,q,?] (default: n) 

A questo punto abbiamo creato il nostro diskgroup con il nome testdg, per visualizzare la sua struttura basta utilizzare il comando vxprint

vxprint -ht -g testdg


DG NAME         NCONFIG      NLOG     MINORS   GROUP-ID
DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE
V  NAME         USETYPE      KSTATE   STATE    LENGTH   READPOL   PREFPLEX
PL NAME         VOLUME       KSTATE   STATE    LENGTH   LAYOUT    NCOL/WID MODE
SD NAME         PLEX         DISK     DISKOFFS LENGTH   [COL/]OFF DEVICE   MODE
SV NAME         PLEX         VOLNAME  NVOLLAYR LENGTH   [COL/]OFF AM/NM    MODE

dg testdg       default      default  129000   1144421907.10833.aagg02

dm testdg01     c3t32d0s2    sliced   2888     71124291 -
dm testdg02     c3t33d0s2    sliced   2888     71124291 -
dm testdg03     c9t32d0s2    sliced   2888     71124291 -
dm testdg04     c9t33d0s2    sliced   2888     71124291 -