Video Screencast Help

How to find the LUN size with veritas commands ?

Created: 22 May 2012 • Updated: 25 Mar 2014 | 11 comments
This issue has been solved. See solution.

HI ,

How to find out the LUN size for this disk emc0_1364
 

Here is the vxdisk list output

vxdisk list emc0_1364
Device:    emc0_1364
devicetag: emc0_1364
type:      auto
hostid:    eusdlsdb005.logistics.corp
disk:      name=dgBNLDBD_ind03 id=1334844563.144.
group:     name=dgBNLDBD_ind id=1330446642.89.i

nfo:      format=cdsdisk,privoffset=256,pubslice=3,privslice=3
flags:     online ready private autoconfig noautoimport imported thinrclm
pubpaths:  block=/dev/vx/dmp/emc0_1364s3 char=/dev/vx/rdmp/emc0_1364s3
guid:      -
udid:      EMC%5FSYMMETRIX%5F000292601366%5F6601364008
site:      -
version:   3.1
iosize:    min=512 (bytes) max=1024 (blocks)
public:    slice=3 offset=65792 len=33863488 disk_offset=0
private:   slice=3 offset=256 len=65536 disk_offset=0
update:    time=1337532691 seqno=0.42
ssb:       actual_seqno=0.0
headers:   0 240
configs:   count=1 len=51360
logs:      count=1 len=4096
Defined regions:
 config   priv 000048-000239[000192]: copy=01 offset=000000 enabled
 config   priv 000256-051423[051168]: copy=01 offset=000192 enabled
 log      priv 051424-055519[004096]: copy=01 offset=000000 enabled
 lockrgn  priv 055520-055663[000144]: part=00 offset=000000
Multipathing information:
numpaths:   2
sdgg            state=enabled
sdgh            state=enabled
 

I see two paths for this disk when i did fdisk on one disk it shows me two why from fdisk

/dev/sdgg3 u 0 704 16964640 5 Whole disk
/dev/sdgg8 u 0 704 16964640 f Unknown

 fdisk -l /dev/sdgg

Disk /dev/sdgg (Sun disk label): 255 heads, 189 sectors, 704 cylinders
Units = cylinders of 48195 * 512 bytes

    Device Flag    Start       End    Blocks   Id  System
/dev/sdgg3  u          0       704  16964640    5  Whole disk
/dev/sdgg8  u          0       704  16964640    f  Unknown
[

Discussion Filed Under:

Comments 11 CommentsJump to latest comment

mikebounds's picture

LUN size is pub len + private len (+ private len offset, but this is neglible), then divide 2048 to get MB, so:

(33863488+65536+256) / 2048 = 16567

So this is same as fdisk reports - 16964640 / 1024 = 16567

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

shiv124's picture

Hi Mike ,

 

Thanks for the reply .So Length is in bytes.

My second question was

when i am doing a fdisk on a underlying device sdgg

why i see sdgg3 and sdgg8 when we have no partions and one says whole and one unknown.

and in fdisk the value is in blocks .to convert that into MB it must be 16964640x512/1024/1024 that comes to 8gb if i am not wrong.

 

Could you Please suggest.

 

 I see two paths for this disk when i did fdisk on one disk it shows me two why from fdisk

/dev/sdgg3 u 0 704 16964640 5 Whole disk
/dev/sdgg8 u 0 704 16964640 f Unknown

fdisk -l /dev/sdgg

Disk /dev/sdgg (Sun disk label): 255 heads, 189 sectors, 704 cylinders
Units = cylinders of 48195 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdgg3 u 0 704 16964640 5 Whole disk
/dev/sdgg8 u 0 704 16964640 f Unknown
[

Gaurav Sangamnerkar's picture

I think the two paths are shown because of the type of disk u have selected (sun lae\bel) & what disk it is ? is it a EFI disk ?

Size calculations are correct ... as these disks are part of diskgroups, you can use vxprint /vxdg free command to find the overall size & free size available on the disk ...

# vxprint -qthg dgBNLDBD_ind   (look for lines starting from "dm" , the size you can convert qith above formula ..

# vxdg -g dgBNLDBD_ind free

this command will list you the free space from each disk ..

Gaurav

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.
 

mikebounds's picture

I think you have 16GB LUNs, not 8GB.

Lengths shown in Veritas are 512 byte blocks:

So you have 33863488+65536+256 = 33929280  512 byte blocks

So this is 33929280  / 2 = 16964640   1024 byte (1k) blocks

This is the same as fdisk reports so fdisk reports in 1024 byte (1k) blocks, so to get to MB, divide by 1024 

to get 16567 MB and divide again by 1024 to get GB of 16.18GB.

You can verify this by cylinders in fdisk output where you have 704 cylinders each of 48195 * 512 bytes, so this is:

704 x 48195 x 512 = 17371791360 bytes.

So need to divide by 1024 to get number of 1k blocks and then by 1024 again to get MB, so

17371791360 / (1024 x 1024) = 16567 MB

Using "vxassist -g diskgroup maxsize" is a good way to check calculations, so if I run this on my test system I get:

Maximum Volume size: 7417856 (3622Mb)

So I can check that 7417856 is 512k blocks, by 

7417856 / ( 2 x 1024 )

where I get 3622 MB.

Another good way is to check calculations is to check volume size (vxprint -v) against filesystems in "df -h" to check your calculations to MBs are approxiametly the same.

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

shiv124's picture

HI Mike/gaurav

 

I was not actually looking to find out the LUN size after adding the disk to DG.so i was not using vxassit and vxprint

 

Mike's detailed reply made clear abt my questions on the LUN size.

 

still i dint understand why it shows 2 disknames on fdisk output

 .this is a emc LUN having two paths havingmOS device names

sdgg state=enabled
sdgh state=enabled

so ideally fdisk -l sdgg must show me

/dev/sdgg.but it shows as sdgg3 and sdgg8 we have no partions on this disk

fdisk -l /dev/sdgg

Disk /dev/sdgg (Sun disk label): 255 heads, 189 sectors, 704 cylinders
Units = cylinders of 48195 * 512 bytes

Device Flag Start End Blocks Id System
/dev/sdgg3 u 0 704 16964640 5 Whole disk
/dev/sdgg8 u 0 704 16964640 f Unknown

 

Any explaination on this woulb be great help

mikebounds's picture

Sorry, don't know why fdisk is reporting like this, but I don't think it is related to Veritas stack and is a Solaris issue.  With cxtytz format, then there are only 7 partitions from 0 to 6, so I don't even know what sdgg8 means - is this the 8th (or 9th if from 0) partition?  In terms of what VxVM does, this just creates 2 partitions for the private and public regions.

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

shiv124's picture

HI Mike by the way it is Linux OS.

 

but thanks for all the help

Gaurav Sangamnerkar's picture

Regarding the eighth partition, see below link:

http://linux.about.com/od/commands/l/blcmdl8_fdisk...

 

A BSD/SUN type disklabel can describe 8 partitions, the third of which should be a `whole disk' partition. Do not start a partition that actually uses its first sector (like a swap partition) at cylinder 0, since that will destroy the disklabel.

so as mentioned above, it is because of the type (sunlabel).. if u choose other label like DOS , you might not see that ...

 

Gaurav

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.
 

Kimberley's picture

Re-opening thread for additional comments from Support.

Thanks for participating in the community!

Tony Griffiths's picture

Note that later SFHA versions include enhanced options and features for listing volume and lun sizes. Refer to this Connect blog post for more information

http://www.symantec.com/connect/blogs/displaying-volume-and-disk-sizes-human-friendly-format-mb-gb-tb-volume-manager-vxvm