cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a dg with 10 disks named like dg_00 to dg_09?

stefanhanse
Level 3

I need to create a veritas dg under solaris called dg_vx1 with 10 equal disk named dg_vx1_00 to dg_vx1_09.
At the moment the status of the disks are unlabeled. How could I setup this configuration with the vx commands?


 

1 ACCEPTED SOLUTION

Accepted Solutions

Gaurav_S
Moderator
Moderator
   VIP    Certified

good that issue is solved.... just FYI "vxdctl enable" internally calls for "vxdisk scandisk" only...

Gaurav

View solution in original post

21 REPLIES 21

stefanhanse
Level 3
What setup-steps have to be done to go from unconfigured 10 disks to

c3t500601643CE00BB6d186s2 auto            -            -            nolabel
c3t500601643CE00BB6d187s2 auto            -            -            nolabel
c3t500601643CE00BB6d188s2 auto            -            -            nolabel
c3t500601643CE00BB6d189s2 auto            -            -            nolabel
c3t500601643CE00BB6d190s2 auto            -            -            nolabel
c3t500601643CE00BB6d191s2 auto            -            -            nolabel
c3t500601643CE00BB6d192s2 auto            -            -            nolabel
c3t500601643CE00BB6d193s2 auto            -            -            nolabel
c3t500601643CE00BB6d194s2 auto            -            -            nolabel
c3t500601643CE00BB6d195s2 auto            -            -            nolabel

 
to this well configured diskgroups!
 
c3t500601643CE00BB6d186s2 auto:sliced     sam_cx4_kvs19_00  sam_cx4_kvs19 online
c3t500601643CE00BB6d187s2 auto:sliced     sam_cx4_kvs19_01  sam_cx4_kvs19 online
c3t500601643CE00BB6d188s2 auto:sliced     sam_cx4_kvs19_02  sam_cx4_kvs19 online
c3t500601643CE00BB6d189s2 auto:sliced     sam_cx4_kvs19_03  sam_cx4_kvs19 online
c3t500601643CE00BB6d190s2 auto:sliced     sam_cx4_kvs19_04  sam_cx4_kvs19 online
c3t500601643CE00BB6d191s2 auto:sliced     sam_cx4_kvs19_05  sam_cx4_kvs19 online
c3t500601643CE00BB6d192s2 auto:sliced     sam_cx4_kvs19_06  sam_cx4_kvs19 online
c3t500601643CE00BB6d193s2 auto:sliced     sam_cx4_kvs19_07  sam_cx4_kvs19 online
c3t500601643CE00BB6d194s2 auto:sliced     sam_cx4_kvs19_08  sam_cx4_kvs19 online
c3t500601643CE00BB6d195s2 auto:sliced     sam_cx4_kvs19_09  sam_cx4_kvs19 online



Gaurav_S
Moderator
Moderator
   VIP    Certified
Firstly you will need to label those disks using "format" utility of solaris...

# format
<select disk>
disk> label

command to initialize disk in veritas would be

# vxdisksetup -i c3t500601643CE00BB6d186  format=sliced

repeat the same step for lun 186 to 195 ....

To add them into a diskgroup (please note, below mentioned is a single command, copy paste in a notepad first & then run on server)

# vxdg init dg_vx1 dg_vx1_00=c3t500601643CE00BB6d186s2 dg_vx1_01=c3t500601643CE00BB6d187  dg_vx1_02=c3t500601643CE00BB6d188  dg_vx1_03=c3t500601643CE00BB6d189  dg_vx1_04=c3t500601643CE00BB6d190  dg_vx1_05=c3t500601643CE00BB6d191  dg_vx1_06=c3t500601643CE00BB6d192  dg_vx1_07=c3t500601643CE00BB6d193  dg_vx1_08=c3t500601643CE00BB6d194 dg_vx1_09=c3t500601643CE00BB6d195

you can check your vxdisk list now... it should show same output...

Gaurav

Anoop_Kumar1
Level 5

You can use vxdiskadm ( option 1 ) to initialize multiple disks and add them in diskgroup.

Please check below example of adding 4 new disks.


