cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

How to map drive name from vxdisk list to actual drive name

Hi,

 

This question is for SF on Solaris, I'd like to know how to map the drive name as given by vxdisk list to the actual drive in cxtxdx format?

 

For instance, my output of vxdisk list is:

bash-3.2# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0t0d0s2     auto:ZFS        -            -            ZFS
disk_14      auto:cdsdisk    -            -            online
disk_15      auto:cdsdisk    -            -            online
disk_16      auto:cdsdisk    -            -            online
disk_17      auto:cdsdisk    -            -            online
disk_18      auto:cdsdisk    -            -            online
 

 

And my output of format is:

bash-3.2# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c0t0d0 <DEFAULT cyl 19146 alt 2 hd 16 sec 255>
          /pci@1e,600000/ide@d/dad@0,0
       1. c1t52d0 <SEAGATE-ST336605FSUN36G-0638 cyl 24620 alt 2 hd 27 sec 107>
          /pci@1f,700000/SUNW,qlc@3/fp@0,0/ssd@w21000004cf99e36a,0
       2. c1t53d0 <SEAGATE-ST39102FCSUN9.0G-0D29 cyl 4924 alt 2 hd 27 sec 133>
          /pci@1f,700000/SUNW,qlc@3/fp@0,0/ssd@w2100002037224d78,0
       3. c1t54d0 <SEAGATE-ST39102FCSUN9.0G-1129 cyl 4924 alt 2 hd 27 sec 133>
          /pci@1f,700000/SUNW,qlc@3/fp@0,0/ssd@w21000020371b9af1,0
       4. c1t55d0 <SEAGATE-ST39102FCSUN9.0G-0D29 cyl 4924 alt 2 hd 27 sec 133>
          /pci@1f,700000/SUNW,qlc@3/fp@0,0/ssd@w21000020372251db,0
       5. c1t57d0 <SEAGATE-ST336605FSUN36G-0538 cyl 24620 alt 2 hd 27 sec 107>
          /pci@1f,700000/SUNW,qlc@3/fp@0,0/ssd@w21000004cf62cb72,0

 

How do I establish a mapping between drive names?

 

Also, what exactly does the command "vxdctl enable" do?

 

Thanks in advance.

 

1 Solution

Accepted Solutions
Highlighted
Accepted Solution!

vxdisk -e list

vxdisk -e list

About "vxdctl enable" - do you feel that the description in man pages is not descriptive enough?

from man pages (my bold):

Requests that vxconfigd enter enabled mode, import all disk groups, and rebuild the volume device node directories. This operation can be used even if vxconfigd is already in enabled mode. The primary purpose for using this operation when in enabled mode is to rebuild the volume device nodes. This operation causes vxconfigd to scan for any disks that were newly added since vxconfigd was last started. In this manner, disks can be dynamically configured to the system and then recognized by VxVM. If the multipathing support is available, this option also causes vxconfigd to rebuild the DMP internal database to reflect the new state of the system after addition of the disk devices. The new disk devices detected by vxconfigd are added in the DMP database with their associated subpaths and parent DMP device.  
 By default, VxVM performs a full scan of the device tree when performing device discovery. To discover only newly added disks that are not already known to VxVM, specify the -f option.  
 

 

View solution in original post

4 Replies
Highlighted
Accepted Solution!

vxdisk -e list

vxdisk -e list

About "vxdctl enable" - do you feel that the description in man pages is not descriptive enough?

from man pages (my bold):

Requests that vxconfigd enter enabled mode, import all disk groups, and rebuild the volume device node directories. This operation can be used even if vxconfigd is already in enabled mode. The primary purpose for using this operation when in enabled mode is to rebuild the volume device nodes. This operation causes vxconfigd to scan for any disks that were newly added since vxconfigd was last started. In this manner, disks can be dynamically configured to the system and then recognized by VxVM. If the multipathing support is available, this option also causes vxconfigd to rebuild the DMP internal database to reflect the new state of the system after addition of the disk devices. The new disk devices detected by vxconfigd are added in the DMP database with their associated subpaths and parent DMP device.  
 By default, VxVM performs a full scan of the device tree when performing device discovery. To discover only newly added disks that are not already known to VxVM, specify the -f option.  
 

 

