Disk group recovery is fairly easy if only a vxdg destroy was done. Here is the procedure to recover the disk group:
1. Run the following command to obtain the disk group ID (aka, dgid):
# vxdisk -s list | egrep "^Disk:|^dgname:|^dgid:|^$"
which will display along the following format, e.g.
Disk: c0t0d0s2
dgname: rootdg
dgid: 953917906.1025.t1.veritas.com
Disk: c0t1d0s2
dgname:
dgid: 951844539.1173.t1.veritas.com
Disk: c0t2d0s2
dgname:
dgid: 951844539.1173.t1.veritas.com
Disk: c1t0d0s2
dgname: newdg
dgid: 839974052.565623.t2.veritas.com
Disk: c1t1d2s2
dgname: foodg
dgid: 941150448.1192.t2.veritas.com
Disk: c1t2d1s2
Disk: c1t2d2s2
dgname: newdg
dgid: 839974052.565623.t2.veritas.com
Disk: c1t3d2s2
dgname: newdg
dgid: 839974052.565623.t2.veritas.com
Disk: c1t5d2s2
dgname:
dgid:
From above, locate the records which have the dgid field defined, i.e. not empty, but the dgname field empty. In the above example, this corresponds to the records of c0t1d0 and c0t2d0, which has a dgid of "951844539.1173.t1.veritas.com".
2. Recover the disk group via the disk group ID, i.e. dgid:
# vxdg import
In this example:
# vxdg import 951844539.1173.t1.veritas.com