Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

How to get Volume information?

Created: 21 Mar 2014 | 9 comments

Hi all,

We are in the proces of fully automating extending a volume.

I need some information on which commands to do this with.

To extend the correct disks I need the SerialNumbers of those disks so Storage management knows which luns to extend in the SAN environment.
Does anyone know how to find these numbers through commands?

 

Ivo

 

 

Operating Systems:

Comments 9 CommentsJump to latest comment

Gaurav Sangamnerkar's picture

Try /etc/vx/diag.d/vxscsiinfo /dev/rdsk /(dev)

PS: If you are happy with the answer provided, please mark the post as solution. You can do so by clicking link "Mark as Solution" below the answer provided.
 

EdT's picture

If you are doing this from a windows environment then you can use WMI to do this.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

eu22106's picture

Oh, Yes sorry. We have are running Windows.

WMI: Do you have a small example?

Gaurav Sangamnerkar's picture

Try this command

vxdisk -g <diskgroup> diskinfo <disk>

or use -e attribute with vxdisk command .. as per 6.0 guide

vxdisk diskinfo

Provides information on the disk referenced in <DiskName>. The information includes the disk name, the dynamic disk group with which the disk is associated, capacity (indicated as Length), disk partition style, free space, device type, port,channel, target ID, LUN, the disk signature, serial number, track alignment settings, Thin Provisioning type (ThinNoReclaim or ThinReclaim for thin provisioned disks),
etc. If the disk has subdisks associated with it, they will be listed.

vxdisk [-g <DynamicDiskGroupName>] diskinfo [-e] <DiskName>

The following attributes apply:
-e                                                              Is an optional parameter.
Use the -e option if you want to display extended attribute information for arrays in addition to the basic disk information. Extended attribute information available for display depends on the array type. It can include vendor ID, product ID, revision ID, cabinet serial number, array volume ID, array LUN type, array RAID level, array snapshot LUN, array replication LUN, array media type, array transport protocol, array port WWN number, array port serial number, array controller ID and array hardware mirror.

 

G

PS: If you are happy with the answer provided, please mark the post as solution. You can do so by clicking link "Mark as Solution" below the answer provided.
 

eu22106's picture

Gaurav,

The command vxdisk -g <diskgroup> diskinfo <disk> would be helpfull but how to query the <disk> information? As this would be in a script I'm not sure how to query that information.

The person who would be requesting a volume extention would know the SG and Volumename but not the disknumber.

I would think the script should look something like this:

Input from requestor: SGName, VolumeName and number of extra GB's.

Then I would get the associated serialnumbers (always 2, as they are mirrored disks in a volume)
StorageManagement would use these two serialnumbers to increase the lun size.
Finally I would do a
"vxassis -g<DG_Name> growby <VolumeName> MAXSIZE"

I hope this makes my question somewhat clearer.

Ivo

starflyfly's picture

To get disk serial number:

 

xx:/etc/vx/diag.d # vxdisk path
SUBPATH                     DANAME               DMNAME       GROUP        STATE
sdc                         ams_wms0_133         -            -            ENABLED
sdd                         ams_wms0_134         -            -            ENABLED
sde                         ams_wms0_135         -            -            ENABLED
sdf                         ams_wms0_142         ams_wms0_142 testdg       ENABLED
sdg                         ams_wms0_153         -            -            ENABLED
sda                         sda                  -            -            ENABLED
sdb                         sdb                  -            -            ENABLED
xx:/etc/vx/diag.d # /etc/vx/diag.d/vxscsiinq /dev/sdd

--------- Decoded Inquiry Information for /dev/sdd

Vendor Identification : HITACHI 
Product Identification : DF600F          
Revision Number : 0000
Serial Number : 730612470086    <<<<<<<<<<<
sprsr310b2-11:/etc/vx/diag.d # 

If the answer has helped you, please mark as Solution.

Wally_Heim's picture

Hi eu22106,

On windows, the "vxdisk diskinfo <harddisk# or PCTL>" command will provide the serial number in output for a specified disk.  You can use a loop to go through all available harddisks until you find the serial number that you are looking for.

The "vxassist" command can be used to grow the volume using the "growby" option.  This command would use the harddisk# or PCTL to select the exact disk to grow the volume to.

SFW also have the ability to automatically grow the volume and notify you when storage space limits have been reached.  This option will automatically select the lun to grow the volume to.  I know that this might not be exactly what you want since it sounds like you want to select exactly which luns the volume will be grown onto.  But it might meet your needs with less scripting.  Its just a thought.

Please let use know if this helps.

Thank you,

Wally

Wally_Heim's picture

Hi eu22106,

You can also use the internal disk name (default "Disk#") of the disk group with the commands above.

Thank you,

Wally

mikebounds's picture

Below is an extract from a script I used to get information from SFWHA:

FOR /F %%i IN ('vxprint -dn') DO vxdisk diskinfo %%i

 

You can pipe output through find or findstr, if you only want serial number in the output.

Mike

UK Symantec Consultant in VCS, GCO, SF, VVR, VxAT on Solaris, AIX, HP-ux, Linux & Windows

If this post has answered your question then please click on "Mark as solution" link below