View solution in original post

Highlighted

Maybe you need is to change the naming scheme

Good morning,

Maybe you need is to change the naming scheme.

Surely you have Enclosure Based scheme and need the OS Native scheme.

Here I leave you the way to change the schema:


# vxddladm set namingscheme=ebn

# vxddladm get namingscheme

NAMING_SCHEME       PERSISTENCE    LOWERCASE      USE_AVID
============================================================
Enclosure Based     Yes            Yes            Yes

#
#
# vxddladm set namingscheme=osn

# vxddladm get namingscheme

NAMING_SCHEME       PERSISTENCE    LOWERCASE      USE_AVID
============================================================
OS Native           No             Yes            Yes
itacatest@root:/#
 

Highlighted

"vxdisk -e list" is the

"vxdisk -e list" is the perfect command to map OS drives with veritas DA names.

First coulmn of output will result in veritas DA names while last coulmn of output will indicate corresponding OS names ..

 

Gaurav

Highlighted

Also, if you have multiple

Also, if you have multiple paths to one LUN, you can specify the name with vxdisk list.  You can also script (below) to get the 2 lines of output from format.  I would suggest putting all format output into a file and using the awk statement on the file instead, if you have a lot of LUNs and every format call takes a long time.

 

~ $ sudo vxdisk list ams_wms0_269
Device:    ams_wms0_269
devicetag: ams_wms0_269
type:      auto
hostid:    hsprod1
disk:      name=p1_swap_dg01 id=1285961432.75.hsprod1
group:     name=p1_swap_dg id=1285961433.77.hsprod1
info:      format=cdsdisk,privoffset=256,pubslice=2,privslice=2
flags:     online ready private autoconfig nohotuse autoimport imported
pubpaths:  block=/dev/vx/dmp/ams_wms0_269s2 char=/dev/vx/rdmp/ams_wms0_269s2
guid:      {5b18ef60-1dd2-11b2-86da-00144f81e214}
udid:      HITACHI%5FDF600F%5F77011337%5F010D
site:      -
version:   3.1
iosize:    min=512 (bytes) max=2048 (blocks)
public:    slice=2 offset=65792 len=209559808 disk_offset=0
private:   slice=2 offset=256 len=65536 disk_offset=0
update:    time=1331769700 seqno=0.26
ssb:       actual_seqno=0.0
headers:   0 240
configs:   count=1 len=48144
logs:      count=1 len=7296
Defined regions:
 config   priv 000048-000239[000192]: copy=01 offset=000000 enabled
 config   priv 000256-048207[047952]: copy=01 offset=000192 enabled
 log      priv 048208-055503[007296]: copy=01 offset=000000 enabled
 lockrgn  priv 055504-055647[000144]: part=00 offset=000000
Multipathing information:
numpaths:   2
c2t50060E801002C495d66s2        state=enabled   type=secondary
c3t50060E801002C491d66s2        state=enabled   type=primary
 
/tmp $ for i in `sudo vxdisk list ams_wms0_269 | awk '/state=/{print $1}' | sed 's/s[0-9]$//g'`; do echo "" | sudo format | awk "/$i/{print;getline;print \$0}";done
      72. c2t50060E801002C495d66 <HITACHI-DF600F-0000 cyl 5459 alt 2 hd 50 sec 768>
          /pci@7c0/pci@0/pci@8/SUNW,qlc@0/fp@0,0/ssd@w50060e801002c495,42
     149. c3t50060E801002C491d66 <HITACHI-DF600F-0000 cyl 5459 alt 2 hd 50 sec 768>
          /pci@7c0/pci@0/pci@8/SUNW,qlc@0,1/fp@0,0/ssd@w50060e801002c491,42