# 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
 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
 21     Get the newly connected/zoned disks in VxVM view
 22     Change/Display the default disk layouts
 23     Mark a disk as allocator-reserved for a disk group
 24     Turn off the allocator-reserved 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: 1

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. Or they may be added as
  nohotuses to be excluded from hot-relocation use. 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 (in the c#t#d# naming scheme)
  xyz_0 :       a single disk (in the enclosure based naming scheme)
  xyz_ :        all disks on the enclosure whose name is xyz

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

DEVICE       DISK         GROUP        STATUS
AMS_WMS0_0   -            -            online invalid
AMS_WMS0_2   -            -            online invalid
AMS_WMS0_3   -            -            online invalid
AMS_WMS0_9   -            -            online invalid
Disk_0       -            -            online invalid
Disk_1       -            -            online invalid


Select disk devices to add: [<pattern-list>,all,list,q,?] AMS_WMS0_0 AMS_WMS0_2 AMS_WMS0_3 AMS_WMS0_9
  Here are the disks selected.  Output format: [Device_Name]

  AMS_WMS0_0 AMS_WMS0_2 AMS_WMS0_3 AMS_WMS0_9

Continue operation? [y,n,q,?] (default: y) 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: none) testdg

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

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

Exclude disks from hot-relocation use? [y,n,q,?] (default: n)

Add site tag to disks? [y,n,q,?] (default: n)
  The selected disks will be added to the disk group testdg with
  default disk names.

  AMS_WMS0_0 AMS_WMS0_2 AMS_WMS0_3 AMS_WMS0_9

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

Do you want to use the default layout for all disks being initialized?
[y,n,q,?] (default: y)
  Initializing device AMS_WMS0_0.
  Initializing device AMS_WMS0_2.
  Initializing device AMS_WMS0_3.
  Initializing device AMS_WMS0_9.
  VxVM  NOTICE V-5-2-88
Adding disk device AMS_WMS0_0 to disk group testdg with disk
  name testdg01.
  VxVM  NOTICE V-5-2-88
Adding disk device AMS_WMS0_2 to disk group testdg with disk
  name testdg02.
  VxVM  NOTICE V-5-2-88
Adding disk device AMS_WMS0_3 to disk group testdg with disk
  name testdg03.
  VxVM  NOTICE V-5-2-88
Adding disk device AMS_WMS0_9 to disk group testdg with disk
  name testdg04.

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




 # vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
AMS_WMS0_0   auto:cdsdisk    testdg01     testdg       online
AMS_WMS0_2   auto:cdsdisk    testdg02     testdg       online
AMS_WMS0_3   auto:cdsdisk    testdg03     testdg       online
AMS_WMS0_9   auto:cdsdisk    testdg04     testdg       online



# vxprint -g testdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg testdg       testdg       -        -        -        -        -       -

dm testdg01     AMS_WMS0_0   -        8306432  -        -        -       -
dm testdg02     AMS_WMS0_2   -        8306432  -        -        -       -
dm testdg03     AMS_WMS0_3   -        8306432  -        -        -       -
dm testdg04     AMS_WMS0_9   -        10403584 -        -        -       -

Anoop_Kumar1
Level 5

Sorry Stefan. Forgot to mention in last post that you have to label disks using format utility and rescan the the disks in vxvm using "vxdctl enable"

Regards,

stefanhanse
Level 3

Many thanks to all.  At the moment I have a problem to label the disks itself, maybe the LUNS sharing needs some improvements.

If I try to initialise the first disk I got the following error /etc/vx/bin/vxdisksetup -i c3t500601643CE00BB6d196 format=sliced
prtvtoc: /dev/vx/rdmp/c3t500601643CE00BB6d196s2: Unable to read Disk geometry errno = 0x6

Kind regards  Stefan

g_lee
Level 6
As Gaurav and Anoop both stated above, you need to label the disks with format before running vxdisksetup - if they do not have a label, VxVM will not be able to set them up.

eg:
# format c3t500601643CE00BB6d196
> label
Ready to label (y/n): y
> quit

# prtvtoc /dev/rdsk/c3t500601643CE00BB6d196s2
^^^^^ this command should show a partition table. If it does, then proceed with vxdisksetup. If it doesn't, you need to rerun the label in format / investigate why format hasn't labelled the disk

Gaurav_S
Moderator
Moderator
   VIP    Certified

Are you facing any error while labeling the disk using format utility? If yes, can u paste the error ?

Gaurav

stefanhanse
Level 3

The problem is that I have 10 LUNs mulipathing over 4 HBA an I have a problem to easyly found the active path that LUN that I have to configure!
Is the a way to easyly display which path is active an which is passive?

