cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the free space in VxVM 4.1mp3

gmathew
Level 3
When i run the vxdg free command I see the length colum. Looking at the length output how do i calculate how much free space do i have?

Below is an example of vxdg free

# vxdg -g datadg free
DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
disk01       EMC_CLARiiON3_2 EMC_CLARiiON3_2 83734528  141056    -
disk02       EMC_CLARiiON3_3 EMC_CLARiiON3_3 360992768 26961664  -

Thanks in advance for the help!
1 ACCEPTED SOLUTION

Accepted Solutions

g_lee
Level 6
length is shown in sectors, so add the values together and work out how many bytes/kb/mb/gb that is depending on your platform.

NB: if you want to see the largest volume you can create (subject to default constraints, etc) then:
# vxassist -g <dg> maxsize
shows the largest size that can be created with the remaining/available space in a somewhat more readable format (not per disk though)

View solution in original post

5 REPLIES 5

g_lee
Level 6
length is shown in sectors, so add the values together and work out how many bytes/kb/mb/gb that is depending on your platform.

NB: if you want to see the largest volume you can create (subject to default constraints, etc) then:
# vxassist -g <dg> maxsize
shows the largest size that can be created with the remaining/available space in a somewhat more readable format (not per disk though)

Marianne
Level 6
Partner    VIP    Accredited Certified

On most Unix platforms it's 512 bytes per sector. You did not mention your O/S?

vcs_man
Level 4
Employee Accredited Certified
Any length showing in Volume Manager output  is in sectors. For Solaris , 512 bytes /sector.

So considering that you are using Solaris......

For disk01, (EMC_CLARiiON3_2)

 83734528 sectors gives you following..

Disk Size remaining = 83734528 / 2 =41867264   / 1024 = 40886 KB  / 1024 =  39.92 GB.

Additionally,  the command mentioned earlier doesn't show you what is the exact size for each disk.

# vxassist -g <dg> maxsize    --- This command will show you how much space is there in whole diskgroup which can be used to create new volume.

e.g. 

#vxassist -g testdg maxsize

Maximum volume size: 204800 (100Mb)


Thanks,
Mandar





Gaurav_S
Moderator
Moderator
   VIP    Certified
simple formula to use:

Length * 512 / 1024 = xKB  /1024 = yMB  /1024 = zGB (available space in disk)

# vxdg -g datadg free
DISK         DEVICE       TAG          OFFSET    LENGTH    FLAGS
disk01       EMC_CLARiiON3_2 EMC_CLARiiON3_2 83734528  141056    -
disk02       EMC_CLARiiON3_3 EMC_CLARiiON3_3 360992768 26961664  -

so in your case for disk02

26961664 * 512 = 13480832 KB / 1024 = 13164.8 MB / 1024 = 12.85GB (available in disk02)

Hope this helps


Gaurav

Jaeha
Level 3
Employee Accredited Certified
it seems like you already got answer.  Yes, length or size in Volume Manager is sector, and it's 512bytes in all major unix platform.  so, you can devide by 2 get Kbytes, and devide by 1024*1024 to get GB.

Regards,
Jaeha