g_lee
Level 6
Stefan,

You haven't mentioned the type of array you are using, so it's hard to provide detailed instructions for how to display the active path.

Depending on the type of array you are using, you could see if vxdisk list displays the status of the paths, eg:
Multipathing information:
numpaths:   4
cXtXXXXXXXXXXXXXXXXXdXs2 state=enabled   type=secondary
cXtXXXXXXXXXXXXXXXXXdXs2 state=enabled   type=primary
cXtXXXXXXXXXXXXXXXXXdXs2 state=enabled   type=primary
cXtXXXXXXXXXXXXXXXXXdXs2 state=enabled   type=secondary

If it does display this, then pick one of the primary paths to label the disk ie: format cXtXXXXXXXXXXXXXXXXXdX
Note however that vxdisk may not display this as the disks don't have a label yet.

Unless the array trespasses when you access the passive path, then at this point it probably doesn't matter, provided you can access the disk to label it and carry on with the setup

stefanhanse
Level 3

Hello, I have found a way to display the needed informations, now I can easyly label the right LUNs,
for the next step I have to select the "correct" LUNS with the vxdisksetup command.

root@iusv095 # vxdmpadm getsubpaths ctlr=c4 |grep \(A |grep 20[0-5]
c4t5006016C3CE00BB6d200s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d200s2 EMC_CLARiiON emc_clariion1   -
c4t500601653CE00BB6d201s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d201s2 EMC_CLARiiON emc_clariion1   -
c4t5006016C3CE00BB6d202s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d202s2 EMC_CLARiiON emc_clariion1   -
c4t500601653CE00BB6d203s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d203s2 EMC_CLARiiON emc_clariion1   -
c4t500601653CE00BB6d204s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d204s2 EMC_CLARiiON emc_clariion1   -
c4t5006016C3CE00BB6d205s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d205s2 EMC_CLARiiON emc_clariion1   -
root@iusv095 # vxdmpadm getsubpaths ctlr=c4 |grep \(A |grep 19[6-9]
c4t5006016C3CE00BB6d196s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d196s2 EMC_CLARiiON emc_clariion1   -
c4t500601653CE00BB6d197s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d197s2 EMC_CLARiiON emc_clariion1   -
c4t5006016C3CE00BB6d198s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d198s2 EMC_CLARiiON emc_clariion1   -
c4t500601653CE00BB6d199s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d199s2 EMC_CLARiiON emc_clariion1   -
root@iusv095 # vxdmpadm getsubpaths ctlr=c3 |grep \(A |grep 20[0-5]
c3t5006016D3CE00BB6d200s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d200s2 EMC_CLARiiON emc_clariion1   -
c3t500601643CE00BB6d201s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d201s2 EMC_CLARiiON emc_clariion1   -
c3t5006016D3CE00BB6d202s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d202s2 EMC_CLARiiON emc_clariion1   -
c3t500601643CE00BB6d203s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d203s2 EMC_CLARiiON emc_clariion1   -
c3t500601643CE00BB6d204s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d204s2 EMC_CLARiiON emc_clariion1   -
c3t5006016D3CE00BB6d205s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d205s2 EMC_CLARiiON emc_clariion1   -
root@iusv095 # vxdmpadm getsubpaths ctlr=c3 |grep \(A |grep 19[6-9]
c3t5006016D3CE00BB6d196s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d196s2 EMC_CLARiiON emc_clariion1   -
c3t500601643CE00BB6d197s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d197s2 EMC_CLARiiON emc_clariion1   -
c3t5006016D3CE00BB6d198s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d198s2 EMC_CLARiiON emc_clariion1   -
c3t500601643CE00BB6d199s2 ENABLED(A) PRIMARY      c3t500601643CE00BB6d199s2 EMC_CLARiiON emc_clariion1   -


Gaurav_S
Moderator
Moderator
   VIP    Certified
mate,

you can't choose to use a PATH name in vxdisksetup command.... you need to choose Disk Access names to initialize the disk..... Disk Access names are displayed in first coulmn of "vxdisk list" output...

In vxdisksetup command, if you try to give a PATH name..... it won't accept it & will throw an error

if any path is active, vxdisksetup should succeed (only once labeled)

Gaurav

g_lee
Level 6
Gaurav is correct - you can't pick/specify the path to use with vxdisksetup - use the DANAME as he's instructed above (once you've labelled the disks with format, obviously)

stefanhanse
Level 3

OK next step after have had labeled all the needed LUNs I will start to initialise all the disks with "xvdisksetup -i cXtXdX format=sliced"
after that had been done vxdisk should list up also the latest initiliased 10 disks.

The last step would be "vxdg init <dg_name> <disk_name_n>=<device> plus next 9 disk_name_n+9=<device>

After this step the new dg should  be useable for the application as expected.

stefanhanse
Level 3
Hi folk,
I have detected a new problem while start to initialize the first disk, what should I do to fix this problem?

 # /etc/vx/bin/vxdisksetup -i c3t5006016D3CE00BB6d196 format=sliced
prtvtoc: /dev/vx/rdmp/c3t5006016D3CE00BB6d196s2: No such file or directory

root@iusv095 # ls -lrt /dev/vx/rdmp | tail -10
crw-------   1 root     root     311, 1786 Aug 31 11:44 c3t500601643CE00BB6d197
crw-------   1 root     root     311, 1783 Aug 31 11:44 c3t500601643CE00BB6d196s7
crw-------   1 root     root     311, 1782 Aug 31 11:44 c3t500601643CE00BB6d196s6
crw-------   1 root     root     311, 1781 Aug 31 11:44 c3t500601643CE00BB6d196s5
crw-------   1 root     root     311, 1780 Aug 31 11:44 c3t500601643CE00BB6d196s4
crw-------   1 root     root     311, 1779 Aug 31 11:44 c3t500601643CE00BB6d196s3
crw-------   1 root     root     311, 1778 Aug 31 11:44 c3t500601643CE00BB6d196s2
crw-------   1 root     root     311, 1777 Aug 31 11:44 c3t500601643CE00BB6d196s1
crw-------   1 root     root     311, 1776 Aug 31 11:44 c3t500601643CE00BB6d196s0
crw-------   1 root     root     311, 1778 Aug 31 11:44 c3t500601643CE00BB6d196



root@iusv095 # prtvtoc /dev/rdsk/c3t5006016D3CE00BB6d196s2
* /dev/rdsk/c3t5006016D3CE00BB6d196s2 partition map
*
* Dimensions:
*     512 bytes/sector
*      60 sectors/track
*     256 tracks/cylinder
*   15360 sectors/cylinder
*   61440 cylinders
*   61438 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector
*           0     15360     15359
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       2      5    01          0 943687680 943687679
       3     15    01      15360     15360     30719
       4     14    01      30720 943656960 943687679


Gaurav_S
Moderator
Moderator
   VIP    Certified

Is this a disk or a path name ? Also, put an s2 at the end...

# vxdisksetup -i c3t5006016D3CE00BB6d196s2

please paste below:

# vxdisk list  | grep c3t5006016D3CE00BB6d196


Gaurav

stefanhanse
Level 3

It is a disk and the result of vxdisk list |grep c3t5006016D3CE00BB6d196 is empty !

Gaurav_S
Moderator
Moderator
   VIP    Certified

ok, if above output is empty, that means its not a veritas disk, that might be a solaris disk name .... you need to find the corresponding veritas disk name for that..

# vxdisk -e list  | grep c3t5006016D3CE00BB6d196

In above output first coulmn will show veritas disk name & last coulmn will show OS disk name...  if you find the disk in last coulmn, use the corresponding veritas disk name from first coulmn..

Gaurav

stefanhanse
Level 3

Ok, the vxdisk -e list c3t5006016D3CE00BB6d196 is empty!

the only result with the d196 in his WWN is the following:

vxdisk -e list  | grep c3t500601643CE00BB6d196s2
c3t500601643CE00BB6d196s2 auto      -             -            error        c3t500601643CE00BB6d196s2 -

What is needed to make all the new disk visible for veritas and not only for the OS?

Gaurav_S
Moderator
Moderator
   VIP    Certified
disk is there but since its in error state thats why u r unable to initialize it...

what does prtvtoc shows ? have you labelled this disk already ?

# prtvtoc /dev/rdsk/c3t500601643CE00BB6d196s2

# prtvtoc /dev/vx/rdmp/c3t500601643CE00BB6d196s2

# vxdisk list c3t500601643CE00BB6d196s2

do a vxdctl enable & try to rerun above commands

# vxdctl enable


Gaurav